remove 4 more missing constants in preset handling warning (#5428)
This commit is contained in:
parent
bb8584c58a
commit
7a001d4896
|
@ -2258,9 +2258,7 @@ func gossipId(
|
||||||
data: openArray[byte], phase0Prefix, topic: string): seq[byte] =
|
data: openArray[byte], phase0Prefix, topic: string): seq[byte] =
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/phase0/p2p-interface.md#topics-and-messages
|
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/phase0/p2p-interface.md#topics-and-messages
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/altair/p2p-interface.md#topics-and-messages
|
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/altair/p2p-interface.md#topics-and-messages
|
||||||
const
|
const MESSAGE_DOMAIN_VALID_SNAPPY = [0x01'u8, 0x00, 0x00, 0x00]
|
||||||
MESSAGE_DOMAIN_INVALID_SNAPPY = [0x00'u8, 0x00, 0x00, 0x00]
|
|
||||||
MESSAGE_DOMAIN_VALID_SNAPPY = [0x01'u8, 0x00, 0x00, 0x00]
|
|
||||||
let messageDigest = withEth2Hash:
|
let messageDigest = withEth2Hash:
|
||||||
h.update(MESSAGE_DOMAIN_VALID_SNAPPY)
|
h.update(MESSAGE_DOMAIN_VALID_SNAPPY)
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,12 @@ const
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/p2p-interface.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/p2p-interface.md#configuration
|
||||||
MAX_REQUEST_BLOCKS* = 1024'u64
|
MAX_REQUEST_BLOCKS* = 1024'u64
|
||||||
RESP_TIMEOUT* = 10
|
RESP_TIMEOUT* = 10'u64
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/bellatrix/p2p-interface.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/bellatrix/p2p-interface.md#configuration
|
||||||
GOSSIP_MAX_SIZE* = 10'u64 * 1024 * 1024 # bytes
|
GOSSIP_MAX_SIZE* = 10'u64 * 1024 * 1024 # bytes
|
||||||
MAX_CHUNK_SIZE* = 10'u64 * 1024 * 1024 # bytes
|
MAX_CHUNK_SIZE* = 10'u64 * 1024 * 1024 # bytes
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/deneb/p2p-interface.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/deneb/p2p-interface.md#configuration
|
||||||
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS* = 4096'u64
|
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS*: uint64 = 4096
|
||||||
|
MAX_REQUEST_BLOCKS_DENEB*: uint64 = 128 # TODO Make use of in request code
|
||||||
|
|
|
@ -23,16 +23,16 @@ const
|
||||||
topicAggregateAndProofsSuffix* = "beacon_aggregate_and_proof/ssz_snappy"
|
topicAggregateAndProofsSuffix* = "beacon_aggregate_and_proof/ssz_snappy"
|
||||||
topicBlsToExecutionChangeSuffix* = "bls_to_execution_change/ssz_snappy"
|
topicBlsToExecutionChangeSuffix* = "bls_to_execution_change/ssz_snappy"
|
||||||
|
|
||||||
# The spec now includes this as a bare integer as `RESP_TIMEOUT`
|
const
|
||||||
RESP_TIMEOUT_DUR* = RESP_TIMEOUT.seconds
|
# The spec now includes this as a bare uint64 as `RESP_TIMEOUT`
|
||||||
|
RESP_TIMEOUT_DUR* = RESP_TIMEOUT.int64.seconds
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/altair/light-client/p2p-interface.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/altair/light-client/p2p-interface.md#configuration
|
||||||
MAX_REQUEST_LIGHT_CLIENT_UPDATES* = 128
|
MAX_REQUEST_LIGHT_CLIENT_UPDATES* = 128
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/deneb/p2p-interface.md#configuration
|
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/deneb/p2p-interface.md#configuration
|
||||||
MAX_REQUEST_BLOCKS_DENEB* = 128 # TODO Make use of in request code
|
MAX_REQUEST_BLOB_SIDECARS*: uint64 =
|
||||||
MAX_REQUEST_BLOB_SIDECARS* = MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
|
MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
|
||||||
# TODO MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
|
|
||||||
|
|
||||||
defaultEth2TcpPort* = 9000
|
defaultEth2TcpPort* = 9000
|
||||||
defaultEth2TcpPortDesc* = $defaultEth2TcpPort
|
defaultEth2TcpPortDesc* = $defaultEth2TcpPort
|
||||||
|
|
|
@ -23,7 +23,11 @@ const
|
||||||
|
|
||||||
# Constants from `validator.md` not covered by config/presets in the spec
|
# Constants from `validator.md` not covered by config/presets in the spec
|
||||||
TARGET_AGGREGATORS_PER_COMMITTEE*: uint64 = 16
|
TARGET_AGGREGATORS_PER_COMMITTEE*: uint64 = 16
|
||||||
|
|
||||||
|
# Not used anywhere; only for network preset checking
|
||||||
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION: uint64 = 256
|
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION: uint64 = 256
|
||||||
|
MESSAGE_DOMAIN_INVALID_SNAPPY = 0'u64
|
||||||
|
TTFB_TIMEOUT = 5'u64
|
||||||
|
|
||||||
type
|
type
|
||||||
Version* = distinct array[4, byte]
|
Version* = distinct array[4, byte]
|
||||||
|
@ -591,6 +595,10 @@ proc readRuntimeConfig*(
|
||||||
checkCompatibility ATTESTATION_SUBNET_PREFIX_BITS
|
checkCompatibility ATTESTATION_SUBNET_PREFIX_BITS
|
||||||
checkCompatibility BLOB_SIDECAR_SUBNET_COUNT
|
checkCompatibility BLOB_SIDECAR_SUBNET_COUNT
|
||||||
checkCompatibility MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
|
checkCompatibility MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
|
||||||
|
checkCompatibility RESP_TIMEOUT
|
||||||
|
checkCompatibility TTFB_TIMEOUT
|
||||||
|
checkCompatibility MESSAGE_DOMAIN_INVALID_SNAPPY
|
||||||
|
checkCompatibility MAX_REQUEST_BLOCKS_DENEB
|
||||||
|
|
||||||
# Isn't being used as a preset in the usual way: at any time, there's one correct value
|
# Isn't being used as a preset in the usual way: at any time, there's one correct value
|
||||||
checkCompatibility PROPOSER_SCORE_BOOST
|
checkCompatibility PROPOSER_SCORE_BOOST
|
||||||
|
|
Loading…
Reference in New Issue