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: remove stacker signature fields from tenure change payload #4260

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

kantai
Copy link
Member

@kantai kantai commented Jan 18, 2024

Description

Related to closing #3932 -- TenureChange payloads don't need stacker signatures, because stackers have to sign the block header, which incorporates the TenureChange payload in its tx hash.

The signer binary doesn't need to do anything special to validate these payloads: they have to sign off on blocks anyways, and the content of tenure change transactions is validated by the stacks-node's block proposal validation endpoint already.

Conveniently, this also doesn't place much of a burden on the stacks-node miner either: the nakamoto-neon miner was already constructing tenure change transactions in self-signing-mode , so this PR just makes it construct those transactions all the time.

Closes #4258

@kantai kantai requested a review from jcnelson January 18, 2024 16:48
@kantai kantai linked an issue Jan 18, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f394a3b) 83.34% compared to head (12f5d9c) 83.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4260      +/-   ##
==========================================
- Coverage   83.34%   83.11%   -0.23%     
==========================================
  Files         432      432              
  Lines      306587   306549      -38     
==========================================
- Hits       255521   254795     -726     
- Misses      51066    51754     +688     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

/// The Stacker signature
pub signature: ThresholdSignature,
/// A bitmap of which Stackers signed
pub signers: Vec<u8>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this bitmap for blocks?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we can add that back in via a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'm working on that in a separate PR.

Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as long as CI passes

@jcnelson
Copy link
Member

Why is codecov misbehaving?

@kantai
Copy link
Member Author

kantai commented Jan 18, 2024

Why is codecov misbehaving?

I think it's just that codecov returns a report before all of the tests have run (it returns after the first test runs), but in order to get enough coverage, all the tests have to run, so while tests are still running, it seems like codecov is failing. Once everything has run (as it has now), codecov should pass (as it is now).

@kantai kantai merged commit f359a17 into next Jan 18, 2024
2 checks passed
@kantai kantai deleted the feat/miner-tenure-change branch January 24, 2024 14:51
@blockstack-devops
Copy link
Contributor

This pull request 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 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Nakamoto]: Miner must produce the tenurechange transcation
4 participants