Skip to content

Conversation

sergekh2
Copy link

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

  • 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.

…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.
@CLAassistant
Copy link

CLAassistant commented Jul 22, 2022

CLA assistant check
All committers have signed the CLA.

@paulhauner
Copy link
Member

@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 paulhauner added the ready-for-review The code is ready for review label Jul 23, 2022
@sergekh2
Copy link
Author

sergekh2 commented Aug 1, 2022

@paulhauner
what are the next steps? somebody needs to review it?

@michaelsproul michaelsproul self-requested a review August 15, 2022 05:21
Copy link
Member

@michaelsproul michaelsproul left a 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 \
Copy link
Member

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 \
Copy link
Member

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 \
Copy link
Member

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 \
Copy link
Member

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,
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DATADIR=~/.lighthouse/testnet-with-geth
DATADIR=~/.lighthouse/local-execution-testnet

I'd prefer a name more similar to the existing ~/.lighthouse/local-testnet name

@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Aug 16, 2022
@michaelsproul michaelsproul mentioned this pull request Nov 22, 2022
@paulhauner
Copy link
Member

I believe this was fixed in #3807. Thanks for the contribution @sergekh2, sorry it didn't make it to getting merged.

@paulhauner paulhauner closed this Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants