bump stew, fix warnings (#655)
This commit is contained in:
parent
07c37517ea
commit
746659bdc6
|
@ -330,7 +330,7 @@ proc sendAttestation(node: BeaconNode,
|
|||
validatorSignature = await validator.signAttestation(attestationData, fork)
|
||||
|
||||
var aggregationBits = CommitteeValidatorsBits.init(committeeLen)
|
||||
aggregationBits.raiseBit indexInCommittee
|
||||
aggregationBits.setBit indexInCommittee
|
||||
|
||||
var attestation = Attestation(
|
||||
data: attestationData,
|
||||
|
|
|
@ -536,8 +536,8 @@ template bytes*(x: BitList): auto = bytes(BitSeq(x))
|
|||
template `[]`*(x: BitList, idx: auto): auto = BitSeq(x)[idx]
|
||||
template `[]=`*(x: var BitList, idx: auto, val: bool) = BitSeq(x)[idx] = val
|
||||
template `==`*(a, b: BitList): bool = BitSeq(a) == BitSeq(b)
|
||||
template raiseBit*(x: var BitList, idx: int) = raiseBit(BitSeq(x), idx)
|
||||
template lowerBit*(x: var BitList, idx: int) = lowerBit(BitSeq(x), idx)
|
||||
template setBit*(x: var BitList, idx: int) = setBit(BitSeq(x), idx)
|
||||
template clearBit*(x: var BitList, idx: int) = clearBit(BitSeq(x), idx)
|
||||
template overlaps*(a, b: BitList): bool = overlaps(BitSeq(a), BitSeq(b))
|
||||
template combine*(a: var BitList, b: BitList) = combine(BitSeq(a), BitSeq(b))
|
||||
template isSubsetOf*(a, b: BitList): bool = isSubsetOf(BitSeq(a), BitSeq(b))
|
||||
|
|
|
@ -164,7 +164,7 @@ proc process_justification_and_finalization*(
|
|||
state.current_justified_checkpoint =
|
||||
Checkpoint(epoch: previous_epoch,
|
||||
root: get_block_root(state, previous_epoch))
|
||||
state.justification_bits.raiseBit 1
|
||||
state.justification_bits.setBit 1
|
||||
|
||||
debug "Justified with previous epoch",
|
||||
current_epoch = current_epoch,
|
||||
|
@ -178,7 +178,7 @@ proc process_justification_and_finalization*(
|
|||
state.current_justified_checkpoint =
|
||||
Checkpoint(epoch: current_epoch,
|
||||
root: get_block_root(state, current_epoch))
|
||||
state.justification_bits.raiseBit 0
|
||||
state.justification_bits.setBit 0
|
||||
|
||||
debug "Justified with current epoch",
|
||||
current_epoch = current_epoch,
|
||||
|
|
|
@ -474,7 +474,7 @@ func bitlistHashTreeRoot(merkelizer: SszChunksMerkelizer, x: BitSeq): Eth2Digest
|
|||
lastCorrectedByte = Bytes(x)[^2]
|
||||
else:
|
||||
let markerPos = log2trunc(lastCorrectedByte)
|
||||
lastCorrectedByte.lowerBit(markerPos)
|
||||
lastCorrectedByte.clearBit(markerPos)
|
||||
|
||||
var
|
||||
bytesInLastChunk = totalBytes mod bytesPerChunk
|
||||
|
|
|
@ -46,8 +46,8 @@ proc finalizeOn234(state: var BeaconState, epoch: Epoch, sufficient_support: boo
|
|||
state.justification_bits = 0'u8 # Bitvector of length 4
|
||||
# mock 3rd and 4th latest epochs as justified
|
||||
# indices are pre-shift
|
||||
state.justification_bits.raiseBit 1
|
||||
state.justification_bits.raiseBit 2
|
||||
state.justification_bits.setBit 1
|
||||
state.justification_bits.setBit 2
|
||||
# mock the 2nd latest epoch as justifiable, with 4th as the source
|
||||
addMockAttestations(
|
||||
state,
|
||||
|
@ -92,7 +92,7 @@ proc finalizeOn23(state: var BeaconState, epoch: Epoch, sufficient_support: bool
|
|||
state.justification_bits = 0'u8 # Bitvector of length 4
|
||||
# mock 3rd as justified
|
||||
# indices are pre-shift
|
||||
state.justification_bits.raiseBit 1
|
||||
state.justification_bits.setBit 1
|
||||
# mock the 2nd latest epoch as justifiable, with 3rd as the source
|
||||
addMockAttestations(
|
||||
state,
|
||||
|
@ -137,7 +137,7 @@ proc finalizeOn123(state: var BeaconState, epoch: Epoch, sufficient_support: boo
|
|||
state.justification_bits = 0'u8 # Bitvector of length 4
|
||||
# mock 3rd as justified
|
||||
# indices are pre-shift
|
||||
state.justification_bits.raiseBit 1
|
||||
state.justification_bits.setBit 1
|
||||
# mock the 2nd latest epoch as justifiable, with 5th as the source
|
||||
addMockAttestations(
|
||||
state,
|
||||
|
@ -190,7 +190,7 @@ proc finalizeOn12(state: var BeaconState, epoch: Epoch, sufficient_support: bool
|
|||
state.justification_bits = 0'u8 # Bitvector of length 4
|
||||
# mock 3rd as justified
|
||||
# indices are pre-shift
|
||||
state.justification_bits.raiseBit 0
|
||||
state.justification_bits.setBit 0
|
||||
# mock the 2nd latest epoch as justifiable, with 3rd as the source
|
||||
addMockAttestations(
|
||||
state,
|
||||
|
|
|
@ -164,7 +164,7 @@ proc makeAttestation*(
|
|||
doAssert sac_index != -1, "find_beacon_committee should guarantee this"
|
||||
|
||||
var aggregation_bits = CommitteeValidatorsBits.init(committee.len)
|
||||
aggregation_bits.raiseBit sac_index
|
||||
aggregation_bits.setBit sac_index
|
||||
|
||||
let
|
||||
msg = hash_tree_root(data)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9c18a1cc553bc61cdf67f0b4c12b538bde95a599
|
||||
Subproject commit 1edeabb453724aa452a940ab03ddc82f5aeeff6e
|
Loading…
Reference in New Issue