stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

All Stacks-on-Bitcoin operations need to be considered in Nakamoto

Open jcnelson opened this issue 1 year ago • 1 comments

In Nakamoto, all Bitcoin operations since the last sortition need to be extracted an applied when processing the next sortition. This currently does not happen because we rely on StacksChainState::process_stacking_and_transfer_and_delegate_burn_ops(), which uses a window of the last 6 Bitcoin blocks.

A few things need to happen:

  • The equivalent method needs to be ported to NakamotoChainState
  • The window needs to be removed
  • We really should clean up this method -- we're pulling in aggregate key votes now as well, and soon we'll be pulling in sBTC ops too. We need a struct for containing all the ops, and the method should be renamed to get_stacks_on_burnchain_ops() or something to reflect its true nature.

jcnelson avatar Mar 13 '24 15:03 jcnelson

Write an Integration test to verify

saralab avatar Jun 18 '24 14:06 saralab

This is done and integration tests are written as well (unless I'm misunderstanding parts of the description)

hstove avatar Sep 23 '24 21:09 hstove

This is done and integration tests are written as well (unless I'm misunderstanding parts of the description)

I was just about to write the same thing. I think this is tested via test_process_block_ops and confirm_unparsed_ongoing_ops and stack_stx_burn_op_test

jferrant avatar Sep 23 '24 22:09 jferrant

This is NOT done. Nakamoto still uses BURNCHAIN_TX_SEARCH_WINDOW to find a limited number of prior burnchain blocks.

jcnelson avatar Sep 24 '24 14:09 jcnelson

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.

blockstack-devops avatar Oct 25 '24 00:10 blockstack-devops