Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: switch to wormhole p2p #9

Merged
merged 1 commit into from
Nov 6, 2023
Merged

feat: switch to wormhole p2p #9

merged 1 commit into from
Nov 6, 2023

Conversation

ali-bahjati
Copy link
Contributor

@ali-bahjati ali-bahjati commented Nov 6, 2023

This PR switches the receiver from plain p2p to use Wormhole p2p package. Most of the code is adopted from Wormhole spy code.

Wormhole is going to switch to another version of QUIC and they have implemented the transition in their code base. They are going to do the switch for testnet tomorrow and we need to ship the new version out before the transition time, otherwise our beacons will fail on testnet.

I will switch to zap for logging later. I think it will be cleaner to do in a subsequent PR. The supervisor logs are not very noisy at the moment.

wormhole-foundation/wormhole#3463

@ali-bahjati ali-bahjati requested review from thmzlt and Reisen November 6, 2023 15:06
"github.com/libp2p/go-libp2p"
dht "github.com/libp2p/go-libp2p-kad-dht"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/certusone/wormhole/node/pkg/supervisor"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this supervisor thing? I'm probably wrong, but I remember it being related to that old disconnect bug in the spy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it seems impossible to run the p2p code without supervisor. It gets supervisor stuff from the context on p2p.Run method.

@ali-bahjati ali-bahjati merged commit 1653578 into main Nov 6, 2023
1 check passed
@ali-bahjati ali-bahjati deleted the use-wh-p2p branch November 6, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants