nimbus-eth2/beacon_chain/rpc
Etan Kissling 3a92bf3914
use dependent root as `execution_optimistic` basis for duties (#4955)
The validator beacon APIs `getAttesterDuties`, `getProposerDuties`, and
`getSyncCommitteeDuties`, have reported the `execution_optimistic`
state for the current head block. This can lead to a race if duties are
requested around the slot start, if a new head block is currently being
processed by the EL, during which the BN head may be briefly optimistic.

`execution_optimistic` is documented in beacon APIs as:

> True if the response references an unverified execution payload.
> Optimistic information may be invalidated at a later time.
> If the field is not present, assume the False value.

As the duty endpoints reference the shuffling dependent root instead of
the currently selected head block, `execution_optimistic` is now fetched
based on that shuffling dependent block root. As this dependent block is
in the past it doesn't usually become optimistic when adding new blocks.

Note that the endpoints requested 4/8 seconds into the slot that perform
the actual duties instead of just querying for duty schedule, still
report `execution_optimistic` based on the BN head block.
2023-05-15 23:42:42 +03:00
..
rest_api.nim remove Nim 1.2-compatible `push raise`s and update copyright notice years (#4528) 2023-01-20 14:14:37 +00:00
rest_beacon_api.nim update some beacon API spec URLs; fix some Name and DuplicateModuleImport hints (#4929) 2023-05-10 10:20:55 +00:00
rest_config_api.nim add Capella constants to REST config endpoint (#4925) 2023-05-11 12:53:02 +02:00
rest_constants.nim web3signer refactoring and test suite. (#4775) 2023-04-06 16:16:21 +03:00
rest_debug_api.nim clean up redundant tests and config (#4836) 2023-04-18 21:26:36 +02:00
rest_event_api.nim remove Nim 1.2-compatible `push raise`s and update copyright notice years (#4528) 2023-01-20 14:14:37 +00:00
rest_key_management_api.nim Implement the set of gas_limit end-points in the Keymanager API (#4612) 2023-02-15 15:10:31 +00:00
rest_light_client_api.nim rename `(with|at)StateFork` > `(with|at)ConsensusFork` (#4725) 2023-03-11 14:39:29 +00:00
rest_nimbus_api.nim Rename eth1/ -> el/ and eth1_monitor.nim -> el_monitor.nim (#4944) 2023-05-15 05:05:12 +00:00
rest_node_api.nim add `el_offline` to `/eth/v1/node/syncing` (#4860) 2023-04-27 10:47:38 +02:00
rest_utils.nim use dependent root as `execution_optimistic` basis for duties (#4955) 2023-05-15 23:42:42 +03:00
rest_validator_api.nim use dependent root as `execution_optimistic` basis for duties (#4955) 2023-05-15 23:42:42 +03:00
state_ttl_cache.nim Prune `BlockRef` on finalization (#3513) 2022-03-17 17:42:56 +00:00