stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 671 forks source link

[SIGNER BUG] off by one slot id calculation #5195

Closed jferrant closed 1 month ago

jferrant commented 2 months ago

Some signers have reported that they cannot write their MockSignatures to Stackerdb. When I looked into it, I found that they were trying to write to an off by one slot id (e.g. 22 when it should be 21). Somehow the signer slot id is off by one so there must be something wrong in the reconfiguration calls or in the parsing of signer slots.

Strangely this signer was configured correctly, however during reward cycle rollover...the newly activated reward cycle signer was off by one. When the signer was killed and restarted, it configured itself correctly.

EDIT: Slot id was wrong because the signer configured itself BEFORE the reward set was calculated, reading the old reward cycles' stackerdb. (i.e. cycle N+2 was loading cycle N's reward cycle info)

blockstack-devops commented 3 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.