-
Notifications
You must be signed in to change notification settings - Fork 56
fix(drive-abci): don't panic on unsupported version error #2679
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
base: v4.0-dev
Are you sure you want to change the base?
Changes from all commits
0078462
5e230ff
54db7bb
b6df2ed
5495788
2048e50
43e65ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -83,15 +83,23 @@ where | |||||||||||
|
|
||||||||||||
| // We should panic if this node is not supported a new protocol version | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Stale comment still says 'We should panic' The comment above the
Suggested change
source: ['claude', 'codex'] |
||||||||||||
| let Ok(next_platform_version) = PlatformVersion::get(next_protocol_version) else { | ||||||||||||
| panic!( | ||||||||||||
| let max_supported = PlatformVersion::latest().protocol_version; | ||||||||||||
| tracing::error!( | ||||||||||||
| r#"Failed to upgrade the network protocol version {next_protocol_version}. | ||||||||||||
|
|
||||||||||||
| Please update your software to the latest version: https://docs.dash.org/platform-protocol-upgrade | ||||||||||||
|
|
||||||||||||
| Your software version: {}, latest supported protocol version: {}."#, | ||||||||||||
| env!("CARGO_PKG_VERSION"), | ||||||||||||
| PlatformVersion::latest().protocol_version | ||||||||||||
| max_supported | ||||||||||||
| ); | ||||||||||||
|
|
||||||||||||
| return Ok(ValidationResult::new_with_error(Error::Execution( | ||||||||||||
| ExecutionError::ProtocolVersionNotSupported { | ||||||||||||
| max_supported, | ||||||||||||
| required: next_protocol_version, | ||||||||||||
| }, | ||||||||||||
| ))); | ||||||||||||
| }; | ||||||||||||
|
Comment on lines
85
to
103
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Add regression test for unsupported protocol version rejection The PR description states 'Not tested', but this branch is the entire behavioral guarantee being introduced and is consensus-critical: at an epoch change, an unsupported source: ['claude', 'codex'] |
||||||||||||
|
|
||||||||||||
| let old_protocol_version = block_platform_state.current_protocol_version_in_consensus(); | ||||||||||||
|
|
||||||||||||
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.
💬 Nitpick: Typo 'liekly' in ProtocolVersionNotSupported doc comment
Doc comment for the new
ProtocolVersionNotSupportedvariant containsliekly(should belikely). This renders on the public rustdoc surface ofExecutionError, so worth fixing while the variant is new.source: ['claude', 'codex']