Skip to content
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
5 changes: 5 additions & 0 deletions pkgs/params/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
## [Unreleased]

- Initial release.

### Changed

- **`ChainParams` drops the runtime-policy fields** `prune_after_height`, `assumed_blockchain_size_gb`,
`assumed_chain_state_size_gb`, `default_consistency_checks` and `is_mockable_chain`.
28 changes: 27 additions & 1 deletion pkgs/params/corpus/chainparams.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Chain parameter vectors. Generated with the reference implementation
// (dashpay/dash v24.0.0-rc.3, 0364ed626e).
// (dashpay/dash v24.0.0-rc.5, 8163290aa0).
//
// Each entry is the output of the command above it, keyed by chain. The node
// of each chain runs with an empty data directory and no connections, so it
Expand Down Expand Up @@ -143,6 +143,32 @@
"type": "buried",
"active": false,
"height": 2201472
},
"v24": {
"type": "bip9",
"active": false,
"bip9": {
"start_time": 1794182400,
"timeout": 1857340800,
"ehf": true,
"min_activation_height": 0,
"status": "defined",
"since": 0,
"status_next": "defined"
}
},
"evo_shares": {
"type": "bip9",
"active": false,
"bip9": {
"start_time": 1794182400,
"timeout": 1857340800,
"ehf": true,
"min_activation_height": 0,
"status": "defined",
"since": 0,
"status_next": "defined"
}
}
}
},
Expand Down
10 changes: 0 additions & 10 deletions pkgs/params/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ pub struct ChainParams {
pub rpc_port: u16,
/// Tor onion service target port.
pub onion_service_target_port: u16,
/// Height after which pruning may discard blocks.
pub prune_after_height: u64,
/// Estimated full blockchain size in gigabytes.
pub assumed_blockchain_size_gb: u64,
/// Estimated chain-state size in gigabytes.
pub assumed_chain_state_size_gb: u64,
/// DNS seed hostnames for peer discovery.
pub dns_seeds: &'static [&'static str],
/// Address encoding parameters.
Expand All @@ -60,10 +54,6 @@ pub struct ChainParams {
pub network_id: &'static str,
/// Whether this is a test network.
pub is_test_chain: bool,
/// Whether internal consistency checks run by default.
pub default_consistency_checks: bool,
/// Whether the chain allows mock time and state.
pub is_mockable_chain: bool,
/// Minimum participants for a CoinJoin session.
pub pool_min_participants: i32,
/// Maximum participants for a CoinJoin session.
Expand Down
26 changes: 11 additions & 15 deletions pkgs/params/src/params/mainnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ pub static PARAMS: ChainParams = ChainParams {
},
v24: Bip9Deployment {
bit: 13,
start_time: Bip9Deployment::NEVER_ACTIVE,
timeout: Bip9Deployment::NO_TIMEOUT,
start_time: 1_794_182_400, // 9 November 2026, midnight UTC
timeout: 1_857_340_800, // 9 November 2028, midnight UTC
min_activation_height: BlockHeight::from_u32(0),
window_size: 4032,
threshold_start: 3226, // 80% of 4032
Expand All @@ -87,8 +87,8 @@ pub static PARAMS: ChainParams = ChainParams {
},
evo_shares: Bip9Deployment {
bit: 14,
start_time: Bip9Deployment::NEVER_ACTIVE,
timeout: Bip9Deployment::NO_TIMEOUT,
start_time: 1_794_182_400, // 9 November 2026, midnight UTC
timeout: 1_857_340_800, // 9 November 2028, midnight UTC
min_activation_height: BlockHeight::from_u32(0),
window_size: 4032,
threshold_start: 3226, // 80% of 4032
Expand All @@ -105,10 +105,10 @@ pub static PARAMS: ChainParams = ChainParams {
pow_kgw_height: BlockHeight::from_u32(15_200),
pow_dgw_height: BlockHeight::from_u32(34_140),
minimum_chain_work: Arith256::from_bendian(hex!(
"00000000000000000000000000000000000000000000ba7225adc3153945d14d"
"00000000000000000000000000000000000000000000c15981a81af44a6abe1a"
)),
default_assume_valid: Hash256::from_bendian(hex!(
"00000000000000119fe42827219e0686d3f7b494ae65f823194c740c5dbab492"
"000000000000000346a1804da4832b0b69dd9a7f96b14c7cb54585a9ac6ae98f"
)),
llmqs: &[
LlmqType::Llmq50_60,
Expand Down Expand Up @@ -137,9 +137,6 @@ pub static PARAMS: ChainParams = ChainParams {
default_platform_http_port: 443,
rpc_port: 9998,
onion_service_target_port: 9996,
prune_after_height: 100_000,
assumed_blockchain_size_gb: 57,
assumed_chain_state_size_gb: 1,
dns_seeds: &["dnsseed.dash.org."],
addr_params: AddrParams {
pubkey_addr: 76, // addresses start with 'X'
Expand All @@ -152,22 +149,20 @@ pub static PARAMS: ChainParams = ChainParams {
},
network_id: "main",
is_test_chain: false,
default_consistency_checks: false,
is_mockable_chain: false,
pool_min_participants: 3,
pool_max_participants: 20,
spork_address: "Xgtyuk76vhuFW2iT7UAiHgNdWXCf3J34wh",
credit_pool_period_blocks: 576,
checkpoints: &CHECKPOINTS,
chain_tx_data: ChainTxData {
timestamp: 1_781_318_234,
tx_count: 69_770_814,
tx_rate: 0.1569520632249578,
timestamp: 1_793_218_693,
tx_count: 71_411_418,
tx_rate: 0.1306891420721072,
},
};

#[rustfmt::skip]
const CHECKPOINTS: [Checkpoint; 39] = [
const CHECKPOINTS: [Checkpoint; 40] = [
(BlockHeight::from_u32( 1_500), Hash256::from_bendian(hex!("000000aaf0300f59f49bc3e970bad15c11f961fe2347accffff19d96ec9778e3"))),
(BlockHeight::from_u32( 4_991), Hash256::from_bendian(hex!("000000003b01809551952460744d5dbb8fcbd6cbae3c220267bf7fa43f837367"))),
(BlockHeight::from_u32( 9_918), Hash256::from_bendian(hex!("00000000213e229f332c0ffbe34defdaa9e74de87f2d8d1f01af8d121c3c170b"))),
Expand Down Expand Up @@ -207,4 +202,5 @@ const CHECKPOINTS: [Checkpoint; 39] = [
(BlockHeight::from_u32(2_421_800), Hash256::from_bendian(hex!("000000000000000718ed026ebd644a8b70b42d4cbd7b25304c066c9bf15f85b7"))),
(BlockHeight::from_u32(2_471_728), Hash256::from_bendian(hex!("000000000000001a19ad7270422a00f86123ea94e0b295a3a796d6861bd7b032"))),
(BlockHeight::from_u32(2_487_500), Hash256::from_bendian(hex!("00000000000000119fe42827219e0686d3f7b494ae65f823194c740c5dbab492"))),
(BlockHeight::from_u32(2_563_000), Hash256::from_bendian(hex!("000000000000000346a1804da4832b0b69dd9a7f96b14c7cb54585a9ac6ae98f"))),
];
5 changes: 0 additions & 5 deletions pkgs/params/src/params/regtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ pub static PARAMS: ChainParams = ChainParams {
default_platform_http_port: 22201,
rpc_port: 19898,
onion_service_target_port: 19896,
prune_after_height: 1000,
assumed_blockchain_size_gb: 0,
assumed_chain_state_size_gb: 0,
dns_seeds: &["dummySeed.invalid."],
addr_params: AddrParams {
pubkey_addr: 140, // addresses start with 'y'
Expand All @@ -140,8 +137,6 @@ pub static PARAMS: ChainParams = ChainParams {
},
network_id: "regtest",
is_test_chain: true,
default_consistency_checks: true,
is_mockable_chain: true,
pool_min_participants: 2,
pool_max_participants: 20,
spork_address: "yj949n1UH6fDhw6HtVE5VMj2iSTaSWBMcW",
Expand Down
18 changes: 7 additions & 11 deletions pkgs/params/src/params/test3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ pub static PARAMS: ChainParams = ChainParams {
pow_kgw_height: BlockHeight::from_u32(4002),
pow_dgw_height: BlockHeight::from_u32(4002),
minimum_chain_work: Arith256::from_bendian(hex!(
"000000000000000000000000000000000000000000000000036c8f738da818d2"
"00000000000000000000000000000000000000000000000003ed573a939487fc"
)),
default_assume_valid: Hash256::from_bendian(hex!(
"000000541a23f9db7411cddbe50f9f1ebd4aa7108ebdcad62214753f648c0239"
"000000116cd3c11d44c88cbc0a26804bd277a5d790f684ec3a8aaa820690318c"
)),
llmqs: &[
LlmqType::Llmq50_60,
Expand Down Expand Up @@ -136,9 +136,6 @@ pub static PARAMS: ChainParams = ChainParams {
default_platform_http_port: 22001,
rpc_port: 19998,
onion_service_target_port: 19996,
prune_after_height: 1000,
assumed_blockchain_size_gb: 10,
assumed_chain_state_size_gb: 1,
dns_seeds: &["testnet-seed.dashdot.io."],
addr_params: AddrParams {
pubkey_addr: 140, // addresses start with 'y'
Expand All @@ -151,22 +148,20 @@ pub static PARAMS: ChainParams = ChainParams {
},
network_id: "test",
is_test_chain: true,
default_consistency_checks: false,
is_mockable_chain: false,
pool_min_participants: 2,
pool_max_participants: 20,
spork_address: "yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55",
credit_pool_period_blocks: 576,
checkpoints: &CHECKPOINTS,
chain_tx_data: ChainTxData {
timestamp: 1_765_334_452,
tx_count: 8_182_713,
tx_rate: 0.1796716675173412,
timestamp: 1_788_899_589,
tx_count: 8_494_561,
tx_rate: 0.0139463532250889,
},
};

#[rustfmt::skip]
const CHECKPOINTS: [Checkpoint; 19] = [
const CHECKPOINTS: [Checkpoint; 20] = [
(BlockHeight::from_u32( 255), Hash256::from_bendian(hex!("0000080b600e06f4c07880673f027210f9314575f5f875fafe51971e268b886a"))),
(BlockHeight::from_u32( 261), Hash256::from_bendian(hex!("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))),
(BlockHeight::from_u32( 1_999), Hash256::from_bendian(hex!("00000052e538d27fa53693efe6fb6892a0c1d26c0235f599171c48a3cce553b1"))),
Expand All @@ -186,4 +181,5 @@ const CHECKPOINTS: [Checkpoint; 19] = [
(BlockHeight::from_u32(1_189_000), Hash256::from_bendian(hex!("000001690314036dfbbecbdf382b230ead8e9c584241290a51f9f05a87a9cf7e"))),
(BlockHeight::from_u32(1_295_700), Hash256::from_bendian(hex!("00000107d42829a38e31c1a38c660d621e1ca376a880df1520e85e38af175d3a"))),
(BlockHeight::from_u32(1_380_000), Hash256::from_bendian(hex!("000000a98084beaf77ed26a905a7d59979009e23367a55b5d634962d7d65a1f9"))),
(BlockHeight::from_u32(1_550_000), Hash256::from_bendian(hex!("000000116cd3c11d44c88cbc0a26804bd277a5d790f684ec3a8aaa820690318c"))),
];
Loading