parent
69d6ffd990
commit
718feef802
|
@ -8,6 +8,7 @@
|
||||||
import
|
import
|
||||||
# Standard library
|
# Standard library
|
||||||
std/[math, os, strformat, strutils, tables, times,
|
std/[math, os, strformat, strutils, tables, times,
|
||||||
|
random, # TODO: review usage of Nim RNG
|
||||||
terminal, osproc],
|
terminal, osproc],
|
||||||
system/ansi_c,
|
system/ansi_c,
|
||||||
|
|
||||||
|
@ -655,6 +656,9 @@ proc setupSelfSlashingProtection(node: BeaconNode, slot: Slot) =
|
||||||
# 2 epochs is dangerous because it'll guarantee colliding probes in the
|
# 2 epochs is dangerous because it'll guarantee colliding probes in the
|
||||||
# overlapping case.
|
# overlapping case.
|
||||||
|
|
||||||
|
# TODO: is a pseudo-random RNG enough here?
|
||||||
|
# If so, should we store the state explicitly?
|
||||||
|
|
||||||
# So dPE == 2 -> epoch + 1, always; dPE == 3 -> epoch + (1 or 2), etc.
|
# So dPE == 2 -> epoch + 1, always; dPE == 3 -> epoch + (1 or 2), etc.
|
||||||
node.processor.gossipSlashingProtection.probeEpoch =
|
node.processor.gossipSlashingProtection.probeEpoch =
|
||||||
slot.epoch + 1 + rand(duplicateValidatorEpochs.int - 2).uint64
|
slot.epoch + 1 + rand(duplicateValidatorEpochs.int - 2).uint64
|
||||||
|
@ -1749,4 +1753,3 @@ programMain:
|
||||||
waitFor testWeb3Provider(config.web3TestUrl,
|
waitFor testWeb3Provider(config.web3TestUrl,
|
||||||
depositContractAddress,
|
depositContractAddress,
|
||||||
depositContractDeployedAt)
|
depositContractDeployedAt)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue