-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
ParentStateRoot common.Hash `json:"parentRoot"` | ||
ParentStateRoot common.Hash `json:"parentStateRoot"` |
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.
As required by CL.
parent := v.bc.GetHeaderByNumber(header.Number.Uint64() - 1) | ||
parent := v.bc.GetBlockByHash(header.ParentHash) |
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.
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).
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
FIXTURES_TAG: "[email protected]4" | ||
FIXTURES_TAG: "[email protected]8" |
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.
New fixtures since the parent state root JSON field was renamed.
I'll run whenever the release is cut.
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.
LGTM
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.