-
Notifications
You must be signed in to change notification settings - Fork 660
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
bridge/pkg/solana: retry VAA submission on transient errors #48
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In particular, this fixes a race condition where the Solana devnet would take longer to deploy than the ETH devnet to deploy and we'd end up with an outdated guardian set on Solana. We currently create a Goroutine for every pending resubmission, which waits and blocks on the channel until solwatch is processing requests again. This is effectively an unbounded queue. An alternative approach would be a channel with sufficient capacity plus backoff. Test Plan: Deployed without solana-devnet, waited for initial guardian set change VAA to be requeued, then deployed solana-devnet. The VAA was successfully submitted once the transient error resolved: ``` [...] 21:08:44.712Z ERROR wormhole-guardian-0.supervisor Runnable died {"dn": "root.solwatch", "error": "returned error when NODE_STATE_HEALTHY: failed to receive message from agent: EOF"} 21:08:44.712Z INFO wormhole-guardian-0.supervisor rescheduling supervised node {"dn": "root.solwatch", "backoff": 0.737286432} 21:08:45.451Z INFO wormhole-guardian-0.root.solwatch watching for on-chain events 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch failed to submit VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch requeuing VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:09:02.062Z INFO wormhole-guardian-0.root.solwatch submitted VAA {"tx_sig": "4EKmH[...]", "digest": "79[...]"} ``` [ghstack-poisoned]
This was referenced Oct 21, 2020
This was referenced Oct 21, 2020
This was referenced Oct 21, 2020
hendrikhofstadt
approved these changes
Oct 22, 2020
In particular, this fixes a race condition where the Solana devnet would take longer to deploy than the ETH devnet to deploy and we'd end up with an outdated guardian set on Solana. We currently create a Goroutine for every pending resubmission, which waits and blocks on the channel until solwatch is processing requests again. This is effectively an unbounded queue. An alternative approach would be a channel with sufficient capacity plus backoff. Test Plan: Deployed without solana-devnet, waited for initial guardian set change VAA to be requeued, then deployed solana-devnet. The VAA was successfully submitted once the transient error resolved: ``` [...] 21:08:44.712Z ERROR wormhole-guardian-0.supervisor Runnable died {"dn": "root.solwatch", "error": "returned error when NODE_STATE_HEALTHY: failed to receive message from agent: EOF"} 21:08:44.712Z INFO wormhole-guardian-0.supervisor rescheduling supervised node {"dn": "root.solwatch", "backoff": 0.737286432} 21:08:45.451Z INFO wormhole-guardian-0.root.solwatch watching for on-chain events 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch failed to submit VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch requeuing VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:09:02.062Z INFO wormhole-guardian-0.root.solwatch submitted VAA {"tx_sig": "4EKmH[...]", "digest": "79[...]"} ``` [ghstack-poisoned]
In particular, this fixes a race condition where the Solana devnet would take longer to deploy than the ETH devnet to deploy and we'd end up with an outdated guardian set on Solana. We currently create a Goroutine for every pending resubmission, which waits and blocks on the channel until solwatch is processing requests again. This is effectively an unbounded queue. An alternative approach would be a channel with sufficient capacity plus backoff. Test Plan: Deployed without solana-devnet, waited for initial guardian set change VAA to be requeued, then deployed solana-devnet. The VAA was successfully submitted once the transient error resolved: ``` [...] 21:08:44.712Z ERROR wormhole-guardian-0.supervisor Runnable died {"dn": "root.solwatch", "error": "returned error when NODE_STATE_HEALTHY: failed to receive message from agent: EOF"} 21:08:44.712Z INFO wormhole-guardian-0.supervisor rescheduling supervised node {"dn": "root.solwatch", "backoff": 0.737286432} 21:08:45.451Z INFO wormhole-guardian-0.root.solwatch watching for on-chain events 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch failed to submit VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:08:50.031Z ERROR wormhole-guardian-0.root.solwatch requeuing VAA {"error": "rpc error: code = Canceled desc = stream terminated by RST_STREAM with error code: CANCEL", "digest": "79[...]"} 21:09:02.062Z INFO wormhole-guardian-0.root.solwatch submitted VAA {"tx_sig": "4EKmH[...]", "digest": "79[...]"} ``` [ghstack-poisoned]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
In particular, this fixes a race condition where the Solana devnet would
take longer to deploy than the ETH devnet to deploy and we'd end up
with an outdated guardian set on Solana.
We currently create a Goroutine for every pending resubmission, which
waits and blocks on the channel until solwatch is processing requests
again. This is effectively an unbounded queue. An alternative approach
would be a channel with sufficient capacity plus backoff.
Test Plan: Deployed without solana-devnet, waited for initial guardian
set change VAA to be requeued, then deployed solana-devnet.
The VAA was successfully submitted once the transient error resolved: