Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nakamoto: Tenure Change transaction Validation #4014

Closed
kantai opened this issue Oct 27, 2023 · 6 comments
Closed

Nakamoto: Tenure Change transaction Validation #4014

kantai opened this issue Oct 27, 2023 · 6 comments

Comments

@kantai
Copy link
Member

kantai commented Oct 27, 2023

In order to support nakamoto in neon and beyond, the tenure change transaction must be validated further than in mockamoto.

  • The block must be the first block in the miner's tenure. It cannot be in a subsequent block
  • TenureChange must be for last_tenure + 1. No TenureChanges can be skipped.
  • It must point to the last active miner's block-commit's StacksBlockId
  • It must count up the number of blocks since the last block with a TenureChange (it may be zero; a block can have multiple TenureChange transactions per the design doc)
  • It must be signed by the current Stacker set
  • It must precede any other kinds of transactions (except coinbases?)
@jcnelson jcnelson self-assigned this Oct 27, 2023
@jcnelson
Copy link
Member

I'm already working on this as part of the coordinator PR, since I need to be able to generate Nakamoto block streams as part of the test infrastructure (TestMiner, TestBurnchainBlock, TestPeer).

@kantai
Copy link
Member Author

kantai commented Oct 27, 2023

Which of these are necessary for the coordinator PR?

@jcnelson
Copy link
Member

Not all of them. Just the ability to ensure that there is one TenureChange per tenure, and it's in the right place in the block stream. I'm just trying to upgrade TestPeer to produce well-formed Nakamoto block-commits and block streams so I can verify that the coordinator will correctly detect the presence of and correctly handle new burnchain blocks and new Nakamoto blocks. I'm focusing on getting TestPeer upgraded so I can switch over to implementing the network state machines.

@jcnelson
Copy link
Member

I'll add a follow-on PR that performs all of the necessary validations. I just wanted to point out that I'm already well-positioned to take this task, since I had to do a few of them already.

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Nov 2, 2023
@saralab saralab added the neon3.0 label Nov 2, 2023
@saralab saralab added this to the Neon 3.0 milestone Nov 2, 2023
@saralab saralab moved this from Status: 🆕 New to Status: 📋 Backlog in Stacks Core Eng Nov 2, 2023
@saralab saralab assigned jbencin and jcnelson and unassigned jcnelson and jbencin Nov 14, 2023
@saralab
Copy link
Contributor

saralab commented Nov 14, 2023

@jcnelson : To add more details on tasks needed for tenurechange validation

@saralab saralab moved this from Status: 📋 Backlog to Status: 💻 In Progress in Stacks Core Eng Nov 17, 2023
@saralab saralab moved this from Status: 💻 In Progress to Status: In Review in Stacks Core Eng Dec 5, 2023
@github-project-automation github-project-automation bot moved this from Status: In Review to Status: ✅ Done in Stacks Core Eng Dec 12, 2023
@blockstack-devops
Copy link
Contributor

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.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

5 participants