Enable local testnet with geth to execute merge#3364
Enable local testnet with geth to execute merge#3364sergekh2 wants to merge 1 commit intosigp:unstablefrom
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 |
michaelsproul
left a comment
There was a problem hiding this comment.
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.
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.
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.
--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.
--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.
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.
| 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