Skip to content

Commit fe4c7bb

Browse files
committed
Update devnet spec to mirror mainnet specs
1 parent e5d0650 commit fe4c7bb

File tree

7 files changed

+11
-57
lines changed

7 files changed

+11
-57
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"args": [
3434
"genesis",
3535
"add-premined-deposit",
36-
"32000000000",
36+
"250000000000000",
3737
"0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4",
3838
"--home=${workspaceFolder}/.tmp/beacond",
3939
],
@@ -166,4 +166,4 @@
166166
"suppressMultipleSessionWarning": true,
167167
}
168168
]
169-
}
169+
}

cli/commands/genesis/storage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func setupMockCLGenesis(t *testing.T, tmpDir string) string {
117117
"deposits": []interface{}{
118118
map[string]interface{}{
119119
"data": map[string]interface{}{
120-
"amount": "32000000000",
120+
"amount": "250000000000000",
121121
"pubkey": "0x1234",
122122
"withdrawal_address": "0x5678",
123123
"signature": "0x9abc",

config/spec/devnet.go

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,13 @@ package spec
2222

2323
import (
2424
"github.com/berachain/beacon-kit/chain"
25-
"github.com/berachain/beacon-kit/primitives/common"
26-
"github.com/ethereum/go-ethereum/params"
2725
)
2826

29-
const (
30-
// devnetEVMInflationAddress is the address of the EVM inflation contract.
31-
devnetEVMInflationAddress = "0x6942069420694206942069420694206942069420"
32-
33-
// devnetEVMInflationPerBlock is the amount of native EVM balance (in units
34-
// of Gwei) to be minted per EL block.
35-
devnetEVMInflationPerBlock = 10 * params.GWei
36-
37-
// devnetMaxStakeAmount is the maximum amount of native EVM balance (in units
38-
// of Gwei) that can be staked.
39-
devnetMaxStakeAmount = 4000 * params.GWei
40-
41-
// devnetDeneb1ForkEpoch is the epoch at which the Deneb1 fork occurs.
42-
devnetDeneb1ForkEpoch = 1
43-
44-
// devnetEVMInflationAddressDeneb1 is the address of the EVM inflation contract
45-
// after the Deneb1 fork.
46-
devnetEVMInflationAddressDeneb1 = "0x4206942069420694206942069420694206942069"
47-
48-
// devnetEVMInflationPerBlockDeneb1 is the amount of native EVM balance (in units
49-
// of Gwei) to be minted per EL block after the Deneb1 fork.
50-
devnetEVMInflationPerBlockDeneb1 = 11 * params.GWei
51-
)
52-
53-
// DevnetChainSpecData is the chain.SpecData for a devnet. It is similar to mainnet but
54-
// has different values for testing EVM inflation and staking.
55-
//
56-
// TODO: remove modifications from mainnet spec to align with mainnet behavior.
27+
// DevnetChainSpecData is the chain.SpecData for a devnet.
5728
func DevnetChainSpecData() *chain.SpecData {
5829
specData := MainnetChainSpecData()
5930
specData.DepositEth1ChainID = DevnetEth1ChainID
60-
61-
// Deneb1 fork takes place at epoch 1.
62-
specData.Deneb1ForkEpoch = devnetDeneb1ForkEpoch
63-
64-
// EVM inflation is different from mainnet to test.
65-
specData.EVMInflationAddressGenesis = common.NewExecutionAddressFromHex(devnetEVMInflationAddress)
66-
specData.EVMInflationPerBlockGenesis = devnetEVMInflationPerBlock
67-
68-
// EVM inflation is different from mainnet for now, after the Deneb1 fork.
69-
specData.EVMInflationAddressDeneb1 = common.NewExecutionAddressFromHex(devnetEVMInflationAddressDeneb1)
70-
specData.EVMInflationPerBlockDeneb1 = devnetEVMInflationPerBlockDeneb1
71-
72-
// Staking is different from mainnet for now.
73-
specData.MaxEffectiveBalance = devnetMaxStakeAmount
74-
specData.EjectionBalance = defaultEjectionBalance
75-
specData.EffectiveBalanceIncrement = defaultEffectiveBalanceIncrement
76-
specData.SlotsPerEpoch = defaultSlotsPerEpoch
77-
31+
specData.Deneb1ForkEpoch = 1
7832
return specData
7933
}
8034

consensus-types/types/state_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func generateValidBeaconState() *types.BeaconState {
5353
{
5454
Pubkey: [48]byte{0x01},
5555
WithdrawalCredentials: [32]byte{0x02},
56-
EffectiveBalance: 32000000000,
56+
EffectiveBalance: 250000000000000,
5757
Slashed: false,
5858
ActivationEligibilityEpoch: 1,
5959
ActivationEpoch: 2,
@@ -63,15 +63,15 @@ func generateValidBeaconState() *types.BeaconState {
6363
{
6464
Pubkey: [48]byte{0x03},
6565
WithdrawalCredentials: [32]byte{0x04},
66-
EffectiveBalance: 31000000000,
66+
EffectiveBalance: 240000000000000,
6767
Slashed: true,
6868
ActivationEligibilityEpoch: 3,
6969
ActivationEpoch: 4,
7070
ExitEpoch: 5,
7171
WithdrawableEpoch: 6,
7272
},
7373
},
74-
Balances: []uint64{32000000000, 31000000000},
74+
Balances: []uint64{250000000000000, 240000000000000},
7575
RandaoMixes: generateRandomBytes32(65536),
7676
Slashings: []math.Gwei{1000000000, 2000000000},
7777
NextWithdrawalIndex: 7,

kurtosis/src/nodes/consensus/beacond/launcher.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_config(node_struct, engine_dial_url, chain_id, chain_spec, genesis_depos
7171
"CHAIN_SPEC": chain_spec,
7272
"BEACOND_CHAIN_SPEC": chain_spec,
7373
"WITHDRAWAL_ADDRESS": "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4",
74-
"DEPOSIT_AMOUNT": "32000000000",
74+
"DEPOSIT_AMOUNT": "250000000000000",
7575
"GENESIS_DEPOSIT_COUNT_HEX": genesis_deposit_count_hex,
7676
"GENESIS_DEPOSITS_ROOT": genesis_deposits_root,
7777
},

kurtosis/src/nodes/consensus/beacond/node.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_genesis_env_vars(cl_service_name, chain_id, chain_spec):
5858
"BEACOND_ENABLE_PROMETHEUS": "true",
5959
"ETH_GENESIS": "/root/eth_genesis/genesis.json",
6060
"WITHDRAWAL_ADDRESS": "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4",
61-
"DEPOSIT_AMOUNT": "32000000000",
61+
"DEPOSIT_AMOUNT": "250000000000000",
6262
"BEACOND_CHAIN_SPEC": chain_spec,
6363
"CHAIN_SPEC": chain_spec,
6464
}

testing/files/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then
7878
KZG_PATH=$network_dir/kzg-trusted-setup.json
7979
else
8080
./build/bin/beacond genesis add-premined-deposit --home $HOMEDIR \
81-
32000000000 0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4
81+
250000000000000 0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4
8282
./build/bin/beacond genesis collect-premined-deposits --home $HOMEDIR
8383
./build/bin/beacond genesis set-deposit-storage "$ETH_GENESIS" --home $HOMEDIR
8484
./build/bin/beacond genesis set-deposit-storage "$ETH_NETHER_GENESIS" --nethermind --home $HOMEDIR

0 commit comments

Comments
 (0)