-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce NW BatchV2 in Protocol Version 12 & Pipe ProtocolConfig int…
…o NW (#12178) ## Description This is attempt 2 of getting protocol config into narwhal. Previous attempt ([PR#11519](#11519)) had to be reverted because mismatched batch versions were causing the validators to panic. The issue was that we were not handling the protocol upgrade correctly. `ProtocolConfig` was passed in when `NarwhalManager` was created but on epoch change `monitor_reconfiguration` does not recreate `NarwhalManager` if it still has a handle on the `ValidatorComponents` but rather just calls `start` from the existing `NarwhalManager`. This is not a problem for `NarwhalConfiguration` parameters which is also only passed in on `NarwhalManager` creation because the moment the node is restarted for a binary update the parameters take effect. However in the case of protocol upgrades `ProtocolConfig` is only updated on the following epoch. For example if the validator restarts to update its binary from version `N` to version `N+1`, `NarwhalManager` would be constructed with `ProtocolConfig` at version `N` (not `N+1`) because we need to ensure we have a majority quorum before actually going to version `N+1` which happens at epoch change. On epoch change because the node still has a handle on `ValidatorComponents` it just starts Narwhal with the existing `NarwhalManager` and ends up using `ProtocolConfig` at version `N` which is the root cause of the issues. To resolve this the following changes were added to the last PR to fix the issue and make it more robust - Filter the received or fetched batches to ensure the supported batch version is received. - Pass `ProtocolConfig` to `NarwhalManager` on start and not on creation ## Test Plan Added unit tests & tested protocol upgrade in labnet from mainnet release branch to v12 --- ### Type of Change (Check all that apply) - [X] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes Start using `BatchV2` in Narwhal which introduces `VersionedMetadata` that allows for more granular tracking of NW batch execution latency.
- Loading branch information
1 parent
35a815b
commit 59e0f09
Showing
62 changed files
with
1,847 additions
and
355 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.
59e0f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
offline-signer-helper – ./dapps/offline-signer-helper
offline-signer-helper-git-main-mysten-labs.vercel.app
offline-signer-helper-mysten-labs.vercel.app
offline-signer-helper.vercel.app