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

chore(genesis deposit) : Change in local network setup with single node #2402

Merged
merged 8 commits into from
Jan 27, 2025

Conversation

nidhi-singh02
Copy link
Contributor

@nidhi-singh02 nidhi-singh02 commented Jan 23, 2025

Using cli command for setting deposit contract storage slot values and using the correct genesis files(the one being modified by the cli command)

Signed-off-by: nidhi-singh02 <[email protected]>
@nidhi-singh02 nidhi-singh02 self-assigned this Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.12%. Comparing base (2afec05) to head (893395f).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2402   +/-   ##
=======================================
  Coverage   27.12%   27.12%           
=======================================
  Files         351      351           
  Lines       15523    15523           
  Branches       20       20           
=======================================
  Hits         4210     4210           
  Misses      11110    11110           
  Partials      203      203           

@nidhi-singh02 nidhi-singh02 marked this pull request as ready for review January 23, 2025 06:18
@nidhi-singh02 nidhi-singh02 requested a review from a team as a code owner January 23, 2025 06:18
@@ -74,7 +75,9 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
./build/bin/beacond genesis add-premined-deposit --home $HOMEDIR \
32000000000 0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4
./build/bin/beacond genesis collect-premined-deposits --home $HOMEDIR
./build/bin/beacond genesis execution-payload "$ETH_GENESIS" --home $HOMEDIR
./build/bin/beacond genesis set-deposit-storage "$ETH_GENESIS" --home $HOMEDIR
Copy link
Collaborator

@abi87 abi87 Jan 23, 2025

Choose a reason for hiding this comment

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

@nidhi-singh02 why do we execute both commands? I mean for both nethermind nodes and non-nethermind ones

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we want to modify the deposit contract storage slot values for both the genesis files - for nethermind and for others. @calbera I hope my understanding is correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah the idea here is set both eth genesis files so that in case the user wants to start nethermind as the EL, its genesis file is also ready

Copy link
Collaborator

@abi87 abi87 left a comment

Choose a reason for hiding this comment

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

I am not sure this change is complete.
Shouldn't we make sure that also make start-<EL> pick the right genesis file, as it was modified by the set-deposit-storage command?

@nidhi-singh02
Copy link
Contributor Author

I am not sure this change is complete. Shouldn't we make sure that also make start-<EL> pick the right genesis file, as it was modified by the set-deposit-storage command?

Yes, you are right, we are ensuring that as we changed the genesis path values as below -

ETH_GENESIS_PATH = ${HOMEDIR}/eth-genesis.json
NETHER_ETH_GENESIS_PATH = ${HOMEDIR}/eth-nether-genesis.json

@nidhi-singh02 nidhi-singh02 requested a review from calbera January 23, 2025 15:16
@calbera
Copy link
Contributor

calbera commented Jan 23, 2025

2 things:

  • would add the readme note from internal
  • would ensure all EL clients startup correctly with the correct deposit contract state

@calbera calbera marked this pull request as draft January 23, 2025 18:48
@nidhi-singh02
Copy link
Contributor Author

nidhi-singh02 commented Jan 24, 2025

I validated by running genesis sanity checks that we have for all the EL clients - geth, reth, erigon, besu and nethermind.
Facing issues in spinning up a beacond-ethereumjs network, tried on main branch as well - same issue. I have opened up an issue to track it #2408

I spent some time tweaking few parameters for ethereumjs, it needs more time to dig into. Fixing something wrong that I see with ethereumjs data directory path in this PR.

Signed-off-by: nidhi-singh02 <[email protected]>
@nidhi-singh02 nidhi-singh02 marked this pull request as ready for review January 24, 2025 08:23
Copy link
Contributor

@calbera calbera left a comment

Choose a reason for hiding this comment

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

LGTM. tested that the deposit contract queries correctly on all ELs, even ethereumjs. Regarding ethereumjs not starting up correctly, that is also the case on main, so unrelated to this PR. will keep issue #2408 open

@calbera calbera merged commit 74518b1 into main Jan 27, 2025
19 checks passed
@calbera calbera deleted the single-node-fix branch January 27, 2025 02:47
shotes pushed a commit that referenced this pull request Feb 3, 2025
shotes pushed a commit that referenced this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants