Stacker-signer State Maintenance and Honest Behavior #4213
kantai
started this conversation in
Blockchain
Replies: 1 comment 3 replies
-
Only thing is that first check should be "Do we have to run DKG" since can't begin signing blocks without it. But if this assumes that process is already done then it seems complete. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not aware if this is all written down in full anywhere yet, so for my own edification, I tried to enumerate the complete state of the stacker-signer binary related to approving and rejecting blocks as well as constructing tenure change transactions.
State Maintenance
Events
a. Update the "current stacks miner"
b. Update the "current bitcoin block"
a. Update the "current bitcoin block"
a. Is there an ongoing approval? if so, wait.
b. does block build off of last approved?
c. does block come from the expected miner?
d. does block have latest bitcoin state?
e. did the block validate via the stacks-node block proposal endpoint?
f. if all of the above, begin a new approval process.
a. Is there an ongoing approval? If so, wait.
b. Does request match the current bitcoin block?
c. Does request match the expected miner?
d. Is the bitcoin block "stale" enough to issue an extension?
e. If all of the above, construct a tenure change transaction and begin a new approval process.
a. If for a new block, broadcast the block via the local stacks-node
b. If for a tenure change transaction, broadcast via StackerDB
c. If for a new block, update "last block approved"
d. Release the "ongoing approval process" lock.
Beta Was this translation helpful? Give feedback.
All reactions