2019-12-20 16:14:43 +00:00
|
|
|
# beacon_chain
|
2021-06-03 09:42:25 +00:00
|
|
|
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
2019-12-20 16:14:43 +00:00
|
|
|
# Licensed and distributed under either of
|
|
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
|
|
|
import
|
|
|
|
# Standard library
|
2020-06-03 05:42:08 +00:00
|
|
|
os, tables,
|
2019-12-20 16:14:43 +00:00
|
|
|
# Status libraries
|
2020-06-25 10:23:10 +00:00
|
|
|
confutils/defs, serialization, chronicles,
|
2019-12-20 16:14:43 +00:00
|
|
|
# Beacon-chain
|
2021-08-12 13:08:20 +00:00
|
|
|
../beacon_chain/spec/datatypes/[phase0],
|
2020-06-03 13:52:02 +00:00
|
|
|
../beacon_chain/spec/[
|
2021-10-12 11:36:52 +00:00
|
|
|
beaconstate, forks, helpers, state_transition, state_transition_block,
|
|
|
|
state_transition_epoch],
|
|
|
|
../tests/consensus_spec/fixtures_utils
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
# Nimbus Bench - Scenario configuration
|
|
|
|
# --------------------------------------------------
|
|
|
|
|
|
|
|
type
|
|
|
|
StartupCommand* = enum
|
|
|
|
noCommand
|
|
|
|
cmdFullStateTransition
|
|
|
|
cmdSlotProcessing
|
|
|
|
cmdBlockProcessing
|
|
|
|
cmdEpochProcessing
|
|
|
|
|
|
|
|
BlockProcessingCat* = enum
|
|
|
|
catBlockHeader
|
|
|
|
catRANDAO
|
|
|
|
catEth1Data
|
|
|
|
catProposerSlashings
|
|
|
|
catAttesterSlashings
|
|
|
|
catAttestations
|
|
|
|
catDeposits
|
|
|
|
catVoluntaryExits
|
|
|
|
|
2020-01-09 15:29:41 +00:00
|
|
|
EpochProcessingCat* = enum
|
|
|
|
catJustificationFinalization
|
|
|
|
catRegistryUpdates
|
|
|
|
catSlashings
|
|
|
|
# catRewardsPenalties # no upstream tests
|
|
|
|
|
2019-12-20 16:14:43 +00:00
|
|
|
ScenarioConf* = object
|
|
|
|
scenarioDir* {.
|
|
|
|
desc: "The directory of your benchmark scenario"
|
|
|
|
name: "scenario-dir"
|
|
|
|
abbr: "d"
|
|
|
|
required .}: InputDir
|
|
|
|
preState* {.
|
|
|
|
desc: "The name of your pre-state (without .ssz)"
|
|
|
|
name: "pre"
|
|
|
|
abbr: "p"
|
|
|
|
defaultValue: "pre".}: string
|
|
|
|
blocksPrefix* {.
|
|
|
|
desc: "The prefix of your blocks file, for exemple \"blocks_\" for blocks in the form \"blocks_XX.ssz\""
|
|
|
|
name: "blocks-prefix"
|
|
|
|
abbr: "b"
|
|
|
|
defaultValue: "blocks_".}: string
|
|
|
|
blocksQty* {.
|
|
|
|
desc: "The number of blocks to process for this transition. Blocks should start at 0."
|
|
|
|
name: "block-quantity"
|
|
|
|
abbr: "q"
|
|
|
|
defaultValue: 1.}: int
|
|
|
|
skipBLS*{.
|
|
|
|
desc: "Skip BLS public keys and signature verification"
|
|
|
|
name: "skip-bls"
|
|
|
|
defaultValue: true.}: bool
|
|
|
|
case cmd*{.
|
|
|
|
command
|
|
|
|
defaultValue: noCommand }: StartupCommand
|
|
|
|
of noCommand:
|
|
|
|
discard
|
|
|
|
of cmdFullStateTransition:
|
|
|
|
discard
|
|
|
|
of cmdSlotProcessing:
|
|
|
|
numSlots* {.
|
|
|
|
desc: "The number of slots the pre-state will be advanced by"
|
|
|
|
name: "num-slots"
|
|
|
|
abbr: "s"
|
|
|
|
defaultValue: 1.}: uint64
|
|
|
|
of cmdBlockProcessing:
|
|
|
|
case blockProcessingCat* {.
|
|
|
|
desc: "block transitions"
|
|
|
|
# name: "process-blocks" # Pending https://github.com/status-im/nim-confutils/issues/10
|
|
|
|
implicitlySelectable
|
|
|
|
required .}: BlockProcessingCat
|
|
|
|
of catBlockHeader:
|
|
|
|
blockHeader*{.
|
|
|
|
desc: "Block header filename (without .ssz)"
|
|
|
|
name: "block-header"
|
|
|
|
defaultValue: "block".}: string
|
|
|
|
of catRANDAO:
|
|
|
|
discard
|
|
|
|
of catEth1Data:
|
|
|
|
discard
|
|
|
|
of catProposerSlashings:
|
|
|
|
proposerSlashing*{.
|
|
|
|
desc: "Proposer slashing filename (without .ssz)"
|
|
|
|
name: "proposer-slashing"
|
|
|
|
defaultValue: "proposer_slashing".}: string
|
|
|
|
of catAttesterSlashings:
|
|
|
|
attesterSlashing*{.
|
|
|
|
desc: "Attester slashing filename (without .ssz)"
|
|
|
|
name: "attester-slashing"
|
|
|
|
defaultValue: "attester_slashing".}: string
|
|
|
|
of catAttestations:
|
|
|
|
attestation*{.
|
|
|
|
desc: "Attestation filename (without .ssz)"
|
|
|
|
name: "attestation"
|
|
|
|
defaultValue: "attestation".}: string
|
|
|
|
of catDeposits:
|
|
|
|
deposit*{.
|
|
|
|
desc: "Deposit filename (without .ssz)"
|
|
|
|
name: "deposit"
|
|
|
|
defaultValue: "deposit".}: string
|
|
|
|
of catVoluntaryExits:
|
|
|
|
voluntaryExit*{.
|
|
|
|
desc: "Voluntary Exit filename (without .ssz)"
|
|
|
|
name: "voluntary_exit"
|
|
|
|
defaultValue: "voluntary_exit".}: string
|
|
|
|
of cmdEpochProcessing:
|
2020-01-09 15:29:41 +00:00
|
|
|
epochProcessingCat*: EpochProcessingCat
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
proc parseSSZ(path: string, T: typedesc): T =
|
|
|
|
try:
|
2020-05-14 22:54:10 +00:00
|
|
|
when T is ref:
|
|
|
|
result = newClone(SSZ.loadFile(path, typeof(default(T)[])))
|
|
|
|
else:
|
|
|
|
result = SSZ.loadFile(path, T)
|
2019-12-20 16:14:43 +00:00
|
|
|
except SerializationError as err:
|
|
|
|
writeStackTrace()
|
|
|
|
stderr.write "SSZ load issue for file \"", path, "\"\n"
|
|
|
|
stderr.write err.formatMsg(path), "\n"
|
|
|
|
quit 1
|
2020-02-27 11:14:24 +00:00
|
|
|
except CatchableError:
|
2019-12-20 16:14:43 +00:00
|
|
|
writeStackTrace()
|
|
|
|
stderr.write "SSZ load issue for file \"", path, "\"\n"
|
|
|
|
quit 1
|
|
|
|
|
|
|
|
proc runFullTransition*(dir, preState, blocksPrefix: string, blocksQty: int, skipBLS: bool) =
|
|
|
|
let prePath = dir / preState & ".ssz"
|
2021-05-07 11:36:21 +00:00
|
|
|
var
|
|
|
|
cache = StateCache()
|
|
|
|
rewards = RewardInfo()
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
echo "Running: ", prePath
|
2021-06-11 17:51:46 +00:00
|
|
|
let state = (ref ForkedHashedBeaconState)(
|
2021-08-12 13:08:20 +00:00
|
|
|
hbsPhase0: phase0.HashedBeaconState(data: parseSSZ(prePath, phase0.BeaconState)),
|
2021-06-11 17:51:46 +00:00
|
|
|
beaconStateFork: forkPhase0
|
2020-05-14 22:54:10 +00:00
|
|
|
)
|
2021-06-17 17:13:14 +00:00
|
|
|
setStateRoot(state[], hash_tree_root(state[]))
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
for i in 0 ..< blocksQty:
|
|
|
|
let blockPath = dir / blocksPrefix & $i & ".ssz"
|
|
|
|
echo "Processing: ", blockPath
|
|
|
|
|
2021-08-12 13:08:20 +00:00
|
|
|
let signedBlock = parseSSZ(blockPath, phase0.SignedBeaconBlock)
|
2020-03-05 12:52:10 +00:00
|
|
|
let flags = if skipBLS: {skipBlsValidation}
|
2019-12-20 16:14:43 +00:00
|
|
|
else: {}
|
2020-04-26 19:13:33 +00:00
|
|
|
let success = state_transition(
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
defaultRuntimeConfig, state[], signedBlock, cache, rewards, flags,
|
|
|
|
noRollback)
|
2019-12-20 16:14:43 +00:00
|
|
|
echo "State transition status: ", if success: "SUCCESS ✓" else: "FAILURE ⚠️"
|
|
|
|
|
|
|
|
proc runProcessSlots*(dir, preState: string, numSlots: uint64) =
|
2021-05-07 11:36:21 +00:00
|
|
|
var
|
|
|
|
cache = StateCache()
|
|
|
|
rewards = RewardInfo()
|
2019-12-20 16:14:43 +00:00
|
|
|
let prePath = dir / preState & ".ssz"
|
|
|
|
|
|
|
|
echo "Running: ", prePath
|
2021-06-11 17:51:46 +00:00
|
|
|
let state = (ref ForkedHashedBeaconState)(
|
2021-08-12 13:08:20 +00:00
|
|
|
hbsPhase0: phase0.HashedBeaconState(
|
|
|
|
data: parseSSZ(prePath, phase0.BeaconState)),
|
2021-06-11 17:51:46 +00:00
|
|
|
beaconStateFork: forkPhase0)
|
2021-06-17 17:13:14 +00:00
|
|
|
setStateRoot(state[], hash_tree_root(state[]))
|
2019-12-20 16:14:43 +00:00
|
|
|
|
2020-05-19 15:46:29 +00:00
|
|
|
# Shouldn't necessarily assert, because nbench can run test suite
|
2021-06-11 17:51:46 +00:00
|
|
|
discard process_slots(
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
defaultRuntimeConfig, state[], getStateField(state[], slot) + numSlots,
|
|
|
|
cache, rewards, {})
|
2019-12-20 16:14:43 +00:00
|
|
|
|
2020-01-09 15:29:41 +00:00
|
|
|
template processEpochScenarioImpl(
|
|
|
|
dir, preState: string,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
transitionFn: untyped): untyped =
|
2020-01-09 15:29:41 +00:00
|
|
|
let prePath = dir/preState & ".ssz"
|
|
|
|
|
|
|
|
echo "Running: ", prePath
|
2021-08-12 13:08:20 +00:00
|
|
|
type T = phase0.BeaconState
|
|
|
|
let state = (ref phase0.HashedBeaconState)(
|
|
|
|
data: parseSSZ(prePath, T)
|
2020-05-14 22:54:10 +00:00
|
|
|
)
|
|
|
|
state.root = hash_tree_root(state.data)
|
2020-01-09 15:29:41 +00:00
|
|
|
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
var cache {.used.} = StateCache()
|
|
|
|
when compiles(transitionFn(defaultRuntimeConfig, state.data, cache)):
|
|
|
|
transitionFn(defaultRuntimeConfig, state.data, cache)
|
|
|
|
elif compiles(transitionFn(state.data, cache)):
|
2020-05-14 22:54:10 +00:00
|
|
|
transitionFn(state.data, cache)
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
elif compiles(transitionFn(state.data)):
|
2020-05-14 22:54:10 +00:00
|
|
|
transitionFn(state.data)
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
else:
|
|
|
|
transitionFn(defaultRuntimeConfig, state.data)
|
2020-01-09 15:29:41 +00:00
|
|
|
|
|
|
|
echo astToStr(transitionFn) & " status: ", "Done" # if success: "SUCCESS ✓" else: "FAILURE ⚠️"
|
|
|
|
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
template genProcessEpochScenario(name, transitionFn: untyped): untyped =
|
2020-01-09 15:29:41 +00:00
|
|
|
proc `name`*(dir, preState: string) =
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
processEpochScenarioImpl(dir, preState, transitionFn)
|
2020-01-09 15:29:41 +00:00
|
|
|
|
2021-08-12 13:08:20 +00:00
|
|
|
proc process_deposit(state: var phase0.BeaconState;
|
2020-07-08 12:36:03 +00:00
|
|
|
deposit: Deposit;
|
|
|
|
flags: UpdateFlags = {}): Result[void, cstring] =
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
process_deposit(defaultRuntimeConfig, state, deposit, flags)
|
2020-07-07 23:02:14 +00:00
|
|
|
|
2020-01-09 15:29:41 +00:00
|
|
|
template processBlockScenarioImpl(
|
2019-12-20 16:14:43 +00:00
|
|
|
dir, preState: string, skipBLS: bool,
|
|
|
|
transitionFn, paramName: untyped,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
ConsensusObjectRefType: typedesc): untyped =
|
2019-12-20 16:14:43 +00:00
|
|
|
let prePath = dir/preState & ".ssz"
|
|
|
|
|
|
|
|
echo "Running: ", prePath
|
2021-08-12 13:08:20 +00:00
|
|
|
type T = phase0.BeaconState
|
|
|
|
let state = (ref phase0.HashedBeaconState)(
|
|
|
|
data: parseSSZ(prePath, T)
|
2020-05-14 22:54:10 +00:00
|
|
|
)
|
|
|
|
state.root = hash_tree_root(state.data)
|
2019-12-20 16:14:43 +00:00
|
|
|
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
var cache {.used.} = StateCache()
|
|
|
|
let flags {.used.} = if skipBLS: {skipBlsValidation}
|
|
|
|
else: {}
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
let consObjPath = dir/paramName & ".ssz"
|
|
|
|
echo "Processing: ", consObjPath
|
2020-04-23 18:58:54 +00:00
|
|
|
var consObj = parseSSZ(consObjPath, ConsensusObjectRefType)
|
2019-12-20 16:14:43 +00:00
|
|
|
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
when compiles(transitionFn(state.data, consObj[], flags, cache)):
|
2020-07-03 17:03:14 +00:00
|
|
|
let success = transitionFn(state.data, consObj[], flags, cache).isOk
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
elif compiles(transitionFn(defaultRuntimeConfig, state.data, consObj[], flags, cache)):
|
|
|
|
let success = transitionFn(defaultRuntimeConfig, state.data, consObj[], flags, cache).isOk
|
|
|
|
elif compiles(transitionFn(state.data, consObj[], flags)):
|
2020-07-03 17:03:14 +00:00
|
|
|
let success = transitionFn(state.data, consObj[], flags).isOk
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
elif compiles(transitionFn(state, consObj[], flags, cache)):
|
2020-07-03 17:03:14 +00:00
|
|
|
let success = transitionFn(state, consObj[], flags, cache).isOk
|
2019-12-20 16:14:43 +00:00
|
|
|
else:
|
2020-07-03 17:03:14 +00:00
|
|
|
let success = transitionFn(state, consObj[]).isOk
|
2019-12-20 16:14:43 +00:00
|
|
|
|
|
|
|
echo astToStr(transitionFn) & " status: ", if success: "SUCCESS ✓" else: "FAILURE ⚠️"
|
|
|
|
|
2020-04-23 18:58:54 +00:00
|
|
|
template genProcessBlockScenario(name, transitionFn,
|
|
|
|
paramName: untyped,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
ConsensusObjectType: typedesc): untyped =
|
|
|
|
proc `name`*(dir, preState, `paramName`: string, skipBLS: bool) =
|
|
|
|
processBlockScenarioImpl(dir, preState, skipBLS, transitionFn, paramName, ref ConsensusObjectType)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessEpochScenario(runProcessJustificationFinalization,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
process_justification_and_finalization)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessEpochScenario(runProcessRegistryUpdates,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
process_registry_updates)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessEpochScenario(runProcessSlashings,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
process_slashings)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessBlockScenario(runProcessBlockHeader,
|
|
|
|
process_block_header,
|
|
|
|
block_header,
|
2021-08-12 13:08:20 +00:00
|
|
|
phase0.BeaconBlock)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessBlockScenario(runProcessProposerSlashing,
|
|
|
|
process_proposer_slashing,
|
|
|
|
proposer_slashing,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
ProposerSlashing)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
2021-07-06 06:19:06 +00:00
|
|
|
template do_process_attestation(state, operation, flags, cache: untyped):
|
|
|
|
untyped =
|
|
|
|
process_attestation(state, operation, flags, 0.Gwei, cache)
|
2020-04-23 18:58:54 +00:00
|
|
|
genProcessBlockScenario(runProcessAttestation,
|
2021-07-06 06:19:06 +00:00
|
|
|
do_process_attestation,
|
2020-04-23 18:58:54 +00:00
|
|
|
attestation,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
Attestation)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessBlockScenario(runProcessAttesterSlashing,
|
|
|
|
process_attester_slashing,
|
|
|
|
att_slash,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
AttesterSlashing)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessBlockScenario(runProcessDeposit,
|
|
|
|
process_deposit,
|
|
|
|
deposit,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
Deposit)
|
2020-04-23 18:58:54 +00:00
|
|
|
|
|
|
|
genProcessBlockScenario(runProcessVoluntaryExits,
|
|
|
|
process_voluntary_exit,
|
|
|
|
deposit,
|
Implement split preset/config support (#2710)
* Implement split preset/config support
This is the initial bulk refactor to introduce runtime config values in
a number of places, somewhat replacing the existing mechanism of loading
network metadata.
It still needs more work, this is the initial refactor that introduces
runtime configuration in some of the places that need it.
The PR changes the way presets and constants work, to match the spec. In
particular, a "preset" now refers to the compile-time configuration
while a "cfg" or "RuntimeConfig" is the dynamic part.
A single binary can support either mainnet or minimal, but not both.
Support for other presets has been removed completely (can be readded,
in case there's need).
There's a number of outstanding tasks:
* `SECONDS_PER_SLOT` still needs fixing
* loading custom runtime configs needs redoing
* checking constants against YAML file
* yeerongpilly support
`build/nimbus_beacon_node --network=yeerongpilly --discv5:no --log-level=DEBUG`
* load fork epoch from config
* fix fork digest sent in status
* nicer error string for request failures
* fix tools
* one more
* fixup
* fixup
* fixup
* use "standard" network definition folder in local testnet
Files are loaded from their standard locations, including genesis etc,
to conform to the format used in the `eth2-networks` repo.
* fix launch scripts, allow unknown config values
* fix base config of rest test
* cleanups
* bundle mainnet config using common loader
* fix spec links and names
* only include supported preset in binary
* drop yeerongpilly, add altair-devnet-0, support boot_enr.yaml
2021-07-12 13:01:38 +00:00
|
|
|
SignedVoluntaryExit)
|