diff --git a/crates/sui-protocol-config/src/lib.rs b/crates/sui-protocol-config/src/lib.rs index 7d2ab3ae2a497..3ed7290763429 100644 --- a/crates/sui-protocol-config/src/lib.rs +++ b/crates/sui-protocol-config/src/lib.rs @@ -131,6 +131,7 @@ const MAX_PROTOCOL_VERSION: u64 = 47; // Enable resharing at the same initial shared version. // Version 47: Use tonic networking for Mysticeti. // Resolve Move abort locations to the package id instead of the runtime module ID. +// Enable random beacon in testnet. #[derive(Copy, Clone, Debug, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct ProtocolVersion(u64); @@ -2219,6 +2220,14 @@ impl ProtocolConfig { // Enable resolving abort code IDs to package ID instead of runtime module ID cfg.feature_flags.resolve_abort_locations_to_package_id = true; + + // Enable random beacon on testnet. + if chain != Chain::Mainnet { + cfg.feature_flags.random_beacon = true; + cfg.random_beacon_reduction_lower_bound = Some(1600); + cfg.random_beacon_dkg_timeout_round = Some(3000); + cfg.random_beacon_min_round_interval_ms = Some(200); + } } // Use this template when making changes: // diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap index f20e78a2f2e09..372ed8010cc10 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap @@ -32,6 +32,7 @@ feature_flags: simple_conservation_checks: true loaded_child_object_format_type: true receive_objects: true + random_beacon: true bridge: true enable_effects_v2: true narwhal_certificate_v2: true @@ -268,6 +269,9 @@ consensus_bad_nodes_stake_threshold: 20 max_jwk_votes_per_validator_per_epoch: 240 max_age_of_jwk_in_epochs: 1 random_beacon_reduction_allowed_delta: 800 +random_beacon_reduction_lower_bound: 1600 +random_beacon_dkg_timeout_round: 3000 +random_beacon_min_round_interval_ms: 200 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 6291456 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap index fb5d7a5f9f56e..8356eeb1f322b 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap @@ -275,7 +275,7 @@ max_age_of_jwk_in_epochs: 1 random_beacon_reduction_allowed_delta: 800 random_beacon_reduction_lower_bound: 1600 random_beacon_dkg_timeout_round: 3000 -random_beacon_min_round_interval_ms: 150 +random_beacon_min_round_interval_ms: 200 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 6291456