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

Prysmctl: generate genesis state with correct extra data #14803

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Jan 15, 2025

h/t to @yahgwai for the report

Extradata specified in the execution layer's genesis JSON can be arbitrary in length. However, when used to generate an execution header for the beacon state, we made a deliberate choice to truncate it to 32 bytes instead of leaving it empty. This behavior has been in place since #11809.

#14351 removed the extra data truncation, causing genesis state generation to fail as follows:

INFO[0000] Specified a chain config file: /Users/t/go/src/github.com/prysmaticlabs/prysm/config.yml  prefix=genesis
INFO[0000] No genesis time specified, defaulting to now()  prefix=genesis
INFO[0000] Delaying genesis 1736981389 by 15 seconds     prefix=genesis
INFO[0000] Genesis is now 1736981404                     prefix=genesis
INFO[0000] Setting fork geth times                       cancun=1736981404 prefix=genesis shanghai=1736981404
118
FATA[0000] Could not generate beacon chain genesis state  error="--.ExtraData (bytes array does not have the correct length): expected 32 and 118 found" prefix=genesis

This PR reverts the changes related to extra data truncation.

@terencechain terencechain requested a review from a team as a code owner January 15, 2025 23:02
@terencechain terencechain force-pushed the fix-interop-generate-state branch from 0191c0d to 255578f Compare January 15, 2025 23:08
@terencechain terencechain force-pushed the fix-interop-generate-state branch from 255578f to e6288f9 Compare January 15, 2025 23:16
@terencechain terencechain added this pull request to the merge queue Jan 16, 2025
Merged via the queue into develop with commit dc002c2 Jan 16, 2025
15 checks passed
@terencechain terencechain deleted the fix-interop-generate-state branch January 16, 2025 00:22
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.

3 participants