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

types: fix json field name for execution witness parent state root #522

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

jsign
Copy link
Collaborator

@jsign jsign commented Oct 31, 2024

This PR fixes the new parent state root JSON field name in the witness to match what we get from CL. Additionally, we don't rely on canonical chain numbering to refer to the parent, which doesn't work in syncing mode.

@jsign jsign marked this pull request as ready for review November 1, 2024 11:35
@jsign jsign requested a review from gballet November 1, 2024 11:35
Signed-off-by: Ignacio Hagopian <[email protected]>
ParentStateRoot common.Hash `json:"parentRoot"`
ParentStateRoot common.Hash `json:"parentStateRoot"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As required by CL.

parent := v.bc.GetHeaderByNumber(header.Number.Uint64() - 1)
parent := v.bc.GetBlockByHash(header.ParentHash)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can't rely on canonical chain until the node is synced, so in general this is a safer option for all use cases (syncing, tests, block creation).

jsign added 2 commits November 1, 2024 11:16
Signed-off-by: Ignacio Hagopian <[email protected]>
FIXTURES_TAG: "[email protected]4"
FIXTURES_TAG: "[email protected]8"
Copy link
Collaborator Author

@jsign jsign Nov 1, 2024

Choose a reason for hiding this comment

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

New fixtures since the parent state root JSON field was renamed.
I'll run whenever the release is cut.

Copy link
Owner

@gballet gballet left a comment

Choose a reason for hiding this comment

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

LGTM

@jsign jsign merged commit ef048e6 into kaustinen-with-shapella Nov 1, 2024
12 of 13 checks passed
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