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

Merge of #5539 into 3.1 release #5543

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
- New RPC endpoints
- `/v2/clarity/marf/:marf_key_hash`
- `/v2/clarity/metadata/:principal/:contract_name/:clarity_metadata_key`
- When a proposed block is validated by a node, the block can be validated even when the block version is different than the node's default ([#5539](https://github.com/stacks-network/stacks-core/pull/5539))

### Changed

Expand Down
4 changes: 4 additions & 0 deletions stackslib/src/net/api/postblock_proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,10 @@ impl NakamotoBlockProposal {
}

let mut block = builder.mine_nakamoto_block(&mut tenure_tx);
// Override the block version with the one from the proposal. This must be
// done before computing the block hash, because the block hash includes the
// version in its computation.
block.header.version = self.block.header.version;
hstove marked this conversation as resolved.
Show resolved Hide resolved
let size = builder.get_bytes_so_far();
let cost = builder.tenure_finish(tenure_tx)?;

Expand Down
Loading