diff --git a/pkgs/params/CHANGELOG.md b/pkgs/params/CHANGELOG.md index 89ee5bcf0..c17db652a 100644 --- a/pkgs/params/CHANGELOG.md +++ b/pkgs/params/CHANGELOG.md @@ -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`. diff --git a/pkgs/params/corpus/chainparams.json5 b/pkgs/params/corpus/chainparams.json5 index f62551627..f3a92479d 100644 --- a/pkgs/params/corpus/chainparams.json5 +++ b/pkgs/params/corpus/chainparams.json5 @@ -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 @@ -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" + } } } }, diff --git a/pkgs/params/src/chain.rs b/pkgs/params/src/chain.rs index 6695126e6..36a143433 100644 --- a/pkgs/params/src/chain.rs +++ b/pkgs/params/src/chain.rs @@ -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. @@ -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. diff --git a/pkgs/params/src/params/mainnet.rs b/pkgs/params/src/params/mainnet.rs index 56cc9153e..f756c5e32 100644 --- a/pkgs/params/src/params/mainnet.rs +++ b/pkgs/params/src/params/mainnet.rs @@ -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 @@ -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 @@ -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, @@ -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' @@ -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"))), @@ -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"))), ]; diff --git a/pkgs/params/src/params/regtest.rs b/pkgs/params/src/params/regtest.rs index c7d8756af..50dc79e73 100644 --- a/pkgs/params/src/params/regtest.rs +++ b/pkgs/params/src/params/regtest.rs @@ -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' @@ -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", diff --git a/pkgs/params/src/params/test3.rs b/pkgs/params/src/params/test3.rs index 2e4c4a2dc..89afe413e 100644 --- a/pkgs/params/src/params/test3.rs +++ b/pkgs/params/src/params/test3.rs @@ -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, @@ -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' @@ -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"))), @@ -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"))), ];