-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(consensus): Add
slow_start_{interval/shift}
fields to `testnet:…
…:Parameters` (#8477) * - Adds `slow_start_interval` field to `testnet::Parameters` - Moves SLOW_START_INTERVAL/SLOW_START_SHIFT constants to zebra-chain * Apply suggestions from code review Co-authored-by: Marek <[email protected]> --------- Co-authored-by: Marek <[email protected]>
- Loading branch information
Showing
8 changed files
with
96 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Definitions of Zebra chain constants, including: | ||
//! - slow start interval, | ||
//! - slow start shift | ||
|
||
use crate::block::Height; | ||
|
||
/// An initial period from Genesis to this Height where the block subsidy is gradually incremented. [What is slow-start mining][slow-mining] | ||
/// | ||
/// [slow-mining]: https://z.cash/support/faq/#what-is-slow-start-mining | ||
pub const SLOW_START_INTERVAL: Height = Height(20_000); | ||
|
||
/// `SlowStartShift()` as described in [protocol specification §7.8][7.8] | ||
/// | ||
/// [7.8]: https://zips.z.cash/protocol/protocol.pdf#subsidies | ||
/// | ||
/// This calculation is exact, because `SLOW_START_INTERVAL` is divisible by 2. | ||
pub const SLOW_START_SHIFT: Height = Height(SLOW_START_INTERVAL.0 / 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters