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

zcash_protocol: Set the public mainnet activation height for NU6 #1548

Merged
merged 1 commit into from
Oct 2, 2024
Merged
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 components/zcash_protocol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this library adheres to Rust's notion of
height from another yields the delta between them.

### Changed
- Mainnet activation height has been set for `consensus::BranchId::Nu6`.
- Adding a delta to a `BlockHeight` now uses saturating addition.
- Subtracting a delta to a `BlockHeight` now uses saturating subtraction.

Expand Down
12 changes: 10 additions & 2 deletions components/zcash_protocol/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl Parameters for MainNetwork {
NetworkUpgrade::Heartwood => Some(BlockHeight(903_000)),
NetworkUpgrade::Canopy => Some(BlockHeight(1_046_400)),
NetworkUpgrade::Nu5 => Some(BlockHeight(1_687_104)),
NetworkUpgrade::Nu6 => None,
NetworkUpgrade::Nu6 => Some(BlockHeight(2_726_400)),
#[cfg(zcash_unstable = "zfuture")]
NetworkUpgrade::ZFuture => None,
}
Expand Down Expand Up @@ -769,8 +769,16 @@ mod tests {
BranchId::Nu5,
);
assert_eq!(
BranchId::for_height(&MAIN_NETWORK, BlockHeight(5_000_000)),
BranchId::for_height(&MAIN_NETWORK, BlockHeight(2_726_399)),
BranchId::Nu5,
);
assert_eq!(
BranchId::for_height(&MAIN_NETWORK, BlockHeight(2_726_400)),
BranchId::Nu6,
);
assert_eq!(
BranchId::for_height(&MAIN_NETWORK, BlockHeight(5_000_000)),
BranchId::Nu6,
);
}
}
Loading