11 Commits

Author SHA1 Message Date
e16e08a7a6 fix(drand): StateGetBeaconEntry uses chain beacons for historical epochs (#12428)
* fix(drand): `StateGetBeaconEntry` uses chain beacons for historical epochs

Fixes: https://github.com/filecoin-project/lotus/issues/12414

Previously StateGetBeaconEntry would always try and use a drand beacon to get
the appropriate round. But as drand has shut down old beacons and we've
removed client details from Lotus, it has stopped working for historical
beacons.
This fix restores historical beacon entries by using the on-chain lookup,
however it now follows the rules used by StateGetRandomnessFromBeacon and the
get_beacon_randomness syscall which has some quirks with null rounds prior to
nv14. See https://github.com/filecoin-project/lotus/issues/12414#issuecomment-2320034935
for specifics.

StateGetBeaconEntry still blocks for future epochs and uses live drand beacon
clients to wait for and fetch rounds as they are available.

* fixup! fix(drand): `StateGetBeaconEntry` uses chain beacons for historical epochs

* fixup! fix(drand): `StateGetBeaconEntry` uses chain beacons for historical epochs
2024-09-27 12:55:14 +02:00
7e6ed09628 refactor: move vm.Rand to rand.Rand 2023-08-22 11:34:28 -04:00
c90faf0754 fixup conformance tests to incorporate randomness changes 2023-08-22 10:08:38 -04:00
91ee13b461 fix: refactor rand_replay 2023-08-21 16:28:59 -04:00
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
6f6f5d79fb Refactor: State: Let Rand get network versions 2021-12-17 18:54:17 -05:00
aa1b770974 Rand: Refactor so that versioning lives in StateRand 2021-12-17 13:58:53 -05:00
c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
21b4741e30 Fix randomness fetching around null blocks 2021-05-26 21:06:06 -04:00
c02daca9e9 work around #4223. 2020-10-07 20:12:35 +01:00
5bd6a3cdad conformance: record randomness in tvx; replay in driver. 2020-10-07 19:57:42 +01:00