switch to Nim v2.0.14 (#6795)

This commit is contained in:
tersec 2024-12-26 08:22:44 +00:00 committed by GitHub
parent 9c9cbed987
commit 50ab4cf392
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 11 additions and 14 deletions

View File

@ -15,7 +15,7 @@ After "gossip validation" the consensus objects can be rebroadcasted as they are
For blocks, this means verifying state transition and all contained cryptographic signatures (instead of just the proposer signature).
For other consensus objects, it is possible that gossip validation is a superset of consensus verification (TODO).
The pools presenet in this folder are:
The pools present in this folder are:
- block_pools:
- block_quarantine: for seemingly valid blocks that are on a fork unknown to us.
- block_clearance: to verify (state_transition + cryptography) candidate blocks.

View File

@ -37,7 +37,7 @@ type
proc(data: SingleAttestation) {.gcsafe, raises: [].}
Validation[CVBType] = object
## Validations collect a set of signatures for a distict attestation - in
## Validations collect a set of signatures for a distinct attestation - in
## eth2, a single bit is used to keep track of which signatures have been
## added to the aggregate meaning that only non-overlapping aggregates may
## be further combined.
@ -740,7 +740,7 @@ func score(
doAssert aggregation_bits.len() == xxx[].len(),
"check_attestation ensures committee length"
# How many votes were in the attestation minues the votes that are the same
# How many votes were in the attestation minus the votes that are the same
return bitsScore - aggregation_bits.countOverlap(xxx[])
# Not found in cache - fresh vote meaning all attestations count
@ -1002,7 +1002,7 @@ proc getElectraAttestationsForBlock*(
#TODO: Merge candidates per block structure with the candidates one
# and score possible on-chain attestations while collecting candidates
# (previous loop) and reavaluate cache key definition
# (previous loop) and reevaluate cache key definition
let
entry2 = block:
var e2 = entry.data
@ -1241,7 +1241,7 @@ proc selectOptimisticHead*(
proc prune*(pool: var AttestationPool) =
if (let v = pool.forkChoice.prune(); v.isErr):
# If pruning fails, it's likely the result of a bug - this shouldn't happen
# but we'll keep running hoping that the fork chocie will recover eventually
# but we'll keep running hoping that the fork choice will recover eventually
error "Couldn't prune fork choice, bug?", err = v.error()
func validatorSeenAtEpoch*(pool: AttestationPool, epoch: Epoch,

View File

@ -266,7 +266,7 @@ proc addHeadBlockWithParent*(
var cache = StateCache()
# We've verified that the slot of the new block is newer than that of the
# parent, so we should now be able to create an approriate clearance state
# parent, so we should now be able to create an appropriate clearance state
# onto which we can apply the new block
let clearanceBlock = BlockSlotId.init(parent.bid, signedBlock.message.slot)
if not updateState(

View File

@ -89,7 +89,7 @@ type
## instantiated: sync from genesis or checkpoint, and therefore, what
## features we can offer in terms of historical replay.
##
## Beacuse the state transition is forwards-only, checkpoint sync generally
## Because the state transition is forwards-only, checkpoint sync generally
## allows replaying states from that point onwards - anything earlier
## would require a backfill of blocks and a subsequent replay from genesis.
##

View File

@ -59,11 +59,7 @@ in stdenv.mkDerivation rec {
pushd vendor/nimbus-build-system/vendor/Nim
mkdir dist
cp -r ${callPackage ./nimble.nix {}} dist/nimble
chmod 777 -R dist/nimble
mkdir -p dist/nimble/dist
cp -r ${callPackage ./sat.nix {}} dist/nimble/dist/sat
cp -r ${callPackage ./checksums.nix {}} dist/checksums # need both
cp -r ${callPackage ./checksums.nix {}} dist/nimble/dist/checksums
cp -r ${callPackage ./checksums.nix {}} dist/checksums
cp -r ${callPackage ./csources.nix {}} csources_v2
chmod 777 -R dist/nimble csources_v2
popd

View File

@ -6,7 +6,8 @@ let
in pkgs.fetchFromGitHub {
owner = "nim-lang";
repo = "nimble";
fetchSubmodules = true;
rev = tools.findKeyValue "^ +NimbleStableCommit = \"([a-f0-9]+)\".+" sourceFile;
# WARNING: Requires manual updates when Nim compiler version changes.
hash = "sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w=";
hash = "sha256-Rz48sGUKZEAp+UySla+MlsOfsERekuGKw69Tm11fDz8=";
}

@ -1 +1 @@
Subproject commit 8fafcd0bac9f409091b7bcaee62ab6330f57441e
Subproject commit 4c6ff070c116450bb2c285691724ac9e6202cb28