Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Add sepolia configs #14

Merged
merged 2 commits into from
Jun 14, 2022
Merged

Add sepolia configs #14

merged 2 commits into from
Jun 14, 2022

Conversation

parithosh
Copy link
Member

This PR adds the config files required by CL clients to instrument genesis. A summary of the chain configs are below:

  • Genesis time: 1655733600
  • Genesis fork version: 0x90000069
  • Genesis validator count: 1550
  • ALTAIR_FORK_EPOCH: 50
  • BELLATRIX_FORK_EPOCH: 100
  • TERMINAL_TOTAL_DIFFICULTY: 100000000000000000000000 (placeholder)
  • DEPOSIT_CONTRACT_ADDRESS: 0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D (Token gated deposit contract)

Values such as ETH1_FOLLOW_DISTANCE were left unchanged compared to other testnets.

Once the PR has been merged, the client teams can be expected to receive mnemonics for their genesis validators. It'd be great if once the client teams have setup their bootnodes, if we could increase the bootnode list.

@parithosh
Copy link
Member Author

parithosh commented Jun 10, 2022

A widely known issue for testnets is that supply tends to eventually get short, Bots tend to drain faucets quite fast and eventually it gets harder to get test ether (Especially over years).

With the beaconchain genesis having embedded deposits, we have a unique opportunity to inflate the supply of sepolia eth once withdrawals are enabled. We can do this by changing the deposit balance value of the validator from 32 eth (Currently what the eth2-testnet-genesis tool sets) to a much higher number (1M eth). Once withdrawals are enabled, we can withdraw a small portion of the validator set to inflate supply over time as and when needed.

In order to avoid overflow issues, it was decided to keep the supply inflation to a reasonable factor.

In terms of the actual plan, we'd have 3 levers to then control on Sepolia:

  • we assign 1M as the deposit value per validator (times 1550 validators), so the overall supply on Sepolia goes from ~320M to like ~1,850M (once withdrawals are enabled)
  • we assign an additional 20 validators at genesis with a new mnemonic, their sole purpose is to be withdrawn at some point and inflate the supply by 20M without affecting the validator set negatively. EF Devops can hold the mnemonic for this and release as/when needed.
  • Since we're using the token gated deposit contract, we already have the ability to onboard another 1,000,000,000 validators, each will show up as a 32 eth deposit (essentially 32x leverage). So we can additionally inflate the supply up to ~32,000,000,000 eth - as and when needed. This would be a last ditch effort that we'd avoid using unless we're in a dire situation.

I think a combination of the above 3 levers should mean we never have sepolia supply issues for years/decades to come(post withdrawals of course).

I've already created an alternate genesis state with the updated balances, updated in this branch but I can revert it if teams decide its not worth the risk or any other reason. Looking for feedback on the idea and if we've overlooked something (esp. regarding genesis state balance processing or how withdrawals work.

An argument against doing any of this is the token deposit contract, since it gives us the ability to inflate by ~32,000,000,000 eth we could just use that as the only lever. This would rely heavily on churning validators through the deposit/withdrawal queue though.

Since this would affect EL and CL teams + withdrawals, I'd be tagging @ajsutton @mkalinin @terencechain @tersec @paulhauner @dapplion @ralexstokes @lightclient @q9f @mcdee @MarekM25 @SuburbanDad @karalabe

@dapplion
Copy link

Lodestar can handle a max individual balance of 9007199254740991 due to internal types optimization; 1M ETH fits.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

@tersec
Copy link
Contributor

tersec commented Jun 10, 2022

Nimbus has the full range of uint64 available for balances in Gwei.

My only concern would be whether this affects the realism of the merge testing, but there are other testnets, so the tradeoff seems reasonable.

@ajsutton
Copy link
Contributor

Great idea. This isn't meant to be a like MainNet beacon chain - it's a stable service we're providing to dapps for their testing primarily and ensuring good supply is important for that.

@ajsutton
Copy link
Contributor

Btw, if this causes issues for any clients we should make sure we have reference tests and get the clients fixed. Once withdrawals are enabled you could cause a bunch of chaos of free by depositing a heap of ETH into your validator and then getting it back via partial withdrawals. I suspect no-one will have 9007199254740991 ETH they can spare for a few weeks (does that much ETH even exist?) but large but not unreasonable balances are certainly possible and the ETH used wouldn't be lost so we need to be sure we can handle it.

I'd be quite surprised if there are any problem though.

@mkalinin
Copy link

You want to be sure that BLS withdrawal credentials are used for these validators. Excess balance of those that are using eth1 credentials will be partially withdrawn in a few epochs after withdrawals feature gets enabled.

Copy link
Contributor

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

high-level sounds good to me, I support taking advantage of all the various supply inflation levers we have

I left a few minor comments

sepolia/config.yaml Show resolved Hide resolved
sepolia/config.yaml Show resolved Hide resolved
sepolia/config.yaml Show resolved Hide resolved
@mcdee
Copy link
Contributor

mcdee commented Jun 13, 2022

Lodestar can handle a max individual balance of 9007199254740991 due to internal types optimization; 1M ETH fits. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

@dapplion is that value in gwei? If so, it maps to around 9 million ETH and it's entirely possible to create a validator with that balance as Adrian mentions (certainly on testnets, anyway).

@protolambda
Copy link

Can the same nonce value that was used on Sepolia to deploy the smart contract still be used on mainnet? Ideally we deploy something to mainnet that blocks transfers into the contract, or allows an admin to drain any ETH sent to it by mistake.

@dapplion
Copy link

dapplion commented Jun 13, 2022

Lodestar can handle a max individual balance of 9007199254740991 due to internal types optimization; 1M ETH fits. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

@dapplion is that value in gwei? If so, it maps to around 9 million ETH and it's entirely possible to create a validator with that balance as Adrian mentions (certainly on testnets, anyway).

If a mega-whale of test ETH is bored and wants to kick Lodestar out of a testnet for the lolz then yes, it's entirely possible.

For the record: using Number instead of bigint for balances speeds up epoch processing very significantly in Mainnet, so it's worth the risk IMO.

@parithosh parithosh merged commit 28a06e8 into main Jun 14, 2022
@q9f q9f deleted the sepolia branch June 14, 2022 14:04
bors bot pushed a commit to sigp/lighthouse that referenced this pull request Jun 17, 2022
## Issue Addressed

N/A

## Proposed Changes

Add network config for sepolia from eth-clients/merge-testnets#14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants