const ChainHash, PeriodSeconds, RoundsPerDay, drandGenesisTime
1const (
2 // ChainHash names the drand chain these signatures belong to.
3 ChainHash = bls254.DrandEvmnetChainHash
4
5 // PeriodSeconds is drand evmnet's cadence: one round every three seconds.
6 //
7 // ANY REALM EXPRESSING A DURATION IN ROUNDS MUST MULTIPLY BY THIS AND COMPARE
8 // AGAINST SECONDS. A round count is not a duration. The five-minute beacon
9 // this replaces made every round-denominated window in the repository 100x
10 // too short at a stroke, and a guard comparing rounds to rounds cannot see
11 // it: the cadence appears on both sides and cancels. See
12 // DRAND-MIGRATION.md section 6, and r/splash/arcade/raffle's seconds guard,
13 // which is the one assertion in the system that would have caught it.
14 PeriodSeconds = bls254.DrandEvmnetPeriodSeconds
15
16 // RoundsPerDay is 86400 / PeriodSeconds = 28800. Exported because the raffle
17 // and the duel both need it and both used to restate it as 288 -- the same
18 // number in two files, wrong in both.
19 RoundsPerDay = 86400 / PeriodSeconds
20
21 // drandGenesisTime is round 1's unix timestamp: round r is signed at
22 // drandGenesisTime + PeriodSeconds*(r-1). Re-exported from p/splash/bls254
23 // for the same reason as the three constants above it -- one place the
24 // number is written down -- and it is what CurrentRound and RoundAt below
25 // convert the block's own clock against.
26 drandGenesisTime = bls254.DrandEvmnetGenesisTime
27)ChainHash, PeriodSeconds and RoundsPerDay are re-exported from p/splash/bls254, which holds the ONE copy of drand evmnet's identity. They are re-exported rather than restated so that a realm needing the cadence does not have to import a crypto package to get it, and so that there is still exactly one place the numbers are written down.