Skip to content

Commit 718feef

Browse files
authored
Fix unstable after #2244 (#2255)
1 parent 69d6ffd commit 718feef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

beacon_chain/nimbus_beacon_node.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import
99
# Standard library
1010
std/[math, os, strformat, strutils, tables, times,
11+
random, # TODO: review usage of Nim RNG
1112
terminal, osproc],
1213
system/ansi_c,
1314

@@ -655,6 +656,9 @@ proc setupSelfSlashingProtection(node: BeaconNode, slot: Slot) =
655656
# 2 epochs is dangerous because it'll guarantee colliding probes in the
656657
# overlapping case.
657658

659+
# TODO: is a pseudo-random RNG enough here?
660+
# If so, should we store the state explicitly?
661+
658662
# So dPE == 2 -> epoch + 1, always; dPE == 3 -> epoch + (1 or 2), etc.
659663
node.processor.gossipSlashingProtection.probeEpoch =
660664
slot.epoch + 1 + rand(duplicateValidatorEpochs.int - 2).uint64
@@ -1749,4 +1753,3 @@ programMain:
17491753
waitFor testWeb3Provider(config.web3TestUrl,
17501754
depositContractAddress,
17511755
depositContractDeployedAt)
1752-

0 commit comments

Comments
 (0)