2018-11-29 05:23:40 +00:00
|
|
|
# beacon_chain
|
2023-01-20 14:14:37 +00:00
|
|
|
# Copyright (c) 2018-2023 Status Research & Development GmbH
|
2018-11-29 05:23:40 +00:00
|
|
|
# Licensed and distributed under either of
|
2019-11-25 15:30:02 +00:00
|
|
|
# * 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).
|
2018-11-29 05:23:40 +00:00
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
2023-01-20 14:14:37 +00:00
|
|
|
{.push raises: [].}
|
2020-04-22 05:53:02 +00:00
|
|
|
|
2018-11-29 05:23:40 +00:00
|
|
|
# Temporary dumping ground for extra types and helpers that could make it into
|
|
|
|
# the spec potentially
|
2020-03-05 12:52:10 +00:00
|
|
|
#
|
|
|
|
# The `skipXXXValidation` flags are used to skip over certain checks that are
|
|
|
|
# normally done when an untrusted block arrives from the network. The
|
|
|
|
# primary use case for this flag is when a proposer must propose a new
|
|
|
|
# block - in order to do so, it needs to update the state as if the block
|
|
|
|
# was valid, before it can sign it. Also useful for some testing, fuzzing with
|
|
|
|
# improved coverage, and to avoid unnecessary validation when replaying trusted
|
|
|
|
# (previously validated) blocks.
|
2018-11-29 05:23:40 +00:00
|
|
|
|
2018-12-27 23:40:22 +00:00
|
|
|
type
|
|
|
|
UpdateFlag* = enum
|
2020-03-05 12:52:10 +00:00
|
|
|
skipBlsValidation ##\
|
|
|
|
## Skip verification of BLS signatures in block processing.
|
|
|
|
## Predominantly intended for use in testing, e.g. to allow extra coverage.
|
|
|
|
## Also useful to avoid unnecessary work when replaying known, good blocks.
|
|
|
|
skipStateRootValidation ##\
|
|
|
|
## Skip verification of block state root.
|
2022-07-13 13:48:09 +00:00
|
|
|
strictVerification ##\
|
|
|
|
## Strictly assert on unexpected conditions to aid debugging.
|
|
|
|
## Should not be used in production, as additional asserts are reachable.
|
2020-08-18 20:29:33 +00:00
|
|
|
slotProcessed ##\
|
|
|
|
## Allow blocks to be applied to states with the same slot number as the
|
|
|
|
## block which is what happens when `process_block` is called separately
|
2021-06-11 17:51:46 +00:00
|
|
|
skipLastStateRootCalculation ##\
|
|
|
|
## When process_slots() is being called as part of a state_transition(),
|
|
|
|
## the hash_tree_root() from the block will fill in the state.root so it
|
|
|
|
## should skip calculating that last state root.
|
2023-01-31 12:35:01 +00:00
|
|
|
experimental ##\
|
|
|
|
## Whether to enable extra features in development.
|
2022-06-24 14:57:50 +00:00
|
|
|
enableTestFeatures ##\
|
|
|
|
## Whether to enable extra features for testing.
|
2018-12-27 23:40:22 +00:00
|
|
|
|
|
|
|
UpdateFlags* = set[UpdateFlag]
|