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

Bump consensus runtime spec version #2953

Merged
merged 2 commits into from
Jul 29, 2024
Merged

Bump consensus runtime spec version #2953

merged 2 commits into from
Jul 29, 2024

Conversation

NingLin-P
Copy link
Member

This PR bumps the consensus runtime spec version from 5 to 6 as preparation for the upcoming consensus runtime upgrade in gemini-3h. Also, this PR removes the #[codec(skip)] for the maybe_domain_sudo_call_proof field in FP.

Code contributor checklist:

…d proof

Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Comment on lines -423 to -424
// TODO: remove this before next consensus runtime upgrade. Skipping to maintain compatibility with Gemini
#[codec(skip)]
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure how is this supposed to work on the client side, can you explain?

Copy link
Member Author

Choose a reason for hiding this comment

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

FP is expected to be rare in the network and the client only constructs/submits FP through the runtime time (not extracting FP from the runtime state), so the worst situation is the invalid extrinsic root FP triggered after the runtime upgrade and domain node didn't include this change will crash due to failed to submit FP, it can be fixed by upgrade the client to a newer release or restart after FP is submitted by other nodes.

Generally, I think this is okay for gemini-3h, but for mainnet we need to resolve #2942 completely before changing any shared data structure.

Also, we do need another client release to include this change and #2947, the domain node that is on jul-26 needs to upgrade to this new release otherwise they may crash after the runtime upgrade due to #2947.

Copy link
Member

Choose a reason for hiding this comment

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

I do not think I fully understand how this is going to work. We already had fraud proofs on 3h, changing data structure indicates decoding will fail for either old or future fraud proofs unless client is somehow prepared to deal with this. Unless I misunderstand what this does and how it works.

Copy link
Member Author

Choose a reason for hiding this comment

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

The client doesn't decode the FP, it only constructs, encodes, and submits FP through runtime API, so the domain node only crashes if:

  • FP is triggered after the runtime upgrade
  • And it didn't upgrade to the client that included this change

This is different from ER, where the domain node will extract and decode ER in every consensus block (from genesis to the best block) so any change to ER will crash the domain node.

@NingLin-P NingLin-P added this pull request to the merge queue Jul 29, 2024
Merged via the queue into main with commit 4de5f05 Jul 29, 2024
9 checks passed
@NingLin-P NingLin-P deleted the bump-consensus-ver branch July 29, 2024 11:51
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