From c9f59083a4a718c137032aae5823176f3f0b0fc9 Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 06:11:45 +0000 Subject: [PATCH 01/11] bump nim-chronicles for clang 15/16 workaround (#6137) --- vendor/nim-chronicles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-chronicles b/vendor/nim-chronicles index ab3ab545b..5b79c5ed5 160000 --- a/vendor/nim-chronicles +++ b/vendor/nim-chronicles @@ -1 +1 @@ -Subproject commit ab3ab545be0b550cca1c2529f7e97fbebf5eba81 +Subproject commit 5b79c5ed5e460b19d8d8afc241b5f5a02de628a6 From 21daaad754a788e80559b3e248821fbc95504425 Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 21:47:42 +0000 Subject: [PATCH 02/11] support special characters in network metadata paths (#6141) --- beacon_chain/networking/network_metadata.nim | 17 ++++++++--------- env.sh | 11 ++++++++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/beacon_chain/networking/network_metadata.nim b/beacon_chain/networking/network_metadata.nim index 1ae6df5ad..40866cf09 100644 --- a/beacon_chain/networking/network_metadata.nim +++ b/beacon_chain/networking/network_metadata.nim @@ -8,7 +8,7 @@ {.push raises: [].} import - std/[sequtils, strutils, os], + std/os, stew/[byteutils, objects], stew/shims/macros, nimcrypto/hash, web3/[conversions], web3/primitives as web3types, @@ -16,6 +16,11 @@ import eth/common/eth_types_json_serialization, ../spec/[eth2_ssz_serialization, forks] +from std/sequtils import deduplicate, filterIt, mapIt +from std/strutils import + escape, parseBiggestUInt, replace, splitLines, startsWith, strip, + toLowerAscii + # TODO(zah): # We can compress the embedded states with snappy before embedding them here. @@ -236,7 +241,7 @@ when const_preset == "gnosis": chiadoGenesisSize* {.importc: "gnosis_chiado_genesis_size".}: int # let `.incbin` in assembly file find the binary file through search path - {.passc: "-I" & vendorDir.} + {.passc: "-I" & escape(vendorDir).} {.compile: "network_metadata_gnosis.S".} else: @@ -263,9 +268,6 @@ when const_preset == "gnosis": checkForkConsistency(network.cfg) for network in [gnosisMetadata, chiadoMetadata]: - doAssert network.cfg.ALTAIR_FORK_EPOCH < FAR_FUTURE_EPOCH - doAssert network.cfg.BELLATRIX_FORK_EPOCH < FAR_FUTURE_EPOCH - doAssert network.cfg.CAPELLA_FORK_EPOCH < FAR_FUTURE_EPOCH doAssert network.cfg.DENEB_FORK_EPOCH < FAR_FUTURE_EPOCH doAssert network.cfg.ELECTRA_FORK_EPOCH == FAR_FUTURE_EPOCH static: doAssert ConsensusFork.high == ConsensusFork.Deneb @@ -287,7 +289,7 @@ elif const_preset == "mainnet": {.pop.} # let `.incbin` in assembly file find the binary file through search path - {.passc: "-I" & vendorDir.} + {.passc: "-I" & escape(vendorDir).} {.compile: "network_metadata_mainnet.S".} else: @@ -329,9 +331,6 @@ elif const_preset == "mainnet": checkForkConsistency(network.cfg) for network in [mainnetMetadata, praterMetadata, sepoliaMetadata, holeskyMetadata]: - doAssert network.cfg.ALTAIR_FORK_EPOCH < FAR_FUTURE_EPOCH - doAssert network.cfg.BELLATRIX_FORK_EPOCH < FAR_FUTURE_EPOCH - doAssert network.cfg.CAPELLA_FORK_EPOCH < FAR_FUTURE_EPOCH doAssert network.cfg.DENEB_FORK_EPOCH < FAR_FUTURE_EPOCH doAssert network.cfg.ELECTRA_FORK_EPOCH == FAR_FUTURE_EPOCH static: doAssert ConsensusFork.high == ConsensusFork.Deneb diff --git a/env.sh b/env.sh index c0466092a..8225f92c7 100755 --- a/env.sh +++ b/env.sh @@ -1,9 +1,15 @@ #!/usr/bin/env bash +# beacon_chain +# Copyright (c) 2020-2024 Status Research & Development GmbH +# Licensed and distributed under either of +# * 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). +# at your option. This file may not be copied, modified, or distributed except according to those terms. # We use ${BASH_SOURCE[0]} instead of $0 to allow sourcing this file # and we fall back to a Zsh-specific special var to also support Zsh. REL_PATH="$(dirname ${BASH_SOURCE[0]:-${(%):-%x}})" -ABS_PATH="$(cd ${REL_PATH}; pwd)" +ABS_PATH="$(cd "${REL_PATH}"; pwd)" # Activate nvm only when this file is sourced without arguments: if [ -z "$*" ]; then @@ -32,5 +38,4 @@ if [ -f "${USER_ENV_FILE}" ]; then set +o allexport fi -source ${ABS_PATH}/vendor/nimbus-build-system/scripts/env.sh - +source "${ABS_PATH}/vendor/nimbus-build-system/scripts/env.sh" From f590970fd3cac00516593b258432ce669030f009 Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 21:57:30 +0000 Subject: [PATCH 03/11] bump nim-libbacktrace handle special characters in source paths (#6142) --- vendor/nim-libbacktrace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-libbacktrace b/vendor/nim-libbacktrace index 027570111..9f4fd3715 160000 --- a/vendor/nim-libbacktrace +++ b/vendor/nim-libbacktrace @@ -1 +1 @@ -Subproject commit 027570111c161d8378bca9e84b5f75500a8c38a3 +Subproject commit 9f4fd37153a84a7039b7e6a355a1c3374b0ba4ce From 54d56995a30dc4ffce276c3fff85937c593b200e Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 22:12:56 +0000 Subject: [PATCH 04/11] bump nimbus-build-system to quote include and library paths for use in passc/passl to allow embedded spaces (#6143) --- vendor/nimbus-build-system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 3866a8ab9..14e0c55e8 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 3866a8ab98fc6e0e6d406b88800aed72163d5fd4 +Subproject commit 14e0c55e89f0bd529f39b259b0f88196277ac08a From 605bf993448bc91620b9d40134d1b13c2e3b081e Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 23:05:49 +0000 Subject: [PATCH 05/11] remove macOS/aarch64 workaround from proposeBlockAux (#6138) --- beacon_chain/validators/beacon_validators.nim | 131 ------------------ 1 file changed, 131 deletions(-) diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 076df7f27..964d8ce42 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -1147,137 +1147,6 @@ proc proposeBlockAux( blobsBundle.proofs, blobsBundle.blobs)) else: Opt.none(seq[BlobSidecar]) - - # BIG BUG SOURCE: The `let` below cannot be combined with the others above! - # If combined, there are sometimes `SIGSEGV` during `test_keymanager_api`. - # This has only been observed on macOS (aarch64) in Jenkins, not on GitHub. - # - # - macOS 14.2.1 (23C71) - # - Xcode 15.1 (15C65) - # - Nim v1.6.18 (a749a8b742bd0a4272c26a65517275db4720e58a) - # - # Issue has started occuring around 12 Jan 2024, in a CI run for PR #5731. - # The PR did not change anything related to this, suggesting an environment - # or hardware change. The issue is flaky; could have been introduced earlier - # before surfacing in the aforementioned PR. About 30% to hit bug. - # - # [2024-01-12T11:54:21.011Z] Wrote test_keymanager_api/bootstrap_node.enr - # [2024-01-12T11:54:29.294Z] Serialization/deserialization [Beacon Node] [Preset: mainnet] . (0.00s) - # [2024-01-12T11:54:29.294Z] ListKeys requests [Beacon Node] [Preset: mainnet] .... (0.01s) - # [2024-01-12T11:54:34.870Z] ImportKeystores requests [Beacon Node] [Preset: mainnet] Traceback (most recent call last, using override) - # [2024-01-12T11:54:34.870Z] vendor/nim-libp2p/libp2p/protocols/rendezvous.nim(1016) main - # [2024-01-12T11:54:34.870Z] vendor/nim-libp2p/libp2p/protocols/rendezvous.nim(1006) NimMain - # [2024-01-12T11:54:34.870Z] vendor/nim-libp2p/libp2p/protocols/rendezvous.nim(997) PreMain - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(1502) atmtest_keymanager_apidotnim_Init000 - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(1475) main - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(378) futureContinue - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(1481) main - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(307) startBeaconNode - # [2024-01-12T11:54:34.870Z] beacon_chain/nimbus_beacon_node.nim(1900) start - # [2024-01-12T11:54:34.870Z] beacon_chain/nimbus_beacon_node.nim(1847) run - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(378) futureContinue - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(1465) delayedTests - # [2024-01-12T11:54:34.870Z] tests/test_keymanager_api.nim(392) runTests - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(378) futureContinue - # [2024-01-12T11:54:34.870Z] vendor/nim-unittest2/unittest2.nim(1147) runTests - # [2024-01-12T11:54:34.870Z] vendor/nim-unittest2/unittest2.nim(1086) runDirect - # [2024-01-12T11:54:34.870Z] vendor/nim-testutils/testutils/unittests.nim(16) runTestX60gensym2933 - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(656) waitFor - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(631) pollFor - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-01-12T11:54:34.870Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(378) futureContinue - # [2024-01-12T11:54:34.870Z] beacon_chain/validators/beacon_validators.nim(82) proposeBlockAux - # [2024-01-12T11:54:34.870Z] vendor/nimbus-build-system/vendor/Nim/lib/system/excpt.nim(631) signalHandler - # [2024-01-12T11:54:34.870Z] SIGSEGV: Illegal storage access. (Attempt to read from nil?) - # - # This appeared again around 25 Feb 2024, in a CI run for PR #5959, - # despite the extra `let` having been applied -- once more observed on - # macOS (aarch64) in Jenkins, and much rarer than before. - # - # [2024-02-25T23:21:24.533Z] Wrote test_keymanager_api/bootstrap_node.enr - # [2024-02-25T23:21:32.756Z] Serialization/deserialization [Beacon Node] [Preset: mainnet] . (0.00s) - # [2024-02-25T23:21:32.756Z] ListKeys requests [Beacon Node] [Preset: mainnet] .... (0.01s) - # [2024-02-25T23:21:37.219Z] ImportKeystores requests [Beacon Node] [Preset: mainnet] Traceback (most recent call last, using override) - # [2024-02-25T23:21:37.219Z] vendor/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(1068) main - # [2024-02-25T23:21:37.219Z] vendor/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(1058) NimMain - # [2024-02-25T23:21:37.219Z] vendor/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(1049) PreMain - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(1501) atmtest_keymanager_apidotnim_Init000 - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(1474) main - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(382) futureContinue - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(1480) main - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(307) startBeaconNode - # [2024-02-25T23:21:37.219Z] beacon_chain/nimbus_beacon_node.nim(1916) start - # [2024-02-25T23:21:37.219Z] beacon_chain/nimbus_beacon_node.nim(1863) run - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(382) futureContinue - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(1464) delayedTests - # [2024-02-25T23:21:37.219Z] tests/test_keymanager_api.nim(391) runTests - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(382) futureContinue - # [2024-02-25T23:21:37.219Z] vendor/nim-unittest2/unittest2.nim(1151) runTests - # [2024-02-25T23:21:37.219Z] vendor/nim-unittest2/unittest2.nim(1086) runDirect - # [2024-02-25T23:21:37.219Z] vendor/nim-testutils/testutils/unittests.nim(16) runTestX60gensym3188 - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(660) waitFor - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(635) pollFor - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-02-25T23:21:37.219Z] vendor/nim-chronos/chronos/internal/asyncfutures.nim(382) futureContinue - # [2024-02-25T23:21:37.219Z] vendor/nim-chronicles/chronicles.nim(251) proposeBlockAux - # [2024-02-25T23:21:37.219Z] SIGSEGV: Illegal storage access. (Attempt to read from nil?) - # - # One theory is that PR #5946 may increase the frequency, as there were - # times where the Jenkins CI failed almost every time using a shorter trace. - # However, the problem was once more flaky, with some passes in-between. - # For now, PR #5946 was reverted (low priority), and the problem is gone, - # whether related or not. - # - # [2024-02-23T23:11:47.700Z] Wrote test_keymanager_api/bootstrap_node.enr - # [2024-02-23T23:11:54.728Z] Serialization/deserialization [Beacon Node] [Preset: mainnet] . (0.00s) - # [2024-02-23T23:11:54.728Z] ListKeys requests [Beacon Node] [Preset: mainnet] .... (0.01s) - # [2024-02-23T23:11:59.523Z] ImportKeystores requests [Beacon Node] [Preset: mainnet] Traceback (most recent call last, using override) - # [2024-02-23T23:11:59.523Z] vendor/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(1067) main - # [2024-02-23T23:11:59.523Z] vendor/nim-libp2p/libp2p/protocols/pubsub/pubsub.nim(1057) NimMain - # [2024-02-23T23:11:59.523Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-02-23T23:11:59.523Z] vendor/nim-chronos/chronos/internal/asyncengine.nim(150) poll - # [2024-02-23T23:11:59.523Z] SIGSEGV: Illegal storage access. (Attempt to read from nil?) - # - # The generated `nimcache` differs slightly if the `let` are separated from - # a single block; separation introduces an additional state in closure iter. - # This change, maybe combined with some macOS specific compiler specifics, - # could this trigger the `SIGSEGV`? Maybe the extra state adds just enough - # complexity to the function to disable certain problematic optimizations? - # The change in size of the environment changes a number of things such as - # alignment and which parts of an environment contain pointers and so on, - # which in turn may have surprising behavioural effects, ie most likely this - # extra state masks some underlying issue. Furthermore, the combination of - # `(await xyz).valueOr: return` is not very commonly used with other `await` - # in the same `let` block, which could explain this not being more common. - # - # Note that when compiling for Wasm, there are similar bugs with `results` - # when inlining unwraps, e.g., in `eth2_rest_serialization.nim`. - # These have not been investigated thoroughly so far as that project uses - # Nim 2.0 with --mm:orc and is just a prototype for Wasm, no production use. - # But maybe there is something weird going on with `results` related to the - # random `SIGSEGV` that we are now observing here, related to doing too much - # inline logic without defining intermediate isolated `let` statements. - # - # if mediaType == ApplicationJsonMediaType: - # try: - # - ok RestJson.decode(value, T, - # - requireAllFields = true, - # - allowUnknownFields = true) - # + let r = RestJson.decode(value, T, - # + requireAllFields = true, - # + allowUnknownFields = true) - # + ok r - # except SerializationError as exc: - # debug "Failed to deserialize REST JSON data", - # err = exc.formatMsg(""), - # - # At this time we can only speculate about the trigger of these issues. - # Until a shared pattern can be identified, it is better to apply - # workarounds that at least avoid the known to be reachable triggers. - # The solution is hacky and far from desirable; it is what it is. - let newBlockRef = ( await node.router.routeSignedBeaconBlock(signedBlock, blobsOpt) ).valueOr: From f9e5294802904261f6f0d24860aae0b5e8c286dd Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 27 Mar 2024 03:34:56 +0000 Subject: [PATCH 06/11] dump EL-INVALID blocks if requested the same way as CL-INVALID blocks; optimize epoch transition validator exit (#6144) --- .../gossip_processing/block_processor.nim | 3 ++- beacon_chain/spec/beaconstate.nim | 23 ++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index 92143f55f..bffdaae78 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -370,7 +370,7 @@ proc checkBloblessSignature( let proposer = getProposer( dag, parent, signed_beacon_block.message.slot).valueOr: return err("checkBloblessSignature: Cannot compute proposer") - if uint64(proposer) != signed_beacon_block.message.proposer_index: + if distinctBase(proposer) != signed_beacon_block.message.proposer_index: return err("checkBloblessSignature: Incorrect proposer") if not verify_block_signature( dag.forkAtEpoch(signed_beacon_block.message.slot.epoch), @@ -537,6 +537,7 @@ proc storeBlock( if NewPayloadStatus.invalid == payloadStatus: self.consensusManager.quarantine[].addUnviable(signedBlock.root) + self[].dumpInvalidBlock(signedBlock) return err((VerifierError.UnviableFork, ProcessingStatus.completed)) if NewPayloadStatus.noResponse == payloadStatus: diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 5bb327380..279bfb32b 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -104,15 +104,6 @@ func initiate_validator_exit*( # Return if validator already initiated exit let validator = addr state.validators.mitem(index) - trace "Validator exiting", - index = index, - num_validators = state.validators.len, - current_epoch = get_current_epoch(state), - validator_slashed = validator.slashed, - validator_withdrawable_epoch = validator.withdrawable_epoch, - validator_exit_epoch = validator.exit_epoch, - validator_effective_balance = validator.effective_balance - var exit_queue_epoch = compute_activation_exit_epoch(get_current_epoch(state)) # Compute max exit epoch for idx in 0.. exit_queue_epoch: exit_queue_epoch = exit_epoch - var - exit_queue_churn: int + var exit_queue_churn: uint64 + let validator_churn_limit = get_validator_churn_limit(cfg, state, cache) for idx in 0..= get_validator_churn_limit(cfg, state, cache): - exit_queue_epoch += 1 + # In spec version, this check occurs only after looping through all + # validators, but it is ultimately a binary decision. Once matching + # get_validator_churn_limit(state), it can't validly become less. + if exit_queue_churn >= validator_churn_limit: + inc exit_queue_epoch + break # Set validator exit epoch and withdrawable epoch validator.exit_epoch = exit_queue_epoch From ad2299cd8c0c0bb75a730d32cb5fac3078327be4 Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 27 Mar 2024 06:58:26 +0000 Subject: [PATCH 07/11] bump nim-web3 for Prague engine API types (#6145) --- vendor/nim-web3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-web3 b/vendor/nim-web3 index 285d97c2b..85e34e8ab 160000 --- a/vendor/nim-web3 +++ b/vendor/nim-web3 @@ -1 +1 @@ -Subproject commit 285d97c2b05bbe2a13dab4b52ea878157fb1a1a1 +Subproject commit 85e34e8ab2767f3da1d5c166d695666d42ff0c96 From 7a3edb6961e0d695fd5f85f3e85e98920259f84b Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 27 Mar 2024 08:18:50 +0000 Subject: [PATCH 08/11] more initialize_validator_exit optimization (#6146) --- beacon_chain/spec/beaconstate.nim | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 279bfb32b..7009a5b04 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -11,13 +11,11 @@ import stew/assign2, json_serialization/std/sets, chronicles, - ../extras, ./datatypes/[phase0, altair, bellatrix], "."/[eth2_merkleization, forks, signatures, validator] from std/algorithm import fill from std/sequtils import anyIt, mapIt, toSeq - from ./datatypes/capella import BeaconState, ExecutionPayloadHeader, Withdrawal export extras, forks, validator, chronicles @@ -104,25 +102,31 @@ func initiate_validator_exit*( # Return if validator already initiated exit let validator = addr state.validators.mitem(index) - var exit_queue_epoch = compute_activation_exit_epoch(get_current_epoch(state)) + var + exit_queue_epoch = compute_activation_exit_epoch(get_current_epoch(state)) + exit_queue_churn: uint64 # Compute max exit epoch for idx in 0.. exit_queue_epoch: exit_queue_epoch = exit_epoch - var exit_queue_churn: uint64 - let validator_churn_limit = get_validator_churn_limit(cfg, state, cache) - for idx in 0..= validator_churn_limit: - inc exit_queue_epoch - break + if exit_queue_churn >= get_validator_churn_limit(cfg, state, cache): + inc exit_queue_epoch # Set validator exit epoch and withdrawable epoch validator.exit_epoch = exit_queue_epoch From 0e9b3dbad06d28387604843f07139f66cb7388cc Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 27 Mar 2024 10:15:12 +0000 Subject: [PATCH 09/11] bump nim-kzg4844 to get c-kzg Nim bindings allowing special build path chars (#6147) --- vendor/nim-kzg4844 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-kzg4844 b/vendor/nim-kzg4844 index 057f7c653..4fbcfbe4c 160000 --- a/vendor/nim-kzg4844 +++ b/vendor/nim-kzg4844 @@ -1 +1 @@ -Subproject commit 057f7c653e1abe91cca9aac2f94832f39228ea98 +Subproject commit 4fbcfbe4c452313bd440936318a87ed708987d8b From edad7c8a4c8ebcdfe22045c780182be0537a8bd4 Mon Sep 17 00:00:00 2001 From: diegomrsantos Date: Wed, 27 Mar 2024 11:16:57 +0100 Subject: [PATCH 10/11] bump libp2p (#6132) --- beacon_chain/networking/eth2_network.nim | 5 +---- vendor/nim-libp2p | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index 64728e571..48f7ff13e 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2295,14 +2295,11 @@ proc createEth2Node*(rng: ref HmacDrbgContext, let phase0Prefix = "/eth2/" & $forkDigests.phase0 func msgIdProvider(m: messages.Message): Result[seq[byte], ValidationResult] = - template topic: untyped = - if m.topicIds.len > 0: m.topicIds[0] else: "" - try: # This doesn't have to be a tight bound, just enough to avoid denial of # service attacks. let decoded = snappy.decode(m.data, static(GOSSIP_MAX_SIZE.uint32)) - ok(gossipId(decoded, phase0Prefix, topic)) + ok(gossipId(decoded, phase0Prefix, m.topic)) except CatchableError: err(ValidationResult.Reject) diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index 28609597d..458b0885d 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit 28609597d104a9be880ed5e1648e1ce18ca9dc38 +Subproject commit 458b0885dd276afeb81b9a6d431dde79e99f2b01 From 6f063c068c4fec1d1549a2f10713b628da7148b7 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 27 Mar 2024 13:15:28 +0100 Subject: [PATCH 11/11] chronos: bump to 4.0.2 * removes `sink` due to upstream bugs * nim-2.0-compatible `Raising` macros --- vendor/nim-chronos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 47cc17719..ef1b077ad 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 47cc17719f4293bf80a22ebe28e3bfc54b2a59a1 +Subproject commit ef1b077adfdc803fcce880e81a5740b964bac0bc