Switch to Nim v1.0.2
This commit is contained in:
parent
f7dea04ed6
commit
dfe3a6f0fb
|
@ -36,6 +36,7 @@ install:
|
|||
|
||||
script:
|
||||
- set -e # fail fast
|
||||
- make -j2 update # to allow a newer Nim version to be detected
|
||||
- make -j2
|
||||
- make -j2 DISABLE_LFS_SCRIPT=1 test
|
||||
|
||||
|
|
|
@ -311,8 +311,9 @@ proc addLocalValidators(node: BeaconNode, state: BeaconState) =
|
|||
|
||||
info "Local validators attached ", count = node.attachedValidators.count
|
||||
|
||||
proc getAttachedValidator(
|
||||
node: BeaconNode, state: BeaconState, idx: ValidatorIndex): AttachedValidator =
|
||||
proc getAttachedValidator(node: BeaconNode,
|
||||
state: BeaconState,
|
||||
idx: ValidatorIndex): AttachedValidator =
|
||||
let validatorKey = state.validators[idx].pubkey
|
||||
node.attachedValidators.getValidator(validatorKey)
|
||||
|
||||
|
|
|
@ -251,10 +251,10 @@ else:
|
|||
func peersCount*(node: Eth2Node): int =
|
||||
node.peers.len
|
||||
|
||||
proc makeMessageHandler[MsgType](msgHandler: proc(msg: MsgType)): P2PPubSubCallback =
|
||||
proc makeMessageHandler[MsgType](msgHandler: proc(msg: MsgType) {.gcsafe.}): P2PPubSubCallback =
|
||||
result = proc(api: DaemonAPI,
|
||||
ticket: PubsubTicket,
|
||||
msg: PubSubMessage): Future[bool] {.async.} =
|
||||
msg: PubSubMessage): Future[bool] {.async, gcsafe.} =
|
||||
inc gossip_messages_received
|
||||
trace "Incoming gossip bytes",
|
||||
peer = msg.peer, len = msg.data.len, tops = msg.topics
|
||||
|
@ -263,7 +263,7 @@ else:
|
|||
|
||||
proc subscribe*[MsgType](node: Eth2Node,
|
||||
topic: string,
|
||||
msgHandler: proc(msg: MsgType)) {.async.} =
|
||||
msgHandler: proc(msg: MsgType) {.gcsafe.} ) {.async, gcsafe.} =
|
||||
discard await node.daemon.pubsubSubscribe(topic, makeMessageHandler(msgHandler))
|
||||
|
||||
proc broadcast*(node: Eth2Node, topic: string, msg: auto) =
|
||||
|
|
|
@ -66,7 +66,7 @@ func get_shuffled_seq*(seed: Eth2Digest,
|
|||
let
|
||||
cur_idx_permuted = shuffled_active_validator_indices[index]
|
||||
flip = ((list_size + pivot) - cur_idx_permuted.uint64) mod list_size
|
||||
position = max(cur_idx_permuted, flip.int)
|
||||
position = max(cur_idx_permuted.int, flip.int)
|
||||
|
||||
let
|
||||
source = sources[position div 256].data
|
||||
|
|
|
@ -37,7 +37,7 @@ proc writeJson*(prefix, slot, v: auto) =
|
|||
let fileName = fmt"{prefix:04}-{shortLog(slot):08}.json"
|
||||
Json.saveFile(fileName, v, pretty = true)
|
||||
|
||||
cli do(slots = 448,
|
||||
cli do(slots = 448'u,
|
||||
validators = SLOTS_PER_EPOCH * 9, # One per shard is minimum
|
||||
json_interval = SLOTS_PER_EPOCH,
|
||||
prefix = 0,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f2b10776dbdfab2986ef35499994028a6809250c
|
||||
Subproject commit 21af0810663901abc832ff7f29e3920a9f22392a
|
|
@ -1 +1 @@
|
|||
Subproject commit 2bdd2fab6e9bdcdcb51ea7e09d077f36a29faf4c
|
||||
Subproject commit 0c3ab3eb78dc495a7662d397d04dff07d1a490c6
|
|
@ -1 +1 @@
|
|||
Subproject commit 817c819847368471ea782880088299cda4045c5a
|
||||
Subproject commit 5107c088bc90f1cc62df9dcda077333c20f3a778
|
|
@ -1 +1 @@
|
|||
Subproject commit 648a08f970b521171c1eac004a0f7e5854243c20
|
||||
Subproject commit c29bc8342c5ec2ffb87310460246f4de953ba933
|
Loading…
Reference in New Issue