From 72e54057fc8fe651334772d5918c687a28d21a78 Mon Sep 17 00:00:00 2001 From: Zhe Wu Date: Mon, 14 Oct 2024 23:33:00 -0700 Subject: [PATCH] Implement gas budget based congestion control with PTB/Obj cap (#19853) ## Description Introducing a new congestion control mechanism using gas budget as estimate but cap transaction cost based on transaction shape. ## Test plan Unit test Integration test --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- crates/sui-benchmark/tests/simtest.rs | 16 +- .../authority/authority_per_epoch_store.rs | 4 + .../shared_object_congestion_tracker.rs | 155 +++++++- .../src/unit_tests/authority_tests.rs | 18 + .../unit_tests/congestion_control_tests.rs | 1 + crates/sui-graphql-rpc/tests/e2e_tests.rs | 2 - crates/sui-open-rpc/spec/openrpc.json | 3 +- crates/sui-protocol-config/src/lib.rs | 26 +- ...ocol_config__test__Mainnet_version_63.snap | 9 +- ...ocol_config__test__Mainnet_version_64.snap | 329 +++++++++++++++++ ...ocol_config__test__Testnet_version_63.snap | 8 +- ...ocol_config__test__Testnet_version_64.snap | 329 +++++++++++++++++ ...sui_protocol_config__test__version_63.snap | 8 +- ...sui_protocol_config__test__version_64.snap | 339 ++++++++++++++++++ ...ests__genesis_config_snapshot_matches.snap | 3 +- ..._populated_genesis_snapshot_matches-2.snap | 31 +- 16 files changed, 1230 insertions(+), 51 deletions(-) create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_64.snap create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_64.snap create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_64.snap diff --git a/crates/sui-benchmark/tests/simtest.rs b/crates/sui-benchmark/tests/simtest.rs index b7d2e189da3a2..9f3e36b1998bd 100644 --- a/crates/sui-benchmark/tests/simtest.rs +++ b/crates/sui-benchmark/tests/simtest.rs @@ -463,10 +463,14 @@ mod test { let max_deferral_rounds; { let mut rng = thread_rng(); - mode = if rng.gen_bool(0.5) { + mode = if rng.gen_bool(0.33) { PerObjectCongestionControlMode::TotalGasBudget } else { - PerObjectCongestionControlMode::TotalTxCount + if rng.gen_bool(0.5) { + PerObjectCongestionControlMode::TotalTxCount + } else { + PerObjectCongestionControlMode::TotalGasBudgetWithCap + } }; checkpoint_budget_factor = rng.gen_range(1..20); txn_count_limit = rng.gen_range(1..=10); @@ -504,6 +508,14 @@ mod test { txn_count_limit ); }, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => { + let total_gas_limit = checkpoint_budget_factor + * DEFAULT_VALIDATOR_GAS_PRICE + * TEST_ONLY_GAS_UNIT_FOR_HEAVY_COMPUTATION_STORAGE; + config.set_max_accumulated_txn_cost_per_object_in_narwhal_commit_for_testing(total_gas_limit); + config.set_max_accumulated_txn_cost_per_object_in_mysticeti_commit_for_testing(total_gas_limit); + config.set_gas_budget_based_txn_cost_cap_factor_for_testing(total_gas_limit); // Not sure what to set here. + }, } config.set_max_deferral_rounds_for_congestion_control_for_testing(max_deferral_rounds); config diff --git a/crates/sui-core/src/authority/authority_per_epoch_store.rs b/crates/sui-core/src/authority/authority_per_epoch_store.rs index 3f1939b01b894..70c1e98bbb2e1 100644 --- a/crates/sui-core/src/authority/authority_per_epoch_store.rs +++ b/crates/sui-core/src/authority/authority_per_epoch_store.rs @@ -3156,10 +3156,14 @@ impl AuthorityPerEpochStore { // they will be in different checkpoints. let mut shared_object_congestion_tracker = SharedObjectCongestionTracker::new( self.protocol_config().per_object_congestion_control_mode(), + self.protocol_config() + .gas_budget_based_txn_cost_cap_factor_as_option(), ); let mut shared_object_using_randomness_congestion_tracker = SharedObjectCongestionTracker::new( self.protocol_config().per_object_congestion_control_mode(), + self.protocol_config() + .gas_budget_based_txn_cost_cap_factor_as_option(), ); fail_point_arg!( diff --git a/crates/sui-core/src/authority/shared_object_congestion_tracker.rs b/crates/sui-core/src/authority/shared_object_congestion_tracker.rs index 041e523594074..237d400114a43 100644 --- a/crates/sui-core/src/authority/shared_object_congestion_tracker.rs +++ b/crates/sui-core/src/authority/shared_object_congestion_tracker.rs @@ -7,7 +7,7 @@ use std::collections::HashMap; use sui_protocol_config::PerObjectCongestionControlMode; use sui_types::base_types::{ObjectID, TransactionDigest}; use sui_types::executable_transaction::VerifiedExecutableTransaction; -use sui_types::transaction::SharedInputObject; +use sui_types::transaction::{Argument, SharedInputObject, TransactionDataAPI}; // SharedObjectCongestionTracker stores the accumulated cost of executing transactions on an object, for // all transactions in a consensus commit. @@ -25,19 +25,25 @@ use sui_types::transaction::SharedInputObject; pub struct SharedObjectCongestionTracker { object_execution_cost: HashMap, mode: PerObjectCongestionControlMode, + gas_budget_based_txn_cost_cap_factor: Option, } impl SharedObjectCongestionTracker { - pub fn new(mode: PerObjectCongestionControlMode) -> Self { + pub fn new( + mode: PerObjectCongestionControlMode, + gas_budget_based_txn_cost_cap_factor: Option, + ) -> Self { Self { object_execution_cost: HashMap::new(), mode, + gas_budget_based_txn_cost_cap_factor, } } pub fn new_with_initial_value_for_test( init_values: &[(ObjectID, u64)], mode: PerObjectCongestionControlMode, + gas_budget_based_txn_cost_cap_factor: Option, ) -> Self { let mut object_execution_cost = HashMap::new(); for (object_id, total_cost) in init_values { @@ -46,6 +52,7 @@ impl SharedObjectCongestionTracker { Self { object_execution_cost, mode, + gas_budget_based_txn_cost_cap_factor, } } @@ -67,6 +74,9 @@ impl SharedObjectCongestionTracker { PerObjectCongestionControlMode::None => None, PerObjectCongestionControlMode::TotalGasBudget => Some(cert.gas_budget()), PerObjectCongestionControlMode::TotalTxCount => Some(1), + PerObjectCongestionControlMode::TotalGasBudgetWithCap => { + Some(std::cmp::min(cert.gas_budget(), self.get_tx_cost_cap(cert))) + } } } @@ -154,6 +164,25 @@ impl SharedObjectCongestionTracker { .copied() .unwrap_or(0) } + + fn get_tx_cost_cap(&self, cert: &VerifiedExecutableTransaction) -> u64 { + let mut number_of_move_call = 0; + let mut number_of_move_input = 0; + for command in cert.transaction_data().kind().iter_commands() { + if let sui_types::transaction::Command::MoveCall(move_call) = command { + number_of_move_call += 1; + for aug in move_call.arguments.iter() { + if let Argument::Input(_) = aug { + number_of_move_input += 1; + } + } + } + } + (number_of_move_call + number_of_move_input) as u64 + * self + .gas_budget_based_txn_cost_cap_factor + .expect("cap factor must be set if TotalGasBudgetWithCap mode is used.") + } } #[cfg(test)] @@ -164,7 +193,9 @@ mod object_cost_tests { use sui_test_transaction_builder::TestTransactionBuilder; use sui_types::base_types::{random_object_ref, SequenceNumber}; use sui_types::crypto::{get_key_pair, AccountKeyPair}; + use sui_types::programmable_transaction_builder::ProgrammableTransactionBuilder; use sui_types::transaction::{CallArg, ObjectArg, VerifiedTransaction}; + use sui_types::Identifier; fn construct_shared_input_objects(objects: &[(ObjectID, bool)]) -> Vec { objects @@ -187,6 +218,7 @@ mod object_cost_tests { SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(object_id_0, 5), (object_id_1, 10)], PerObjectCongestionControlMode::TotalGasBudget, + None, ); let shared_input_objects = construct_shared_input_objects(&[(object_id_0, false)]); @@ -257,11 +289,56 @@ mod object_cost_tests { ) } + fn build_programmable_transaction( + objects: &[(ObjectID, bool)], + number_of_commands: u64, + gas_budget: u64, + ) -> VerifiedExecutableTransaction { + let (sender, keypair): (_, AccountKeyPair) = get_key_pair(); + let gas_object = random_object_ref(); + + let package_id = ObjectID::random(); + let mut pt_builder = ProgrammableTransactionBuilder::new(); + let mut arguments = Vec::new(); + for object in objects { + arguments.push( + pt_builder + .obj(ObjectArg::SharedObject { + id: object.0, + initial_shared_version: SequenceNumber::new(), + mutable: object.1, + }) + .unwrap(), + ); + } + for _ in 0..number_of_commands { + pt_builder.programmable_move_call( + package_id, + Identifier::new("unimportant_module").unwrap(), + Identifier::new("unimportant_function").unwrap(), + vec![], + arguments.clone(), + ); + } + + let pt = pt_builder.finish(); + VerifiedExecutableTransaction::new_system( + VerifiedTransaction::new_unchecked( + TestTransactionBuilder::new(sender, gas_object, 1000) + .with_gas_budget(gas_budget) + .programmable(pt) + .build_and_sign(&keypair), + ), + 0, + ) + } + #[rstest] fn test_should_defer_return_correct_congested_objects( #[values( PerObjectCongestionControlMode::TotalGasBudget, - PerObjectCongestionControlMode::TotalTxCount + PerObjectCongestionControlMode::TotalTxCount, + PerObjectCongestionControlMode::TotalGasBudgetWithCap )] mode: PerObjectCongestionControlMode, ) { @@ -276,6 +353,7 @@ mod object_cost_tests { PerObjectCongestionControlMode::None => unreachable!(), PerObjectCongestionControlMode::TotalGasBudget => tx_gas_budget + 1, PerObjectCongestionControlMode::TotalTxCount => 2, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => tx_gas_budget - 1, }; let shared_object_congestion_tracker = match mode { @@ -288,6 +366,7 @@ mod object_cost_tests { SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(shared_obj_0, 10), (shared_obj_1, 1)], mode, + None, ) } PerObjectCongestionControlMode::TotalTxCount => { @@ -298,6 +377,18 @@ mod object_cost_tests { SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(shared_obj_0, 2), (shared_obj_1, 1)], mode, + None, + ) + } + PerObjectCongestionControlMode::TotalGasBudgetWithCap => { + // Construct object execution cost as following + // 1 10 + // object 0: | + // object 1: | + SharedObjectCongestionTracker::new_with_initial_value_for_test( + &[(shared_obj_0, 10), (shared_obj_1, 1)], + mode, + Some(45), // Make the cap just less than the gas budget, there are 1 objects in tx. ) } }; @@ -321,6 +412,8 @@ mod object_cost_tests { } // Read/write to object 1 should go through. + // When congestion control mode is TotalGasBudgetWithCap, even though the gas budget is over the limit, + // the cap should prevent the transaction from being deferred. for mutable in [true, false].iter() { let tx = build_transaction(&[(shared_obj_1, *mutable)], tx_gas_budget); assert!(shared_object_congestion_tracker @@ -361,7 +454,8 @@ mod object_cost_tests { fn test_should_defer_return_correct_deferral_key( #[values( PerObjectCongestionControlMode::TotalGasBudget, - PerObjectCongestionControlMode::TotalTxCount + PerObjectCongestionControlMode::TotalTxCount, + PerObjectCongestionControlMode::TotalGasBudgetWithCap )] mode: PerObjectCongestionControlMode, ) { @@ -369,7 +463,7 @@ mod object_cost_tests { let tx = build_transaction(&[(shared_obj_0, true)], 100); // Make should_defer_due_to_object_congestion always defer transactions. let max_accumulated_txn_cost_per_object_in_commit = 0; - let shared_object_congestion_tracker = SharedObjectCongestionTracker::new(mode); + let shared_object_congestion_tracker = SharedObjectCongestionTracker::new(mode, Some(2)); // Insert a random pre-existing transaction. let mut previously_deferred_tx_digests = HashMap::new(); @@ -460,7 +554,8 @@ mod object_cost_tests { fn test_bump_object_execution_cost( #[values( PerObjectCongestionControlMode::TotalGasBudget, - PerObjectCongestionControlMode::TotalTxCount + PerObjectCongestionControlMode::TotalTxCount, + PerObjectCongestionControlMode::TotalGasBudgetWithCap )] mode: PerObjectCongestionControlMode, ) { @@ -468,10 +563,13 @@ mod object_cost_tests { let object_id_1 = ObjectID::random(); let object_id_2 = ObjectID::random(); + let cap_factor = Some(1); + let mut shared_object_congestion_tracker = SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(object_id_0, 5), (object_id_1, 10)], mode, + cap_factor, ); assert_eq!(shared_object_congestion_tracker.max_cost(), 10); @@ -482,7 +580,8 @@ mod object_cost_tests { shared_object_congestion_tracker, SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(object_id_0, 5), (object_id_1, 10)], - mode + mode, + cap_factor, ) ); assert_eq!(shared_object_congestion_tracker.max_cost(), 10); @@ -494,12 +593,14 @@ mod object_cost_tests { PerObjectCongestionControlMode::None => unreachable!(), PerObjectCongestionControlMode::TotalGasBudget => 20, PerObjectCongestionControlMode::TotalTxCount => 11, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => 13, // 2 objects, 1 command. }; assert_eq!( shared_object_congestion_tracker, SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(object_id_0, expected_object_0_cost), (object_id_1, 10)], - mode + mode, + cap_factor, ) ); assert_eq!( @@ -520,6 +621,41 @@ mod object_cost_tests { PerObjectCongestionControlMode::None => unreachable!(), PerObjectCongestionControlMode::TotalGasBudget => 30, PerObjectCongestionControlMode::TotalTxCount => 12, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => 17, // 3 objects, 1 command + }; + shared_object_congestion_tracker.bump_object_execution_cost(&cert); + assert_eq!( + shared_object_congestion_tracker, + SharedObjectCongestionTracker::new_with_initial_value_for_test( + &[ + (object_id_0, expected_object_cost), + (object_id_1, expected_object_cost), + (object_id_2, expected_object_cost) + ], + mode, + cap_factor, + ) + ); + assert_eq!( + shared_object_congestion_tracker.max_cost(), + expected_object_cost + ); + + // Write to all objects with PTBs containing 7 commands. + let cert = build_programmable_transaction( + &[ + (object_id_0, true), + (object_id_1, true), + (object_id_2, true), + ], + 7, + 30, + ); + let expected_object_cost = match mode { + PerObjectCongestionControlMode::None => unreachable!(), + PerObjectCongestionControlMode::TotalGasBudget => 60, + PerObjectCongestionControlMode::TotalTxCount => 13, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => 45, // 3 objects, 7 commands }; shared_object_congestion_tracker.bump_object_execution_cost(&cert); assert_eq!( @@ -530,7 +666,8 @@ mod object_cost_tests { (object_id_1, expected_object_cost), (object_id_2, expected_object_cost) ], - mode + mode, + cap_factor, ) ); assert_eq!( diff --git a/crates/sui-core/src/unit_tests/authority_tests.rs b/crates/sui-core/src/unit_tests/authority_tests.rs index 71b406679101a..70ec3e454c5de 100644 --- a/crates/sui-core/src/unit_tests/authority_tests.rs +++ b/crates/sui-core/src/unit_tests/authority_tests.rs @@ -5866,6 +5866,7 @@ async fn test_consensus_handler_per_object_congestion_control( PerObjectCongestionControlMode::None => unreachable!(), PerObjectCongestionControlMode::TotalGasBudget => 5, PerObjectCongestionControlMode::TotalTxCount => 2, + PerObjectCongestionControlMode::TotalGasBudgetWithCap => 5, }; let gas_objects_commit_1 = create_gas_objects(5 + non_congested_tx_count, sender); let gas_objects_commit_2 = create_gas_objects(non_congested_tx_count, sender); @@ -5891,6 +5892,15 @@ async fn test_consensus_handler_per_object_congestion_control( protocol_config .set_max_accumulated_txn_cost_per_object_in_mysticeti_commit_for_testing(2); } + PerObjectCongestionControlMode::TotalGasBudgetWithCap => { + protocol_config + .set_max_accumulated_txn_cost_per_object_in_narwhal_commit_for_testing(200_000_000); + protocol_config + .set_max_accumulated_txn_cost_per_object_in_mysticeti_commit_for_testing( + 200_000_000, + ); + protocol_config.set_gas_budget_based_txn_cost_cap_factor_for_testing(100_000_000); + } } protocol_config.set_max_deferral_rounds_for_congestion_control_for_testing(1000); // Set to a large number so that we don't hit this limit. let authority = TestAuthorityBuilder::new() @@ -6082,6 +6092,14 @@ async fn test_consensus_handler_per_object_congestion_control_using_tx_count() { .await; } +#[sim_test] +async fn test_consensus_handler_per_object_congestion_control_using_budget_with_cap() { + test_consensus_handler_per_object_congestion_control( + PerObjectCongestionControlMode::TotalGasBudgetWithCap, + ) + .await; +} + // Tests congestion control triggered transaction cancellation in consensus handler: // 1. Consensus handler cancels transactions that are deferred for too many rounds. // 2. Shared locks for cancelled transaction are set correctly. diff --git a/crates/sui-core/src/unit_tests/congestion_control_tests.rs b/crates/sui-core/src/unit_tests/congestion_control_tests.rs index 4890b2006644b..24a6defc2b407 100644 --- a/crates/sui-core/src/unit_tests/congestion_control_tests.rs +++ b/crates/sui-core/src/unit_tests/congestion_control_tests.rs @@ -301,6 +301,7 @@ async fn test_congestion_control_execution_cancellation() { SharedObjectCongestionTracker::new_with_initial_value_for_test( &[(shared_object_1.0, 10)], PerObjectCongestionControlMode::TotalGasBudget, + Some(1000), // Not used. ), ) }); diff --git a/crates/sui-graphql-rpc/tests/e2e_tests.rs b/crates/sui-graphql-rpc/tests/e2e_tests.rs index 391e0a30c5dc3..b51f94e40ccea 100644 --- a/crates/sui-graphql-rpc/tests/e2e_tests.rs +++ b/crates/sui-graphql-rpc/tests/e2e_tests.rs @@ -277,8 +277,6 @@ async fn test_graphql_client_variables() { #[tokio::test] async fn test_transaction_execution() { - telemetry_subscribers::init_for_testing(); - let cluster = start_cluster(ServiceConfig::test_defaults()).await; let addresses = cluster diff --git a/crates/sui-open-rpc/spec/openrpc.json b/crates/sui-open-rpc/spec/openrpc.json index 3e79af06960e6..6a0446837c8f2 100644 --- a/crates/sui-open-rpc/spec/openrpc.json +++ b/crates/sui-open-rpc/spec/openrpc.json @@ -1293,7 +1293,7 @@ "name": "Result", "value": { "minSupportedProtocolVersion": "1", - "maxSupportedProtocolVersion": "63", + "maxSupportedProtocolVersion": "64", "protocolVersion": "6", "featureFlags": { "accept_zklogin_in_multisig": false, @@ -1592,6 +1592,7 @@ "u64": "2" }, "execution_version": null, + "gas_budget_based_txn_cost_cap_factor": null, "gas_model_version": { "u64": "5" }, diff --git a/crates/sui-protocol-config/src/lib.rs b/crates/sui-protocol-config/src/lib.rs index 8afbaabb07511..67eee3da37382 100644 --- a/crates/sui-protocol-config/src/lib.rs +++ b/crates/sui-protocol-config/src/lib.rs @@ -18,7 +18,7 @@ use tracing::{info, warn}; /// The minimum and maximum protocol versions supported by this build. const MIN_PROTOCOL_VERSION: u64 = 1; -const MAX_PROTOCOL_VERSION: u64 = 63; +const MAX_PROTOCOL_VERSION: u64 = 64; // Record history of protocol version allocations here: // @@ -184,7 +184,8 @@ const MAX_PROTOCOL_VERSION: u64 = 63; // Further reduce minimum number of random beacon shares. // Add feature flag for Mysticeti fastpath. // Version 62: Makes the event's sending module package upgrade-aware. -// Version 63: Switch to distributed vote scoring in consensus in mainnet +// Version 63: Enable gas based congestion control in consensus commit. +// Version 64: Switch to distributed vote scoring in consensus in mainnet #[derive(Copy, Clone, Debug, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct ProtocolVersion(u64); @@ -578,8 +579,9 @@ impl ConsensusTransactionOrdering { pub enum PerObjectCongestionControlMode { #[default] None, // No congestion control. - TotalGasBudget, // Use txn gas budget as execution cost. - TotalTxCount, // Use total txn count as execution cost. + TotalGasBudget, // Use txn gas budget as execution cost. + TotalTxCount, // Use total txn count as execution cost. + TotalGasBudgetWithCap, // Use txn gas budget as execution cost with a cap. } impl PerObjectCongestionControlMode { @@ -1266,6 +1268,11 @@ pub struct ProtocolConfig { /// Configures the garbage collection depth for consensus. When is unset or `0` then the garbage collection /// is disabled. consensus_gc_depth: Option, + + /// Used to calculate the max transaction cost when using TotalGasBudgetWithCap as shard + /// object congestion control strategy. Basically the max transaction cost is calculated as + /// (num of input object + num of commands) * this factor. + gas_budget_based_txn_cost_cap_factor: Option, } // feature flags @@ -2136,6 +2143,8 @@ impl ProtocolConfig { max_accumulated_txn_cost_per_object_in_mysticeti_commit: None, consensus_gc_depth: None, + + gas_budget_based_txn_cost_cap_factor: None, // When adding a new constant, set it to None in the earliest version, like this: // new_constant: None, }; @@ -2818,8 +2827,13 @@ impl ProtocolConfig { cfg.feature_flags.relocate_event_module = true; } 63 => { - cfg.feature_flags.relocate_event_module = true; - + cfg.feature_flags.per_object_congestion_control_mode = + PerObjectCongestionControlMode::TotalGasBudgetWithCap; + cfg.gas_budget_based_txn_cost_cap_factor = Some(400_000); + cfg.max_accumulated_txn_cost_per_object_in_mysticeti_commit = Some(18_500_000); + cfg.max_accumulated_txn_cost_per_object_in_narwhal_commit = Some(240_000_000); + } + 64 => { // Enable distributed vote scoring for mainnet cfg.feature_flags .consensus_distributed_vote_scoring_strategy = true; diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_63.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_63.snap index eb321dbad8c7e..14410e41af35a 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_63.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_63.snap @@ -45,7 +45,7 @@ feature_flags: enable_coin_deny_list: true enable_group_ops_native_functions: true reject_mutable_random_on_entry_functions: true - per_object_congestion_control_mode: TotalTxCount + per_object_congestion_control_mode: TotalGasBudgetWithCap consensus_choice: Mysticeti consensus_network: Tonic zklogin_max_epoch_upper_bound_delta: 30 @@ -60,7 +60,6 @@ feature_flags: soft_bundle: true enable_coin_deny_list_v2: true rethrow_serialization_type_layout_errors: true - consensus_distributed_vote_scoring_strategy: true consensus_round_prober: true validate_identifier_inputs: true relocate_event_module: true @@ -319,11 +318,11 @@ random_beacon_dkg_version: 1 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 524288 consensus_max_num_transactions_in_block: 512 -max_accumulated_txn_cost_per_object_in_narwhal_commit: 100 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 max_deferral_rounds_for_congestion_control: 10 min_checkpoint_interval_ms: 200 checkpoint_summary_version_specific_data: 1 max_soft_bundle_size: 5 bridge_should_try_to_finalize_committee: true -max_accumulated_txn_cost_per_object_in_mysticeti_commit: 10 - +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_64.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_64.snap new file mode 100644 index 0000000000000..a7a8858f62cab --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_64.snap @@ -0,0 +1,329 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 64 +feature_flags: + package_upgrades: true + commit_root_state_digest: true + advance_epoch_start_time_in_safe_mode: true + loaded_child_objects_fixed: true + missing_type_is_compatibility_error: true + scoring_decision_with_validity_cutoff: true + consensus_order_end_of_epoch_last: true + disallow_adding_abilities_on_upgrade: true + disable_invariant_violation_check_in_swap_loc: true + advance_to_highest_supported_protocol_version: true + ban_entry_init: true + package_digest_hash_module: true + disallow_change_struct_type_params_on_upgrade: true + no_extraneous_module_bytes: true + narwhal_versioned_metadata: true + zklogin_auth: true + consensus_transaction_ordering: ByGasPrice + simplified_unwrap_then_delete: true + upgraded_multisig_supported: true + txn_base_cost_as_multiplier: true + shared_object_deletion: true + narwhal_new_leader_election_schedule: true + loaded_child_object_format: true + enable_jwk_consensus_updates: true + end_of_epoch_transaction_supported: true + 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 + verify_legacy_zklogin_address: true + recompute_has_public_transfer_in_execution: true + accept_zklogin_in_multisig: true + include_consensus_digest_in_prologue: true + hardened_otw_check: true + allow_receiving_object_id: true + enable_coin_deny_list: true + enable_group_ops_native_functions: true + reject_mutable_random_on_entry_functions: true + per_object_congestion_control_mode: TotalGasBudgetWithCap + consensus_choice: Mysticeti + consensus_network: Tonic + zklogin_max_epoch_upper_bound_delta: 30 + mysticeti_leader_scoring_and_schedule: true + reshare_at_same_initial_version: true + resolve_abort_locations_to_package_id: true + mysticeti_use_committed_subdag_digest: true + record_consensus_determined_version_assignments_in_prologue: true + fresh_vm_on_framework_upgrade: true + prepend_prologue_tx_in_consensus_commit_in_checkpoints: true + mysticeti_num_leaders_per_round: 1 + soft_bundle: true + enable_coin_deny_list_v2: true + rethrow_serialization_type_layout_errors: true + consensus_distributed_vote_scoring_strategy: true + consensus_round_prober: true + validate_identifier_inputs: true + relocate_event_module: true +max_tx_size_bytes: 131072 +max_input_objects: 2048 +max_size_written_objects: 5000000 +max_size_written_objects_system_tx: 50000000 +max_serialized_tx_effects_size_bytes: 524288 +max_serialized_tx_effects_size_bytes_system_tx: 8388608 +max_gas_payment_objects: 256 +max_modules_in_publish: 64 +max_package_dependencies: 32 +max_arguments: 512 +max_type_arguments: 16 +max_type_argument_depth: 16 +max_pure_argument_size: 16384 +max_programmable_tx_commands: 1024 +move_binary_format_version: 7 +min_move_binary_format_version: 6 +binary_module_handles: 100 +binary_struct_handles: 300 +binary_function_handles: 1500 +binary_function_instantiations: 750 +binary_signatures: 1000 +binary_constant_pool: 4000 +binary_identifiers: 10000 +binary_address_identifiers: 100 +binary_struct_defs: 200 +binary_struct_def_instantiations: 100 +binary_function_defs: 1000 +binary_field_handles: 500 +binary_field_instantiations: 250 +binary_friend_decls: 100 +max_move_object_size: 256000 +max_move_package_size: 102400 +max_publish_or_upgrade_per_ptb: 5 +max_tx_gas: 50000000000 +max_gas_price: 100000 +max_gas_computation_bucket: 5000000 +gas_rounding_step: 1000 +max_loop_depth: 5 +max_generic_instantiation_length: 32 +max_function_parameters: 128 +max_basic_blocks: 1024 +max_value_stack_size: 1024 +max_type_nodes: 256 +max_push_size: 10000 +max_struct_definitions: 200 +max_function_definitions: 1000 +max_fields_in_struct: 32 +max_dependency_depth: 100 +max_num_event_emit: 1024 +max_num_new_move_object_ids: 2048 +max_num_new_move_object_ids_system_tx: 32768 +max_num_deleted_move_object_ids: 2048 +max_num_deleted_move_object_ids_system_tx: 32768 +max_num_transferred_move_object_ids: 2048 +max_num_transferred_move_object_ids_system_tx: 32768 +max_event_emit_size: 256000 +max_event_emit_size_total: 65536000 +max_move_vector_len: 262144 +max_move_identifier_len: 128 +max_move_value_depth: 128 +max_back_edges_per_function: 10000 +max_back_edges_per_module: 10000 +max_verifier_meter_ticks_per_function: 16000000 +max_meter_ticks_per_module: 16000000 +max_meter_ticks_per_package: 16000000 +object_runtime_max_num_cached_objects: 1000 +object_runtime_max_num_cached_objects_system_tx: 16000 +object_runtime_max_num_store_entries: 1000 +object_runtime_max_num_store_entries_system_tx: 16000 +base_tx_cost_fixed: 1000 +package_publish_cost_fixed: 1000 +base_tx_cost_per_byte: 0 +package_publish_cost_per_byte: 80 +obj_access_cost_read_per_byte: 15 +obj_access_cost_mutate_per_byte: 40 +obj_access_cost_delete_per_byte: 40 +obj_access_cost_verify_per_byte: 200 +max_type_to_layout_nodes: 512 +gas_model_version: 8 +obj_data_cost_refundable: 100 +obj_metadata_cost_non_refundable: 50 +storage_rebate_rate: 9900 +storage_fund_reinvest_rate: 500 +reward_slashing_rate: 10000 +storage_gas_price: 76 +max_transactions_per_checkpoint: 10000 +max_checkpoint_size_bytes: 31457280 +buffer_stake_for_protocol_upgrade_bps: 5000 +address_from_bytes_cost_base: 52 +address_to_u256_cost_base: 52 +address_from_u256_cost_base: 52 +config_read_setting_impl_cost_base: 100 +config_read_setting_impl_cost_per_byte: 40 +dynamic_field_hash_type_and_key_cost_base: 100 +dynamic_field_hash_type_and_key_type_cost_per_byte: 2 +dynamic_field_hash_type_and_key_value_cost_per_byte: 2 +dynamic_field_hash_type_and_key_type_tag_cost_per_byte: 2 +dynamic_field_add_child_object_cost_base: 100 +dynamic_field_add_child_object_type_cost_per_byte: 10 +dynamic_field_add_child_object_value_cost_per_byte: 10 +dynamic_field_add_child_object_struct_tag_cost_per_byte: 10 +dynamic_field_borrow_child_object_cost_base: 100 +dynamic_field_borrow_child_object_child_ref_cost_per_byte: 10 +dynamic_field_borrow_child_object_type_cost_per_byte: 10 +dynamic_field_remove_child_object_cost_base: 100 +dynamic_field_remove_child_object_child_cost_per_byte: 2 +dynamic_field_remove_child_object_type_cost_per_byte: 2 +dynamic_field_has_child_object_cost_base: 100 +dynamic_field_has_child_object_with_ty_cost_base: 100 +dynamic_field_has_child_object_with_ty_type_cost_per_byte: 2 +dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte: 2 +event_emit_cost_base: 52 +event_emit_value_size_derivation_cost_per_byte: 2 +event_emit_tag_size_derivation_cost_per_byte: 5 +event_emit_output_cost_per_byte: 10 +object_borrow_uid_cost_base: 52 +object_delete_impl_cost_base: 52 +object_record_new_uid_cost_base: 52 +transfer_transfer_internal_cost_base: 52 +transfer_freeze_object_cost_base: 52 +transfer_share_object_cost_base: 52 +transfer_receive_object_cost_base: 52 +tx_context_derive_id_cost_base: 52 +types_is_one_time_witness_cost_base: 52 +types_is_one_time_witness_type_tag_cost_per_byte: 2 +types_is_one_time_witness_type_cost_per_byte: 2 +validator_validate_metadata_cost_base: 52 +validator_validate_metadata_data_cost_per_byte: 2 +crypto_invalid_arguments_cost: 100 +bls12381_bls12381_min_sig_verify_cost_base: 52 +bls12381_bls12381_min_sig_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_sig_verify_msg_cost_per_block: 2 +bls12381_bls12381_min_pk_verify_cost_base: 52 +bls12381_bls12381_min_pk_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_pk_verify_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_keccak256_cost_base: 52 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_sha256_cost_base: 52 +ecdsa_k1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_k1_decompress_pubkey_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_k1_secp256k1_verify_sha256_cost_base: 52 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_keccak256_cost_base: 52 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_sha256_cost_base: 52 +ecdsa_r1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_keccak256_cost_base: 52 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_sha256_cost_base: 52 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block: 2 +ecvrf_ecvrf_verify_cost_base: 52 +ecvrf_ecvrf_verify_alpha_string_cost_per_byte: 2 +ecvrf_ecvrf_verify_alpha_string_cost_per_block: 2 +ed25519_ed25519_verify_cost_base: 52 +ed25519_ed25519_verify_msg_cost_per_byte: 2 +ed25519_ed25519_verify_msg_cost_per_block: 2 +groth16_prepare_verifying_key_bls12381_cost_base: 52 +groth16_prepare_verifying_key_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bn254_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_public_input_cost_per_byte: 2 +hash_blake2b256_cost_base: 52 +hash_blake2b256_data_cost_per_byte: 2 +hash_blake2b256_data_cost_per_block: 2 +hash_keccak256_cost_base: 52 +hash_keccak256_data_cost_per_byte: 2 +hash_keccak256_data_cost_per_block: 2 +group_ops_bls12381_decode_scalar_cost: 52 +group_ops_bls12381_decode_g1_cost: 52 +group_ops_bls12381_decode_g2_cost: 52 +group_ops_bls12381_decode_gt_cost: 52 +group_ops_bls12381_scalar_add_cost: 52 +group_ops_bls12381_g1_add_cost: 52 +group_ops_bls12381_g2_add_cost: 52 +group_ops_bls12381_gt_add_cost: 52 +group_ops_bls12381_scalar_sub_cost: 52 +group_ops_bls12381_g1_sub_cost: 52 +group_ops_bls12381_g2_sub_cost: 52 +group_ops_bls12381_gt_sub_cost: 52 +group_ops_bls12381_scalar_mul_cost: 52 +group_ops_bls12381_g1_mul_cost: 52 +group_ops_bls12381_g2_mul_cost: 52 +group_ops_bls12381_gt_mul_cost: 52 +group_ops_bls12381_scalar_div_cost: 52 +group_ops_bls12381_g1_div_cost: 52 +group_ops_bls12381_g2_div_cost: 52 +group_ops_bls12381_gt_div_cost: 52 +group_ops_bls12381_g1_hash_to_base_cost: 52 +group_ops_bls12381_g2_hash_to_base_cost: 52 +group_ops_bls12381_g1_hash_to_cost_per_byte: 2 +group_ops_bls12381_g2_hash_to_cost_per_byte: 2 +group_ops_bls12381_g1_msm_base_cost: 52 +group_ops_bls12381_g2_msm_base_cost: 52 +group_ops_bls12381_g1_msm_base_cost_per_input: 52 +group_ops_bls12381_g2_msm_base_cost_per_input: 52 +group_ops_bls12381_msm_max_len: 32 +group_ops_bls12381_pairing_cost: 52 +hmac_hmac_sha3_256_cost_base: 52 +hmac_hmac_sha3_256_input_cost_per_byte: 2 +hmac_hmac_sha3_256_input_cost_per_block: 2 +check_zklogin_id_cost_base: 200 +check_zklogin_issuer_cost_base: 200 +bcs_per_byte_serialized_cost: 2 +bcs_legacy_min_output_size_cost: 1 +bcs_failure_cost: 52 +hash_sha2_256_base_cost: 52 +hash_sha2_256_per_byte_cost: 2 +hash_sha2_256_legacy_min_input_len_cost: 1 +hash_sha3_256_base_cost: 52 +hash_sha3_256_per_byte_cost: 2 +hash_sha3_256_legacy_min_input_len_cost: 1 +type_name_get_base_cost: 52 +type_name_get_per_byte_cost: 2 +string_check_utf8_base_cost: 52 +string_check_utf8_per_byte_cost: 2 +string_is_char_boundary_base_cost: 52 +string_sub_string_base_cost: 52 +string_sub_string_per_byte_cost: 2 +string_index_of_base_cost: 52 +string_index_of_per_byte_pattern_cost: 2 +string_index_of_per_byte_searched_cost: 2 +vector_empty_base_cost: 52 +vector_length_base_cost: 52 +vector_push_back_base_cost: 52 +vector_push_back_legacy_per_abstract_memory_unit_cost: 2 +vector_borrow_base_cost: 52 +vector_pop_back_base_cost: 52 +vector_destroy_empty_base_cost: 52 +vector_swap_base_cost: 52 +debug_print_base_cost: 52 +debug_print_stack_trace_base_cost: 52 +execution_version: 3 +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: 700 +random_beacon_dkg_timeout_round: 3000 +random_beacon_min_round_interval_ms: 500 +random_beacon_dkg_version: 1 +consensus_max_transaction_size_bytes: 262144 +consensus_max_transactions_in_block_bytes: 524288 +consensus_max_num_transactions_in_block: 512 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 +max_deferral_rounds_for_congestion_control: 10 +min_checkpoint_interval_ms: 200 +checkpoint_summary_version_specific_data: 1 +max_soft_bundle_size: 5 +bridge_should_try_to_finalize_committee: true +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_63.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_63.snap index eb321dbad8c7e..785270a636a42 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_63.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_63.snap @@ -45,7 +45,7 @@ feature_flags: enable_coin_deny_list: true enable_group_ops_native_functions: true reject_mutable_random_on_entry_functions: true - per_object_congestion_control_mode: TotalTxCount + per_object_congestion_control_mode: TotalGasBudgetWithCap consensus_choice: Mysticeti consensus_network: Tonic zklogin_max_epoch_upper_bound_delta: 30 @@ -319,11 +319,11 @@ random_beacon_dkg_version: 1 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 524288 consensus_max_num_transactions_in_block: 512 -max_accumulated_txn_cost_per_object_in_narwhal_commit: 100 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 max_deferral_rounds_for_congestion_control: 10 min_checkpoint_interval_ms: 200 checkpoint_summary_version_specific_data: 1 max_soft_bundle_size: 5 bridge_should_try_to_finalize_committee: true -max_accumulated_txn_cost_per_object_in_mysticeti_commit: 10 - +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_64.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_64.snap new file mode 100644 index 0000000000000..a7a8858f62cab --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_64.snap @@ -0,0 +1,329 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 64 +feature_flags: + package_upgrades: true + commit_root_state_digest: true + advance_epoch_start_time_in_safe_mode: true + loaded_child_objects_fixed: true + missing_type_is_compatibility_error: true + scoring_decision_with_validity_cutoff: true + consensus_order_end_of_epoch_last: true + disallow_adding_abilities_on_upgrade: true + disable_invariant_violation_check_in_swap_loc: true + advance_to_highest_supported_protocol_version: true + ban_entry_init: true + package_digest_hash_module: true + disallow_change_struct_type_params_on_upgrade: true + no_extraneous_module_bytes: true + narwhal_versioned_metadata: true + zklogin_auth: true + consensus_transaction_ordering: ByGasPrice + simplified_unwrap_then_delete: true + upgraded_multisig_supported: true + txn_base_cost_as_multiplier: true + shared_object_deletion: true + narwhal_new_leader_election_schedule: true + loaded_child_object_format: true + enable_jwk_consensus_updates: true + end_of_epoch_transaction_supported: true + 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 + verify_legacy_zklogin_address: true + recompute_has_public_transfer_in_execution: true + accept_zklogin_in_multisig: true + include_consensus_digest_in_prologue: true + hardened_otw_check: true + allow_receiving_object_id: true + enable_coin_deny_list: true + enable_group_ops_native_functions: true + reject_mutable_random_on_entry_functions: true + per_object_congestion_control_mode: TotalGasBudgetWithCap + consensus_choice: Mysticeti + consensus_network: Tonic + zklogin_max_epoch_upper_bound_delta: 30 + mysticeti_leader_scoring_and_schedule: true + reshare_at_same_initial_version: true + resolve_abort_locations_to_package_id: true + mysticeti_use_committed_subdag_digest: true + record_consensus_determined_version_assignments_in_prologue: true + fresh_vm_on_framework_upgrade: true + prepend_prologue_tx_in_consensus_commit_in_checkpoints: true + mysticeti_num_leaders_per_round: 1 + soft_bundle: true + enable_coin_deny_list_v2: true + rethrow_serialization_type_layout_errors: true + consensus_distributed_vote_scoring_strategy: true + consensus_round_prober: true + validate_identifier_inputs: true + relocate_event_module: true +max_tx_size_bytes: 131072 +max_input_objects: 2048 +max_size_written_objects: 5000000 +max_size_written_objects_system_tx: 50000000 +max_serialized_tx_effects_size_bytes: 524288 +max_serialized_tx_effects_size_bytes_system_tx: 8388608 +max_gas_payment_objects: 256 +max_modules_in_publish: 64 +max_package_dependencies: 32 +max_arguments: 512 +max_type_arguments: 16 +max_type_argument_depth: 16 +max_pure_argument_size: 16384 +max_programmable_tx_commands: 1024 +move_binary_format_version: 7 +min_move_binary_format_version: 6 +binary_module_handles: 100 +binary_struct_handles: 300 +binary_function_handles: 1500 +binary_function_instantiations: 750 +binary_signatures: 1000 +binary_constant_pool: 4000 +binary_identifiers: 10000 +binary_address_identifiers: 100 +binary_struct_defs: 200 +binary_struct_def_instantiations: 100 +binary_function_defs: 1000 +binary_field_handles: 500 +binary_field_instantiations: 250 +binary_friend_decls: 100 +max_move_object_size: 256000 +max_move_package_size: 102400 +max_publish_or_upgrade_per_ptb: 5 +max_tx_gas: 50000000000 +max_gas_price: 100000 +max_gas_computation_bucket: 5000000 +gas_rounding_step: 1000 +max_loop_depth: 5 +max_generic_instantiation_length: 32 +max_function_parameters: 128 +max_basic_blocks: 1024 +max_value_stack_size: 1024 +max_type_nodes: 256 +max_push_size: 10000 +max_struct_definitions: 200 +max_function_definitions: 1000 +max_fields_in_struct: 32 +max_dependency_depth: 100 +max_num_event_emit: 1024 +max_num_new_move_object_ids: 2048 +max_num_new_move_object_ids_system_tx: 32768 +max_num_deleted_move_object_ids: 2048 +max_num_deleted_move_object_ids_system_tx: 32768 +max_num_transferred_move_object_ids: 2048 +max_num_transferred_move_object_ids_system_tx: 32768 +max_event_emit_size: 256000 +max_event_emit_size_total: 65536000 +max_move_vector_len: 262144 +max_move_identifier_len: 128 +max_move_value_depth: 128 +max_back_edges_per_function: 10000 +max_back_edges_per_module: 10000 +max_verifier_meter_ticks_per_function: 16000000 +max_meter_ticks_per_module: 16000000 +max_meter_ticks_per_package: 16000000 +object_runtime_max_num_cached_objects: 1000 +object_runtime_max_num_cached_objects_system_tx: 16000 +object_runtime_max_num_store_entries: 1000 +object_runtime_max_num_store_entries_system_tx: 16000 +base_tx_cost_fixed: 1000 +package_publish_cost_fixed: 1000 +base_tx_cost_per_byte: 0 +package_publish_cost_per_byte: 80 +obj_access_cost_read_per_byte: 15 +obj_access_cost_mutate_per_byte: 40 +obj_access_cost_delete_per_byte: 40 +obj_access_cost_verify_per_byte: 200 +max_type_to_layout_nodes: 512 +gas_model_version: 8 +obj_data_cost_refundable: 100 +obj_metadata_cost_non_refundable: 50 +storage_rebate_rate: 9900 +storage_fund_reinvest_rate: 500 +reward_slashing_rate: 10000 +storage_gas_price: 76 +max_transactions_per_checkpoint: 10000 +max_checkpoint_size_bytes: 31457280 +buffer_stake_for_protocol_upgrade_bps: 5000 +address_from_bytes_cost_base: 52 +address_to_u256_cost_base: 52 +address_from_u256_cost_base: 52 +config_read_setting_impl_cost_base: 100 +config_read_setting_impl_cost_per_byte: 40 +dynamic_field_hash_type_and_key_cost_base: 100 +dynamic_field_hash_type_and_key_type_cost_per_byte: 2 +dynamic_field_hash_type_and_key_value_cost_per_byte: 2 +dynamic_field_hash_type_and_key_type_tag_cost_per_byte: 2 +dynamic_field_add_child_object_cost_base: 100 +dynamic_field_add_child_object_type_cost_per_byte: 10 +dynamic_field_add_child_object_value_cost_per_byte: 10 +dynamic_field_add_child_object_struct_tag_cost_per_byte: 10 +dynamic_field_borrow_child_object_cost_base: 100 +dynamic_field_borrow_child_object_child_ref_cost_per_byte: 10 +dynamic_field_borrow_child_object_type_cost_per_byte: 10 +dynamic_field_remove_child_object_cost_base: 100 +dynamic_field_remove_child_object_child_cost_per_byte: 2 +dynamic_field_remove_child_object_type_cost_per_byte: 2 +dynamic_field_has_child_object_cost_base: 100 +dynamic_field_has_child_object_with_ty_cost_base: 100 +dynamic_field_has_child_object_with_ty_type_cost_per_byte: 2 +dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte: 2 +event_emit_cost_base: 52 +event_emit_value_size_derivation_cost_per_byte: 2 +event_emit_tag_size_derivation_cost_per_byte: 5 +event_emit_output_cost_per_byte: 10 +object_borrow_uid_cost_base: 52 +object_delete_impl_cost_base: 52 +object_record_new_uid_cost_base: 52 +transfer_transfer_internal_cost_base: 52 +transfer_freeze_object_cost_base: 52 +transfer_share_object_cost_base: 52 +transfer_receive_object_cost_base: 52 +tx_context_derive_id_cost_base: 52 +types_is_one_time_witness_cost_base: 52 +types_is_one_time_witness_type_tag_cost_per_byte: 2 +types_is_one_time_witness_type_cost_per_byte: 2 +validator_validate_metadata_cost_base: 52 +validator_validate_metadata_data_cost_per_byte: 2 +crypto_invalid_arguments_cost: 100 +bls12381_bls12381_min_sig_verify_cost_base: 52 +bls12381_bls12381_min_sig_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_sig_verify_msg_cost_per_block: 2 +bls12381_bls12381_min_pk_verify_cost_base: 52 +bls12381_bls12381_min_pk_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_pk_verify_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_keccak256_cost_base: 52 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_sha256_cost_base: 52 +ecdsa_k1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_k1_decompress_pubkey_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_k1_secp256k1_verify_sha256_cost_base: 52 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_keccak256_cost_base: 52 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_sha256_cost_base: 52 +ecdsa_r1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_keccak256_cost_base: 52 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_sha256_cost_base: 52 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block: 2 +ecvrf_ecvrf_verify_cost_base: 52 +ecvrf_ecvrf_verify_alpha_string_cost_per_byte: 2 +ecvrf_ecvrf_verify_alpha_string_cost_per_block: 2 +ed25519_ed25519_verify_cost_base: 52 +ed25519_ed25519_verify_msg_cost_per_byte: 2 +ed25519_ed25519_verify_msg_cost_per_block: 2 +groth16_prepare_verifying_key_bls12381_cost_base: 52 +groth16_prepare_verifying_key_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bn254_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_public_input_cost_per_byte: 2 +hash_blake2b256_cost_base: 52 +hash_blake2b256_data_cost_per_byte: 2 +hash_blake2b256_data_cost_per_block: 2 +hash_keccak256_cost_base: 52 +hash_keccak256_data_cost_per_byte: 2 +hash_keccak256_data_cost_per_block: 2 +group_ops_bls12381_decode_scalar_cost: 52 +group_ops_bls12381_decode_g1_cost: 52 +group_ops_bls12381_decode_g2_cost: 52 +group_ops_bls12381_decode_gt_cost: 52 +group_ops_bls12381_scalar_add_cost: 52 +group_ops_bls12381_g1_add_cost: 52 +group_ops_bls12381_g2_add_cost: 52 +group_ops_bls12381_gt_add_cost: 52 +group_ops_bls12381_scalar_sub_cost: 52 +group_ops_bls12381_g1_sub_cost: 52 +group_ops_bls12381_g2_sub_cost: 52 +group_ops_bls12381_gt_sub_cost: 52 +group_ops_bls12381_scalar_mul_cost: 52 +group_ops_bls12381_g1_mul_cost: 52 +group_ops_bls12381_g2_mul_cost: 52 +group_ops_bls12381_gt_mul_cost: 52 +group_ops_bls12381_scalar_div_cost: 52 +group_ops_bls12381_g1_div_cost: 52 +group_ops_bls12381_g2_div_cost: 52 +group_ops_bls12381_gt_div_cost: 52 +group_ops_bls12381_g1_hash_to_base_cost: 52 +group_ops_bls12381_g2_hash_to_base_cost: 52 +group_ops_bls12381_g1_hash_to_cost_per_byte: 2 +group_ops_bls12381_g2_hash_to_cost_per_byte: 2 +group_ops_bls12381_g1_msm_base_cost: 52 +group_ops_bls12381_g2_msm_base_cost: 52 +group_ops_bls12381_g1_msm_base_cost_per_input: 52 +group_ops_bls12381_g2_msm_base_cost_per_input: 52 +group_ops_bls12381_msm_max_len: 32 +group_ops_bls12381_pairing_cost: 52 +hmac_hmac_sha3_256_cost_base: 52 +hmac_hmac_sha3_256_input_cost_per_byte: 2 +hmac_hmac_sha3_256_input_cost_per_block: 2 +check_zklogin_id_cost_base: 200 +check_zklogin_issuer_cost_base: 200 +bcs_per_byte_serialized_cost: 2 +bcs_legacy_min_output_size_cost: 1 +bcs_failure_cost: 52 +hash_sha2_256_base_cost: 52 +hash_sha2_256_per_byte_cost: 2 +hash_sha2_256_legacy_min_input_len_cost: 1 +hash_sha3_256_base_cost: 52 +hash_sha3_256_per_byte_cost: 2 +hash_sha3_256_legacy_min_input_len_cost: 1 +type_name_get_base_cost: 52 +type_name_get_per_byte_cost: 2 +string_check_utf8_base_cost: 52 +string_check_utf8_per_byte_cost: 2 +string_is_char_boundary_base_cost: 52 +string_sub_string_base_cost: 52 +string_sub_string_per_byte_cost: 2 +string_index_of_base_cost: 52 +string_index_of_per_byte_pattern_cost: 2 +string_index_of_per_byte_searched_cost: 2 +vector_empty_base_cost: 52 +vector_length_base_cost: 52 +vector_push_back_base_cost: 52 +vector_push_back_legacy_per_abstract_memory_unit_cost: 2 +vector_borrow_base_cost: 52 +vector_pop_back_base_cost: 52 +vector_destroy_empty_base_cost: 52 +vector_swap_base_cost: 52 +debug_print_base_cost: 52 +debug_print_stack_trace_base_cost: 52 +execution_version: 3 +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: 700 +random_beacon_dkg_timeout_round: 3000 +random_beacon_min_round_interval_ms: 500 +random_beacon_dkg_version: 1 +consensus_max_transaction_size_bytes: 262144 +consensus_max_transactions_in_block_bytes: 524288 +consensus_max_num_transactions_in_block: 512 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 +max_deferral_rounds_for_congestion_control: 10 +min_checkpoint_interval_ms: 200 +checkpoint_summary_version_specific_data: 1 +max_soft_bundle_size: 5 +bridge_should_try_to_finalize_committee: true +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_63.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_63.snap index 9decd691e6c0d..c004a35dfdee9 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_63.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_63.snap @@ -47,7 +47,7 @@ feature_flags: enable_group_ops_native_functions: true enable_group_ops_native_function_msm: true reject_mutable_random_on_entry_functions: true - per_object_congestion_control_mode: TotalTxCount + per_object_congestion_control_mode: TotalGasBudgetWithCap consensus_choice: Mysticeti consensus_network: Tonic zklogin_max_epoch_upper_bound_delta: 30 @@ -329,11 +329,11 @@ random_beacon_dkg_version: 1 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 524288 consensus_max_num_transactions_in_block: 512 -max_accumulated_txn_cost_per_object_in_narwhal_commit: 100 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 max_deferral_rounds_for_congestion_control: 10 min_checkpoint_interval_ms: 200 checkpoint_summary_version_specific_data: 1 max_soft_bundle_size: 5 bridge_should_try_to_finalize_committee: true -max_accumulated_txn_cost_per_object_in_mysticeti_commit: 10 - +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_64.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_64.snap new file mode 100644 index 0000000000000..870c932d2378c --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_64.snap @@ -0,0 +1,339 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 64 +feature_flags: + package_upgrades: true + commit_root_state_digest: true + advance_epoch_start_time_in_safe_mode: true + loaded_child_objects_fixed: true + missing_type_is_compatibility_error: true + scoring_decision_with_validity_cutoff: true + consensus_order_end_of_epoch_last: true + disallow_adding_abilities_on_upgrade: true + disable_invariant_violation_check_in_swap_loc: true + advance_to_highest_supported_protocol_version: true + ban_entry_init: true + package_digest_hash_module: true + disallow_change_struct_type_params_on_upgrade: true + no_extraneous_module_bytes: true + narwhal_versioned_metadata: true + zklogin_auth: true + consensus_transaction_ordering: ByGasPrice + simplified_unwrap_then_delete: true + upgraded_multisig_supported: true + txn_base_cost_as_multiplier: true + shared_object_deletion: true + narwhal_new_leader_election_schedule: true + loaded_child_object_format: true + enable_jwk_consensus_updates: true + end_of_epoch_transaction_supported: true + 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 + verify_legacy_zklogin_address: true + recompute_has_public_transfer_in_execution: true + accept_zklogin_in_multisig: true + include_consensus_digest_in_prologue: true + hardened_otw_check: true + allow_receiving_object_id: true + enable_poseidon: true + enable_coin_deny_list: true + enable_group_ops_native_functions: true + enable_group_ops_native_function_msm: true + reject_mutable_random_on_entry_functions: true + per_object_congestion_control_mode: TotalGasBudgetWithCap + consensus_choice: Mysticeti + consensus_network: Tonic + zklogin_max_epoch_upper_bound_delta: 30 + mysticeti_leader_scoring_and_schedule: true + reshare_at_same_initial_version: true + resolve_abort_locations_to_package_id: true + mysticeti_use_committed_subdag_digest: true + enable_vdf: true + record_consensus_determined_version_assignments_in_prologue: true + fresh_vm_on_framework_upgrade: true + prepend_prologue_tx_in_consensus_commit_in_checkpoints: true + mysticeti_num_leaders_per_round: 1 + soft_bundle: true + enable_coin_deny_list_v2: true + passkey_auth: true + authority_capabilities_v2: true + rethrow_serialization_type_layout_errors: true + consensus_distributed_vote_scoring_strategy: true + consensus_round_prober: true + validate_identifier_inputs: true + mysticeti_fastpath: true + relocate_event_module: true +max_tx_size_bytes: 131072 +max_input_objects: 2048 +max_size_written_objects: 5000000 +max_size_written_objects_system_tx: 50000000 +max_serialized_tx_effects_size_bytes: 524288 +max_serialized_tx_effects_size_bytes_system_tx: 8388608 +max_gas_payment_objects: 256 +max_modules_in_publish: 64 +max_package_dependencies: 32 +max_arguments: 512 +max_type_arguments: 16 +max_type_argument_depth: 16 +max_pure_argument_size: 16384 +max_programmable_tx_commands: 1024 +move_binary_format_version: 7 +min_move_binary_format_version: 6 +binary_module_handles: 100 +binary_struct_handles: 300 +binary_function_handles: 1500 +binary_function_instantiations: 750 +binary_signatures: 1000 +binary_constant_pool: 4000 +binary_identifiers: 10000 +binary_address_identifiers: 100 +binary_struct_defs: 200 +binary_struct_def_instantiations: 100 +binary_function_defs: 1000 +binary_field_handles: 500 +binary_field_instantiations: 250 +binary_friend_decls: 100 +max_move_object_size: 256000 +max_move_package_size: 102400 +max_publish_or_upgrade_per_ptb: 5 +max_tx_gas: 50000000000 +max_gas_price: 100000 +max_gas_computation_bucket: 5000000 +gas_rounding_step: 1000 +max_loop_depth: 5 +max_generic_instantiation_length: 32 +max_function_parameters: 128 +max_basic_blocks: 1024 +max_value_stack_size: 1024 +max_type_nodes: 256 +max_push_size: 10000 +max_struct_definitions: 200 +max_function_definitions: 1000 +max_fields_in_struct: 32 +max_dependency_depth: 100 +max_num_event_emit: 1024 +max_num_new_move_object_ids: 2048 +max_num_new_move_object_ids_system_tx: 32768 +max_num_deleted_move_object_ids: 2048 +max_num_deleted_move_object_ids_system_tx: 32768 +max_num_transferred_move_object_ids: 2048 +max_num_transferred_move_object_ids_system_tx: 32768 +max_event_emit_size: 256000 +max_event_emit_size_total: 65536000 +max_move_vector_len: 262144 +max_move_identifier_len: 128 +max_move_value_depth: 128 +max_back_edges_per_function: 10000 +max_back_edges_per_module: 10000 +max_verifier_meter_ticks_per_function: 16000000 +max_meter_ticks_per_module: 16000000 +max_meter_ticks_per_package: 16000000 +object_runtime_max_num_cached_objects: 1000 +object_runtime_max_num_cached_objects_system_tx: 16000 +object_runtime_max_num_store_entries: 1000 +object_runtime_max_num_store_entries_system_tx: 16000 +base_tx_cost_fixed: 1000 +package_publish_cost_fixed: 1000 +base_tx_cost_per_byte: 0 +package_publish_cost_per_byte: 80 +obj_access_cost_read_per_byte: 15 +obj_access_cost_mutate_per_byte: 40 +obj_access_cost_delete_per_byte: 40 +obj_access_cost_verify_per_byte: 200 +max_type_to_layout_nodes: 512 +gas_model_version: 8 +obj_data_cost_refundable: 100 +obj_metadata_cost_non_refundable: 50 +storage_rebate_rate: 9900 +storage_fund_reinvest_rate: 500 +reward_slashing_rate: 10000 +storage_gas_price: 76 +max_transactions_per_checkpoint: 10000 +max_checkpoint_size_bytes: 31457280 +buffer_stake_for_protocol_upgrade_bps: 5000 +address_from_bytes_cost_base: 52 +address_to_u256_cost_base: 52 +address_from_u256_cost_base: 52 +config_read_setting_impl_cost_base: 100 +config_read_setting_impl_cost_per_byte: 40 +dynamic_field_hash_type_and_key_cost_base: 100 +dynamic_field_hash_type_and_key_type_cost_per_byte: 2 +dynamic_field_hash_type_and_key_value_cost_per_byte: 2 +dynamic_field_hash_type_and_key_type_tag_cost_per_byte: 2 +dynamic_field_add_child_object_cost_base: 100 +dynamic_field_add_child_object_type_cost_per_byte: 10 +dynamic_field_add_child_object_value_cost_per_byte: 10 +dynamic_field_add_child_object_struct_tag_cost_per_byte: 10 +dynamic_field_borrow_child_object_cost_base: 100 +dynamic_field_borrow_child_object_child_ref_cost_per_byte: 10 +dynamic_field_borrow_child_object_type_cost_per_byte: 10 +dynamic_field_remove_child_object_cost_base: 100 +dynamic_field_remove_child_object_child_cost_per_byte: 2 +dynamic_field_remove_child_object_type_cost_per_byte: 2 +dynamic_field_has_child_object_cost_base: 100 +dynamic_field_has_child_object_with_ty_cost_base: 100 +dynamic_field_has_child_object_with_ty_type_cost_per_byte: 2 +dynamic_field_has_child_object_with_ty_type_tag_cost_per_byte: 2 +event_emit_cost_base: 52 +event_emit_value_size_derivation_cost_per_byte: 2 +event_emit_tag_size_derivation_cost_per_byte: 5 +event_emit_output_cost_per_byte: 10 +object_borrow_uid_cost_base: 52 +object_delete_impl_cost_base: 52 +object_record_new_uid_cost_base: 52 +transfer_transfer_internal_cost_base: 52 +transfer_freeze_object_cost_base: 52 +transfer_share_object_cost_base: 52 +transfer_receive_object_cost_base: 52 +tx_context_derive_id_cost_base: 52 +types_is_one_time_witness_cost_base: 52 +types_is_one_time_witness_type_tag_cost_per_byte: 2 +types_is_one_time_witness_type_cost_per_byte: 2 +validator_validate_metadata_cost_base: 52 +validator_validate_metadata_data_cost_per_byte: 2 +crypto_invalid_arguments_cost: 100 +bls12381_bls12381_min_sig_verify_cost_base: 52 +bls12381_bls12381_min_sig_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_sig_verify_msg_cost_per_block: 2 +bls12381_bls12381_min_pk_verify_cost_base: 52 +bls12381_bls12381_min_pk_verify_msg_cost_per_byte: 2 +bls12381_bls12381_min_pk_verify_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_keccak256_cost_base: 52 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_k1_ecrecover_sha256_cost_base: 52 +ecdsa_k1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_k1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_k1_decompress_pubkey_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_cost_base: 52 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_k1_secp256k1_verify_sha256_cost_base: 52 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_k1_secp256k1_verify_sha256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_keccak256_cost_base: 52 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_keccak256_msg_cost_per_block: 2 +ecdsa_r1_ecrecover_sha256_cost_base: 52 +ecdsa_r1_ecrecover_sha256_msg_cost_per_byte: 2 +ecdsa_r1_ecrecover_sha256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_keccak256_cost_base: 52 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_keccak256_msg_cost_per_block: 2 +ecdsa_r1_secp256r1_verify_sha256_cost_base: 52 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_byte: 2 +ecdsa_r1_secp256r1_verify_sha256_msg_cost_per_block: 2 +ecvrf_ecvrf_verify_cost_base: 52 +ecvrf_ecvrf_verify_alpha_string_cost_per_byte: 2 +ecvrf_ecvrf_verify_alpha_string_cost_per_block: 2 +ed25519_ed25519_verify_cost_base: 52 +ed25519_ed25519_verify_msg_cost_per_byte: 2 +ed25519_ed25519_verify_msg_cost_per_block: 2 +groth16_prepare_verifying_key_bls12381_cost_base: 52 +groth16_prepare_verifying_key_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_base: 52 +groth16_verify_groth16_proof_internal_bls12381_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_bn254_cost_base: 52 +groth16_verify_groth16_proof_internal_bn254_cost_per_public_input: 2 +groth16_verify_groth16_proof_internal_public_input_cost_per_byte: 2 +hash_blake2b256_cost_base: 52 +hash_blake2b256_data_cost_per_byte: 2 +hash_blake2b256_data_cost_per_block: 2 +hash_keccak256_cost_base: 52 +hash_keccak256_data_cost_per_byte: 2 +hash_keccak256_data_cost_per_block: 2 +poseidon_bn254_cost_base: 260 +poseidon_bn254_cost_per_block: 10 +group_ops_bls12381_decode_scalar_cost: 52 +group_ops_bls12381_decode_g1_cost: 52 +group_ops_bls12381_decode_g2_cost: 52 +group_ops_bls12381_decode_gt_cost: 52 +group_ops_bls12381_scalar_add_cost: 52 +group_ops_bls12381_g1_add_cost: 52 +group_ops_bls12381_g2_add_cost: 52 +group_ops_bls12381_gt_add_cost: 52 +group_ops_bls12381_scalar_sub_cost: 52 +group_ops_bls12381_g1_sub_cost: 52 +group_ops_bls12381_g2_sub_cost: 52 +group_ops_bls12381_gt_sub_cost: 52 +group_ops_bls12381_scalar_mul_cost: 52 +group_ops_bls12381_g1_mul_cost: 52 +group_ops_bls12381_g2_mul_cost: 52 +group_ops_bls12381_gt_mul_cost: 52 +group_ops_bls12381_scalar_div_cost: 52 +group_ops_bls12381_g1_div_cost: 52 +group_ops_bls12381_g2_div_cost: 52 +group_ops_bls12381_gt_div_cost: 52 +group_ops_bls12381_g1_hash_to_base_cost: 52 +group_ops_bls12381_g2_hash_to_base_cost: 52 +group_ops_bls12381_g1_hash_to_cost_per_byte: 2 +group_ops_bls12381_g2_hash_to_cost_per_byte: 2 +group_ops_bls12381_g1_msm_base_cost: 52 +group_ops_bls12381_g2_msm_base_cost: 52 +group_ops_bls12381_g1_msm_base_cost_per_input: 52 +group_ops_bls12381_g2_msm_base_cost_per_input: 52 +group_ops_bls12381_msm_max_len: 32 +group_ops_bls12381_pairing_cost: 52 +hmac_hmac_sha3_256_cost_base: 52 +hmac_hmac_sha3_256_input_cost_per_byte: 2 +hmac_hmac_sha3_256_input_cost_per_block: 2 +check_zklogin_id_cost_base: 200 +check_zklogin_issuer_cost_base: 200 +vdf_verify_vdf_cost: 1500 +vdf_hash_to_input_cost: 100 +bcs_per_byte_serialized_cost: 2 +bcs_legacy_min_output_size_cost: 1 +bcs_failure_cost: 52 +hash_sha2_256_base_cost: 52 +hash_sha2_256_per_byte_cost: 2 +hash_sha2_256_legacy_min_input_len_cost: 1 +hash_sha3_256_base_cost: 52 +hash_sha3_256_per_byte_cost: 2 +hash_sha3_256_legacy_min_input_len_cost: 1 +type_name_get_base_cost: 52 +type_name_get_per_byte_cost: 2 +string_check_utf8_base_cost: 52 +string_check_utf8_per_byte_cost: 2 +string_is_char_boundary_base_cost: 52 +string_sub_string_base_cost: 52 +string_sub_string_per_byte_cost: 2 +string_index_of_base_cost: 52 +string_index_of_per_byte_pattern_cost: 2 +string_index_of_per_byte_searched_cost: 2 +vector_empty_base_cost: 52 +vector_length_base_cost: 52 +vector_push_back_base_cost: 52 +vector_push_back_legacy_per_abstract_memory_unit_cost: 2 +vector_borrow_base_cost: 52 +vector_pop_back_base_cost: 52 +vector_destroy_empty_base_cost: 52 +vector_swap_base_cost: 52 +debug_print_base_cost: 52 +debug_print_stack_trace_base_cost: 52 +execution_version: 3 +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: 700 +random_beacon_dkg_timeout_round: 3000 +random_beacon_min_round_interval_ms: 500 +random_beacon_dkg_version: 1 +consensus_max_transaction_size_bytes: 262144 +consensus_max_transactions_in_block_bytes: 524288 +consensus_max_num_transactions_in_block: 512 +max_accumulated_txn_cost_per_object_in_narwhal_commit: 240000000 +max_deferral_rounds_for_congestion_control: 10 +min_checkpoint_interval_ms: 200 +checkpoint_summary_version_specific_data: 1 +max_soft_bundle_size: 5 +bridge_should_try_to_finalize_committee: true +max_accumulated_txn_cost_per_object_in_mysticeti_commit: 18500000 +gas_budget_based_txn_cost_cap_factor: 400000 diff --git a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap index 371748cc78e7c..f1dce45993ad4 100644 --- a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap @@ -6,7 +6,7 @@ ssfn_config_info: ~ validator_config_info: ~ parameters: chain_start_timestamp_ms: 0 - protocol_version: 63 + protocol_version: 64 allow_insertion_of_extra_objects: true epoch_duration_ms: 86400000 stake_subsidy_start_epoch: 0 @@ -49,4 +49,3 @@ accounts: - 30000000000000000 - 30000000000000000 - 30000000000000000 - diff --git a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap index 582bd4d1e741b..05eaa6318c556 100644 --- a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap @@ -3,7 +3,7 @@ source: crates/sui-swarm-config/tests/snapshot_tests.rs expression: genesis.sui_system_object().into_genesis_version_for_tooling() --- epoch: 0 -protocol_version: 63 +protocol_version: 64 system_state_version: 1 validators: total_stake: 20000000000000000 @@ -240,13 +240,13 @@ validators: next_epoch_worker_address: ~ extra_fields: id: - id: "0xc889ec278315d265553aa2ca7c07e02e459ccfeda28b45fd3931a089a9ceea89" + id: "0xcc91d06982135046b4cfa9bbd4f7f206cdaf3f9fb27c782a7137b3bef08892ed" size: 0 voting_power: 10000 - operation_cap_id: "0xe3cc74e2d6cea3a24d73c8e206a7c39eb20b105d4985282e3243b617fd6d5bfa" + operation_cap_id: "0xfc07728a8857acbf12a2d5684de4f98920fad0952f784426eaafdda79b94ee20" gas_price: 1000 staking_pool: - id: "0x3da22a584bb3992b6ec89aa22283ef533b181bab7c075660c1ad3bf1a4d8a992" + id: "0xdb3034b1953243443f3cbc912d09de43d8e836803c018ba14245d7fa0a4c383d" activation_epoch: 0 deactivation_epoch: ~ sui_balance: 20000000000000000 @@ -254,14 +254,14 @@ validators: value: 0 pool_token_balance: 20000000000000000 exchange_rates: - id: "0x91de3f7b1c5e0090bf12efa8ca4eac12bf24fa8d1c3aabe0069043839e1eec0d" + id: "0x8d37fa87257f45904f0ef1424ead1cc8e1ea23cf00ff16ce9a63f2b77df6231f" size: 1 pending_stake: 0 pending_total_sui_withdraw: 0 pending_pool_token_withdraw: 0 extra_fields: id: - id: "0x6f7b549b3bc97b14cae2665d4b4e3e2713342882d7f1e3891ea3c2d7384c72a8" + id: "0x9f7ae3a49a73bbfdf1721536325cb5699b3cdb3174e42e461bb4eed6cb45aeb0" size: 0 commission_rate: 200 next_epoch_stake: 20000000000000000 @@ -269,27 +269,27 @@ validators: next_epoch_commission_rate: 200 extra_fields: id: - id: "0x65e5ffb824294594a4dcaa5ff8a7c4fb769591d7f2f4eedf779f4d952b9e4734" + id: "0xcf38a9cd46d8931bb0e06800c7dd818023842c6eed78c74f4d3663e3b256e9fe" size: 0 pending_active_validators: contents: - id: "0xfa40dfc2e8efef31f2a5149fc4ec08f13c278f52c2068b486a40d6b70ed8d198" + id: "0x5757ed8fb231e16f163db4f3a31aa660fccf4189e5c8fe535588abfbabde730f" size: 0 pending_removals: [] staking_pool_mappings: - id: "0x8f9cc06a104e4dfcfb9f7d5dc5d949d53a0cbc95edd124eaa860e2ff50c8d0dd" + id: "0x34c34655c2c9a2f2b708915189cf536c6f0e129655ef50d7157f461d74487741" size: 1 inactive_validators: - id: "0x0f9558ae5734953dcc551f7efd455146d5fcee697e2bc0702534d74905f0f030" + id: "0x15c6d3a2bd25a1232b8114376e0421dbdd5acf92f50bbd091588e7a43d5276da" size: 0 validator_candidates: - id: "0xb3f4410ffd5d507e203bf856a1205196adf59e481a069367ea07677dea91c48b" + id: "0xb2c748bd9e0c7cc676667f7ea2909b6edc224d8dc1d1797626b926409a5f04ef" size: 0 at_risk_validators: contents: [] extra_fields: id: - id: "0xa088a9c1d64dfa8e36c78913d93493fce5e6bc08be9b4b3ceef5212e4a0967b7" + id: "0xfcd0b94a9048c129e2e0e690bc3afe2a9e35377d64821c33076e7c14969b9143" size: 0 storage_fund: total_object_storage_rebates: @@ -306,7 +306,7 @@ parameters: validator_low_stake_grace_period: 7 extra_fields: id: - id: "0xee609e1350a82d79d28d9f222a1ac7eae91044af26bf1cceacf41f2b9e1e47fd" + id: "0x34e56a96336b73d4983cfdb95c4392f7214fc632973e1529f63ee7caf6ed0458" size: 0 reference_gas_price: 1000 validator_report_records: @@ -320,7 +320,7 @@ stake_subsidy: stake_subsidy_decrease_rate: 1000 extra_fields: id: - id: "0x5a326beb65d1ea418134be378fa8c7d61f21084e24dee6e21156e75e2555f330" + id: "0xbfd2b299dab597fcf4e004a252274bd8262e18521b63168c49eca2b1839dc207" size: 0 safe_mode: false safe_mode_storage_rewards: @@ -332,6 +332,5 @@ safe_mode_non_refundable_storage_fee: 0 epoch_start_timestamp_ms: 10 extra_fields: id: - id: "0xf4b7d5e06a3461a4f8b27517b4dfdfaf24ed20faeaa960c568714bc44e2ec345" + id: "0x7f447c7cb0761fe5d2350b00849a94f887b78b2b3a5afd75f97092be04e1bf27" size: 0 -