-
Notifications
You must be signed in to change notification settings - Fork 907
Enable local testnet with geth to execute merge #3364
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
Conversation
…o execute merge. No easy way to run local testnet that executes merge. - Add deposit command to lcli to deposit test validator stakes to already existing contract. - Add scripts/local_testnet_pos to run local testnet with geth pre-configured for merge.
@rsalvo77 we get a few people randomly approving things on Lighthouse. If we continue to see this behaviour without an indication of actual reviewing happening, we'll ban from the repository. Apologies if you have genuinely given this a review. |
@paulhauner |
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.
This is awesome thank you!
These scripts made it very easy to run a local execution testnet, and everything worked without a hitch. I have a few suggestions for minor tweaks.
It's a bit unfortunate that we introduce quite a lot of code duplication in this PR, but I think that's an acceptable compromise when the alternative is writing lots of complex bash logic. In future we can either reconcile the two in bash, or maybe Python, or just deprecate the scripts that run a testnet without an execution node.
--target-peers $((BN_COUNT - 1)) \ | ||
--eth1 \ | ||
--merge \ | ||
--terminal-total-difficulty-override=60000000 \ |
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.
It would be great to be able to set the TTD from the vars.env
, or in lieu of that to have a slightly lower value so that the merge happens sooner. I played around with TTD 5000000 and the merge seemed to happen almost immediately, maybe twice that by default, i.e. 10000000?
--eth1 \ | ||
--merge \ | ||
--terminal-total-difficulty-override=60000000 \ | ||
--eth1-endpoints http://127.0.0.1:$eth1_port \ |
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.
don't need this flag any longer (as --execution-endpoint
is provided)
--disable-packet-filter \ | ||
--target-peers $((BN_COUNT - 1)) \ | ||
--eth1 \ | ||
--merge \ |
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.
--merge
flag is deprecated and can be deleted
--http-port $http_port \ | ||
--disable-packet-filter \ | ||
--target-peers $((BN_COUNT - 1)) \ | ||
--eth1 \ |
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.
--eth1
is implied by --staking
but also isn't required if --execution-endpoint
is set
"istanbulBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"mergeForkBlock": 100, |
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 could probably set this to 0
@@ -0,0 +1,50 @@ | |||
# Base directory for all data files. | |||
DATADIR=~/.lighthouse/testnet-with-geth |
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.
DATADIR=~/.lighthouse/testnet-with-geth | |
DATADIR=~/.lighthouse/local-execution-testnet |
I'd prefer a name more similar to the existing ~/.lighthouse/local-testnet
name
Update lcli, add scripts and configs to run local testnet with geth to execute merge.
Issue Addressed
No easy way to run local testnet that executes merge.
Proposed Changes