diff --git a/docker-compose.yml b/docker-compose.yml index 3d15345..b95d4d5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,8 +59,8 @@ services: volumes: - "beacon_node_data:/chaindata" - type: bind - source: ./prysm/prysm-chain-config.yml - target: /config/prysm-chain-config.yml + source: ./shared/chain-config.yml + target: /config/chain-config.yml - type: bind source: ./prysm/run_beacon_node.sh target: /usr/local/bin/run_beacon_node.sh @@ -91,8 +91,8 @@ services: volumes: - "beacon_node_follower_data:/chaindata" - type: bind - source: ./prysm/prysm-chain-config.yml - target: /config/prysm-chain-config.yml + source: ./shared/chain-config.yml + target: /config/chain-config.yml - type: bind source: ./prysm/run_beacon_node.sh target: /usr/local/bin/run_beacon_node.sh @@ -120,7 +120,7 @@ services: --interop-num-validators=4 --interop-start-index=0 --force-clear-db - --chain-config-file=/config/prysm-chain-config.yml + --chain-config-file=/config/chain-config.yml --suggested-fee-recipient 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b --enable-tracing --tracing-endpoint http://jaeger-tracing:14268/api/traces @@ -129,8 +129,8 @@ services: - "7500:7500" volumes: - type: bind - source: ./prysm/prysm-chain-config.yml - target: /config/prysm-chain-config.yml + source: ./shared/chain-config.yml + target: /config/chain-config.yml jaeger-tracing: image: jaegertracing/all-in-one:1.35 diff --git a/prysm/prysm-chain-config.yml b/prysm/prysm-chain-config.yml deleted file mode 100644 index d0740af..0000000 --- a/prysm/prysm-chain-config.yml +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG_NAME: "local" -ALTAIR_FORK_EPOCH: 1 -BELLATRIX_FORK_EPOCH: 2 -EIP4844_FORK_EPOCH: 3 # ensure this happens at exactly shardingForkBlock in execution -SECONDS_PER_SLOT: 6 -SLOTS_PER_EPOCH: 3 -TERMINAL_TOTAL_DIFFICULTY: 2 - -# avoid collisions with mainnet/eip4844 config versioning -GENESIS_FORK_VERSION: 0x00000ffe -ALTAIR_FORK_VERSION: 0x01000ffe -BELLATRIX_FORK_VERSION: 0x02000ffe -EIP4844_FORK_VERSION: 0x03000ffe - -DOMAIN_BLOBS_SIDECAR: 0x0a000000 diff --git a/prysm/run_beacon_node.sh b/prysm/run_beacon_node.sh index 3c2c34a..7c66219 100755 --- a/prysm/run_beacon_node.sh +++ b/prysm/run_beacon_node.sh @@ -32,7 +32,7 @@ beacon-node \ --interop-eth1data-votes \ --http-web3provider="$EXECUTION_NODE_URL" \ --deposit-contract 0x8A04d14125D0FDCDc742F4A05C051De07232EDa4 \ - --chain-config-file=/config/prysm-chain-config.yml \ + --chain-config-file=/config/chain-config.yml \ --contract-deployment-block 0 \ --interop-num-validators 4 \ --rpc-host 0.0.0.0 \ diff --git a/shared/chain-config.yml b/shared/chain-config.yml new file mode 100644 index 0000000..6e1c5c2 --- /dev/null +++ b/shared/chain-config.yml @@ -0,0 +1,64 @@ +PRESET_BASE: 'mainnet' +CONFIG_NAME: "local" + +ALTAIR_FORK_EPOCH: 1 +BELLATRIX_FORK_EPOCH: 2 +EIP4844_FORK_EPOCH: 3 # ensure this happens at exactly shardingForkBlock in execution +SECONDS_PER_SLOT: 6 +SLOTS_PER_EPOCH: 3 +TERMINAL_TOTAL_DIFFICULTY: 2 + +# avoid collisions with mainnet/eip4844 config versioning +GENESIS_FORK_VERSION: 0x00000ffe +ALTAIR_FORK_VERSION: 0x01000ffe +BELLATRIX_FORK_VERSION: 0x02000ffe +EIP4844_FORK_VERSION: 0x03000ffe + +DOMAIN_BLOBS_SIDECAR: 0x0a000000 + +# All missing values below (except for DEPOSIT_CONTRACT_ADDRESS) copied from mainnet + +# Genesis +# --------------------------------------------------------------- +# `2**14` (= 16,384) +MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384 +# Dec 1, 2020, 12pm UTC +MIN_GENESIS_TIME: 1606824000 +# 604800 seconds (7 days) +GENESIS_DELAY: 604800 + +# Time parameters +# --------------------------------------------------------------- +# 14 (estimate from Eth1 mainnet) +SECONDS_PER_ETH1_BLOCK: 14 +# 2**8 (= 256) epochs ~27 hours +MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256 +# 2**8 (= 256) epochs ~27 hours +SHARD_COMMITTEE_PERIOD: 256 +# 2**11 (= 2,048) Eth1 blocks ~8 hours +ETH1_FOLLOW_DISTANCE: 2048 + +# Validator cycle +# --------------------------------------------------------------- +# 2**2 (= 4) +INACTIVITY_SCORE_BIAS: 4 +# 2**4 (= 16) +INACTIVITY_SCORE_RECOVERY_RATE: 16 +# 2**4 * 10**9 (= 16,000,000,000) Gwei +EJECTION_BALANCE: 16000000000 +# 2**2 (= 4) +MIN_PER_EPOCH_CHURN_LIMIT: 4 +# 2**16 (= 65,536) +CHURN_LIMIT_QUOTIENT: 65536 + +# Fork choice +# --------------------------------------------------------------- +# 40% +PROPOSER_SCORE_BOOST: 40 + +# Deposit contract +# --------------------------------------------------------------- +# Ethereum PoW Mainnet +DEPOSIT_CHAIN_ID: 1 +DEPOSIT_NETWORK_ID: 1 +DEPOSIT_CONTRACT_ADDRESS: 0x8A04d14125D0FDCDc742F4A05C051De07232EDa4 diff --git a/shared/config.go b/shared/config.go index 363f346..18b87c3 100644 --- a/shared/config.go +++ b/shared/config.go @@ -27,7 +27,7 @@ func GethChainConfigFilepath() string { } func BeaconChainConfigFilepath() string { - return fmt.Sprintf("%s/prysm/prysm-chain-config.yml", GetBaseDir()) + return fmt.Sprintf("%s/shared/chain-config.yml", GetBaseDir()) } func UpdateChainConfig(config *params.ChainConfig) error {