prysmaticlabs / prysm

Go implementation of Ethereum proof of stake
https://www.offchainlabs.com
GNU General Public License v3.0
3.46k stars 985 forks source link

NewSlotTickerWithIntervals Panics if a One Second Slot is Used #13280

Open nisdas opened 10 months ago

nisdas commented 10 months ago

Discussed in https://github.com/prysmaticlabs/prysm/discussions/13267

Originally posted by montekki December 6, 2023 Hi all, is it possible to run a local devnet with SECONDS_PER_SLOT: 1 ? Beacon client is panicking with it with:

2023-12-05 17:19:30 time="2023-12-05 16:19:30" level=info msg="Due to number of peers required for sync being set at 0, entering regular sync immediately." genesisTime=2023-12-05 16:19:44 +0000 UTC prefix=initial-sync
2023-12-05 17:19:30 panic: invalid decreasing offsets
2023-12-05 17:19:30 
2023-12-05 17:19:30 goroutine 4810 [running]:
2023-12-05 17:19:30 github.com/prysmaticlabs/prysm/v4/time/slots.NewSlotTickerWithIntervals({0x40009fcf20?, 0xdd1ce0?, 0x3942ca0?}, {0x400072c610?, 0x0?, 0x0?})
2023-12-05 17:19:30     time/slots/slotticker.go:190 +0x1b4
2023-12-05 17:19:30 github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain.(*Service).spawnProcessAttestationsRoutine.func1()
2023-12-05 17:19:30     beacon-chain/blockchain/receive_attestation.go:96 +0x224
2023-12-05 17:19:30 created by github.com/prysmaticlabs/prysm/v4/beacon-chain/blockchain.(*Service).spawnProcessAttestationsRoutine
2023-12-05 17:19:30     beacon-chain/blockchain/receive_attestation.go:72 +0x5c
```</div>
v4lproik commented 9 months ago

Hey! I would love to take this up :)

nisdas commented 9 months ago

Perfect, assigned to you !