nimbus-eth2/beacon_chain
Etan Kissling 66a9304fea
use separate state when catching up to perform validator duties (#6131)
There are situations where all states in the `blockchain_dag` are
occupied and cannot be borrowed.

- headState: Many assumptions in the code that it cannot be advanced
- clearanceState: Resets every time a new block gets imported, including
  blocks from non-canonical branches
- epochRefState: Used even more frequently than clearanceState

This means that during the catch-up mechanic where the head state is
slowly advanced to wall clock to catch up on validator duties in the
situation where the canonical head is way behind non-canonical heads,
we cannot use any of the three existing states. In that situation,
Nimbus already consumes an increased amount of memory due to all the
`BlockRef`, fork choice states and so on, so experience is degraded.
It seems reasonable to allocate a fourth state temporarily during that
mechanic, until a new proposal could be made on the canonical chain.

Note that currently, on `unstable`, proposals _do_ happen every couple
hours because sync manager doesn't manage to discover additional heads
in a split-view scenario on Goerli. However, with the branch discovery
module, new blocks are discovered all the time, and the clearanceState
may no longer be borrowed as it is reset to different branch too often.

The extra state could also find other uses in the future, e.g., for
incremental computations as in reindexing the database, or online
collection of historical light client data.
2024-03-24 07:18:33 +01:00
..
consensus_object_pools use separate state when catching up to perform validator duties (#6131) 2024-03-24 07:18:33 +01:00
el Bump nim-web3 to 285d97c2b05bbe2a13dab4b52ea878157fb1a1a1 (#6106) 2024-03-20 14:39:12 +07:00
fork_choice make `Gwei` `distinct` (#6090) 2024-03-19 14:22:07 +01:00
gossip_processing ensure blobs are quarantined when block is quarantined (#6127) 2024-03-24 04:56:30 +01:00
libnimbus_lc automated consensus spec URL updating to v1.4.0 (#6074) 2024-03-14 07:26:36 +01:00
networking descore when opening connection fails, same as when reading fails (#6130) 2024-03-24 05:37:47 +01:00
rpc make `Gwei` `distinct` (#6090) 2024-03-19 14:22:07 +01:00
spec make `Gwei` `distinct` (#6090) 2024-03-19 14:22:07 +01:00
sync enqueue missing parent block if stored in local DB (#6122) 2024-03-22 14:35:46 +01:00
validator_client VC: Refactor some timing code around sync committee processing (#6073) 2024-03-22 02:37:44 +00:00
validators use separate state when catching up to perform validator duties (#6131) 2024-03-24 07:18:33 +01:00
.editorconfig Add .editorconfig file and remove trailing newlines 2021-09-14 12:12:49 +03:00
.gitignore Rename binaries; Mimic the original repo layout in the distribution 2020-11-09 11:38:52 +02:00
beacon_chain_db.nim rename `DepositTreeSnapshot` -> `DepositContractSnapshot` (#6036) 2024-03-07 18:42:52 +01:00
beacon_chain_db_immutable.nim make `Gwei` `distinct` (#6090) 2024-03-19 14:22:07 +01:00
beacon_chain_db_light_client.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
beacon_clock.nim add metric for database checkpoint duration (#5897) 2024-02-19 11:00:11 +01:00
beacon_node.nim make `Gwei` `distinct` (#6090) 2024-03-19 14:22:07 +01:00
beacon_node_light_client.nim Revert "initial Electra support skeleton" (#5955) 2024-02-25 19:42:44 +00:00
beacon_node_status.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
bloomfilter.nim Bloom filter acceleration for deposit processing (#5982) 2024-03-07 23:38:24 +00:00
conf.nim Revert "Revert "Set default localBlockValueBoost to 10 (#6103)" (#6118)" (#6126) 2024-03-23 10:17:29 +01:00
conf_common.nim Dissect Windows specific code from beacon node. (#5612) 2024-01-13 12:53:53 +02:00
conf_light_client.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
db_limits.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
deposits.nim fix some styleCheck hints (#6016) 2024-03-03 02:04:45 +01:00
era_db.nim Revert "initial Electra support skeleton" (#5955) 2024-02-25 19:42:44 +00:00
extras.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
filepath.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
future_combinators.nim BN+LC+SN: Fix cancellation deprecate warnings. (#5455) 2023-09-22 11:06:27 +00:00
light_client.nim raises for gossip (#5808) 2024-01-22 17:34:54 +01:00
light_client_db.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
nim.cfg chronos: bump (#5684) 2024-01-05 10:08:38 +01:00
nimbus_beacon_node.nim use separate state when catching up to perform validator duties (#6131) 2024-03-24 07:18:33 +01:00
nimbus_beacon_node.nim.cfg remove `news` leftovers (#4299) 2022-11-08 20:06:54 +00:00
nimbus_binary_common.nim Dissect Windows specific code from beacon node. (#5612) 2024-01-13 12:53:53 +02:00
nimbus_light_client.nim raises for gossip (#5808) 2024-01-22 17:34:54 +01:00
nimbus_light_client.nim.cfg remove `news` leftovers (#4299) 2022-11-08 20:06:54 +00:00
nimbus_signing_node.nim rm Web3Signer Bellatrix block support (#6061) 2024-03-11 22:09:31 +00:00
nimbus_signing_node.nim.cfg Revert writing backfill root to database (#3215) 2021-12-21 11:40:14 +01:00
nimbus_validator_client.nim Add Keymanager API graffiti endpoints. (#6054) 2024-03-14 03:44:00 +00:00
nimbus_validator_client.nim.cfg remove `news` leftovers (#4299) 2022-11-08 20:06:54 +00:00
sszdump.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
statediff.nim Shared validator pubkey (#5883) 2024-02-21 20:06:19 +01:00
statusbar.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
trusted_node_sync.nim automated consensus spec URL updating to v1.4.0 (#6074) 2024-03-14 07:26:36 +01:00
version.nim Version v24.2.2 2024-02-27 03:24:30 +02:00
wallets.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
winservice.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00