mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-03-01 06:30:52 +00:00
switch to Nim v2.0.14 (#6795)
This commit is contained in:
parent
9c9cbed987
commit
50ab4cf392
@ -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.
|
||||
|
@ -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,
|
||||
|
@ -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(
|
||||
|
@ -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.
|
||||
##
|
||||
|
@ -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
|
||||
|
@ -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=";
|
||||
}
|
||||
|
2
vendor/nimbus-build-system
vendored
2
vendor/nimbus-build-system
vendored
@ -1 +1 @@
|
||||
Subproject commit 8fafcd0bac9f409091b7bcaee62ab6330f57441e
|
||||
Subproject commit 4c6ff070c116450bb2c285691724ac9e6202cb28
|
Loading…
x
Reference in New Issue
Block a user