The name `get_safe_execution_payload_hash` is misleading, as it returns
the execution block hash. There is no concept of a payload hash. Rename
the function, and also update some documentation for clarity.
* Moved configuration into network preset instead of constants.
Now that `MAX_CHUNK_SIZE` and `GOSSIP_MAX_SIZE` are in configuration, we no longer need separate constants to represent them in the spec when they change in Bellatrix.
I've changed the usage, and put the values into the presets, but I'm not sure if I've updated the descriptions in the best way...
This is following on from the work in #3375 where a number of constants got moved into configuration, so we no longer need these constants to be separately represented, they can simply be updated in presets.
* Update presets/minimal/bellatrix.yaml
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update presets/mainnet/bellatrix.yaml
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Moved preset items into the correct section and updated TOC.
It looked like the items listed in configuration about the max size and chunk size were no longer needed since we're updating preset values now and the preset changes seem to only be listed in the changes at the top.
* review feedback
* hopefully correct this time! Moved the 2 fields from configs into presets completely as suggested.
* WIP - changing back to being in config and updating the phase 0 value... I think this should be close but want to see what's outstanding.
* fix intellij's formatting of table.
* more fixes
---------
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Remove the work-in-progress note in Bellatrix spec
Bellatrix is done and released.
* Remove work-in-progress notes in Bellatrix specs
* Remove work-in-progress notes in Bellatrix specs
* Remove work-in-progress notes in Bellatrix specs
The `fork_version` field in `LightClientUpdate` can be derived from the
`update.signature_slot` value by consulting the locally configured fork
schedule. The light client already needs access to the fork schedule to
determine the `GeneralizedIndex` values used for merkle proofs, and the
memory layouts of the structures (including `LightClientUpdate`). The
`fork_version` itself is network dependent and doesn't reveal that info.
Documentation on how to call `prepare_execution_payload` had the params
for `safe_block_hash` and `finalized_block` hash flipped compared to the
function definition. Also updated tests for consistency.