nimbus-eth2/beacon_chain
Etan Kissling 65e6f892de
fix checkpoint block potentially not getting backfilled into DB (#5863)
When using checkpoint sync, only checkpoint state is available, block is
not downloaded and backfilled later.

`dag.backfill` tracks latest filled `slot`, and latest `parent_root` for
which no block has been synced yet.

In checkpoint sync, this assumption is broken, because there, the start
`dag.backfill.slot` is set based on checkpoint state slot, and the block
is also not available.

However, sync manager in backward mode also requests `dag.backfill.slot`
and `block_clearance` then backfills the checkpoint block once it is
synced. But, there is no guarantee that a peer ever sends us that block.
They could send us all parent blocks and solely omit the checkpoint
block itself. In that situation, we would accept the parent blocks and
advance `dag.backfill`, and subsequently never request the checkpoint
block again, resulting in gap inside blocks DB that is never filled.

To mitigate that, the assumption is restored that `dag.backfill.slot`
is the latest filled `slot`, and `dag.backfill.parent_root` is the next
block that needs to be synced. By setting `slot` to `tail.slot + 1` and
`parent_root` to `tail.root`, we put a fake summary into `dag.backfill`
so that `block_clearance` only proceeds once checkpoint block exists.
2024-02-09 11:20:36 +01:00
..
consensus_object_pools fix checkpoint block potentially not getting backfilled into DB (#5863) 2024-02-09 11:20:36 +01:00
el raises for beacon validators & router (#5826) 2024-02-07 12:26:04 +01:00
fork_choice automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
gossip_processing `...ExecutionPayloadHash` --> `...ExecutionBlockHash` (#5864) 2024-02-08 01:24:55 +01:00
libnimbus_lc automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
networking bump `eth2-networks` to `934c948e69205dcf2deb87e4ae6cc140c335f94d` (#5868) 2024-02-08 19:18:35 +00:00
rpc Clean up debug/heads v2 types (#5859) 2024-02-07 17:51:12 +01:00
spec Clean up debug/heads v2 types (#5859) 2024-02-07 17:51:12 +01:00
sync unrevert rest of https://github.com/status-im/nimbus-eth2/pull/5765 (#5867) 2024-02-09 09:35:41 +01:00
validator_client Address issues #5675 and #5681. (#5846) 2024-02-07 19:51:36 +00:00
validators `...ExecutionPayloadHash` --> `...ExecutionBlockHash` (#5864) 2024-02-08 01:24:55 +01:00
.editorconfig
.gitignore
beacon_chain_db.nim fix checkpoint block potentially not getting backfilled into DB (#5863) 2024-02-09 11:20:36 +01:00
beacon_chain_db_immutable.nim automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00: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 make constants 64-bit portably (#5755) 2024-01-16 02:26:18 +01:00
beacon_node.nim implement blob_sidecar Beacon API streaming (#5728) 2024-01-13 11:52:13 +02:00
beacon_node_light_client.nim `...ExecutionPayloadHash` --> `...ExecutionBlockHash` (#5864) 2024-02-08 01:24:55 +01:00
beacon_node_status.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
conf.nim rm some unnecessary stew/shims/net imports to reduce deprecation warnings (#5806) 2024-01-20 16:42:19 +00: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 automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
era_db.nim Split era specific code from e2s specific code (#5866) 2024-02-09 08:59:36 +01: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 fix checkpoint block potentially not getting backfilled into DB (#5863) 2024-02-09 11:20:36 +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 update some deprecated stew/results to results imports (#5743) 2024-01-16 22:37:14 +00:00
nimbus_signing_node.nim.cfg
nimbus_validator_client.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01: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 automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
statusbar.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
trusted_node_sync.nim fix checkpoint block potentially not getting backfilled into DB (#5863) 2024-02-09 11:20:36 +01:00
version.nim Version v24.2.0 2024-02-02 02:05:56 +02:00
wallets.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
winservice.nim Dissect Windows specific code from beacon node. (#5612) 2024-01-13 12:53:53 +02:00