From 03c0723b5c8b7103aa924355101708654782f1dd Mon Sep 17 00:00:00 2001 From: Andrew Schran Date: Wed, 22 May 2024 14:34:07 -0400 Subject: [PATCH 1/4] Enable random beacon in testnet With min 200ms interval between rounds. --- crates/sui-protocol-config/src/lib.rs | 9 ++++++++- .../sui_protocol_config__test__Testnet_version_46.snap | 4 ++++ .../snapshots/sui_protocol_config__test__version_46.snap | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/sui-protocol-config/src/lib.rs b/crates/sui-protocol-config/src/lib.rs index ed193b624b963..243832daa2fc1 100644 --- a/crates/sui-protocol-config/src/lib.rs +++ b/crates/sui-protocol-config/src/lib.rs @@ -129,6 +129,7 @@ const MAX_PROTOCOL_VERSION: u64 = 46; // Enable Leader Scoring & Schedule Change for Mysticeti consensus. // Version 46: Enable native bridge in testnet // Enable resharing at the same initial shared version. +// Enable random beacon in testnet. #[derive(Copy, Clone, Debug, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct ProtocolVersion(u64); @@ -2195,9 +2196,15 @@ impl ProtocolConfig { } } 46 => { - // enable bridge in devnet and testnet if chain != Chain::Mainnet { + // enable bridge in devnet and testnet cfg.feature_flags.bridge = true; + + // Enable random beacon on testnet. + 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); } // Enable resharing at same initial version diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap index c643e94279f78..c80079143ded1 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.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 @@ -266,6 +267,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_46.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap index a50219ee6d0d5..3809c481a7ee5 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap @@ -274,7 +274,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 From 8a49311e8d335c3e2fb6a626259cea2b78ec66d8 Mon Sep 17 00:00:00 2001 From: Andrew Schran Date: Wed, 22 May 2024 14:53:40 -0400 Subject: [PATCH 2/4] update to v47 --- crates/sui-protocol-config/src/lib.rs | 17 +- ...ocol_config__test__Mainnet_version_47.snap | 268 ++++++++++++++ ...ocol_config__test__Testnet_version_46.snap | 4 - ...ocol_config__test__Testnet_version_47.snap | 275 ++++++++++++++ ...sui_protocol_config__test__version_46.snap | 2 +- ...sui_protocol_config__test__version_47.snap | 280 +++++++++++++++ ...__genesis_config_snapshot_matches.snap.new | 53 +++ ...ulated_genesis_snapshot_matches-2.snap.new | 338 ++++++++++++++++++ 8 files changed, 1225 insertions(+), 12 deletions(-) create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_47.snap create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap create mode 100644 crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap create mode 100644 crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap.new create mode 100644 crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap.new diff --git a/crates/sui-protocol-config/src/lib.rs b/crates/sui-protocol-config/src/lib.rs index 243832daa2fc1..f3fd893e56250 100644 --- a/crates/sui-protocol-config/src/lib.rs +++ b/crates/sui-protocol-config/src/lib.rs @@ -13,7 +13,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 = 46; +const MAX_PROTOCOL_VERSION: u64 = 47; // Record history of protocol version allocations here: // @@ -129,7 +129,7 @@ const MAX_PROTOCOL_VERSION: u64 = 46; // Enable Leader Scoring & Schedule Change for Mysticeti consensus. // Version 46: Enable native bridge in testnet // Enable resharing at the same initial shared version. -// Enable random beacon in testnet. +// Version 47: Enable random beacon in testnet. #[derive(Copy, Clone, Debug, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct ProtocolVersion(u64); @@ -2196,19 +2196,22 @@ impl ProtocolConfig { } } 46 => { + // enable bridge in devnet and testnet if chain != Chain::Mainnet { - // enable bridge in devnet and testnet cfg.feature_flags.bridge = true; + } - // Enable random beacon on testnet. + // Enable resharing at same initial version + cfg.feature_flags.reshare_at_same_initial_version = true; + } + 47 => { + // 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); } - - // Enable resharing at same initial version - cfg.feature_flags.reshare_at_same_initial_version = true; } // Use this template when making changes: // diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_47.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_47.snap new file mode 100644 index 0000000000000..b1b44bf0da3dd --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_47.snap @@ -0,0 +1,268 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 47 +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 + 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 + zklogin_max_epoch_upper_bound_delta: 30 + reshare_at_same_initial_version: 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: 6 +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 +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 +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 +scoring_decision_mad_divisor: 2.3 +scoring_decision_cutoff_value: 2.5 +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 +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__Testnet_version_46.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap index c80079143ded1..c643e94279f78 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_46.snap @@ -32,7 +32,6 @@ 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 @@ -267,9 +266,6 @@ 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__Testnet_version_47.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap new file mode 100644 index 0000000000000..fb945f0b22045 --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_47.snap @@ -0,0 +1,275 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 47 +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 + consensus_choice: SwapEachEpoch + zklogin_max_epoch_upper_bound_delta: 30 + mysticeti_leader_scoring_and_schedule: true + reshare_at_same_initial_version: 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: 6 +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 +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 +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 +scoring_decision_mad_divisor: 2.3 +scoring_decision_cutoff_value: 2.5 +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: 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_46.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap index 3809c481a7ee5..a50219ee6d0d5 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_46.snap @@ -274,7 +274,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: 200 +random_beacon_min_round_interval_ms: 150 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 new file mode 100644 index 0000000000000..a37c0f3b8c6ec --- /dev/null +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__version_47.snap @@ -0,0 +1,280 @@ +--- +source: crates/sui-protocol-config/src/lib.rs +expression: "ProtocolConfig::get_for_version(cur, *chain_id)" +--- +version: 47 +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 + consensus_choice: SwapEachEpoch + consensus_network: Tonic + zklogin_max_epoch_upper_bound_delta: 30 + mysticeti_leader_scoring_and_schedule: true + reshare_at_same_initial_version: 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: 6 +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 +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 +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 +scoring_decision_mad_divisor: 2.3 +scoring_decision_cutoff_value: 2.5 +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: 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-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap.new b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap.new new file mode 100644 index 0000000000000..f7e0fdb32adba --- /dev/null +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__genesis_config_snapshot_matches.snap.new @@ -0,0 +1,53 @@ +--- +source: crates/sui-swarm-config/tests/snapshot_tests.rs +assertion_line: 48 +expression: genesis_config +--- +ssfn_config_info: ~ +validator_config_info: ~ +parameters: + chain_start_timestamp_ms: 0 + protocol_version: 47 + allow_insertion_of_extra_objects: true + epoch_duration_ms: 86400000 + stake_subsidy_start_epoch: 0 + stake_subsidy_initial_distribution_amount: 1000000000000000 + stake_subsidy_period_length: 10 + stake_subsidy_decrease_rate: 1000 +accounts: + - address: "0x73a6b3c33e2d63383de5c6786cbaca231ff789f4c853af6d54cb883d8780adc0" + gas_amounts: + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - address: "0x73a6b3c33e2d63383de5c6786cbaca231ff789f4c853af6d54cb883d8780adc0" + gas_amounts: + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - address: "0x73a6b3c33e2d63383de5c6786cbaca231ff789f4c853af6d54cb883d8780adc0" + gas_amounts: + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - address: "0x73a6b3c33e2d63383de5c6786cbaca231ff789f4c853af6d54cb883d8780adc0" + gas_amounts: + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - address: "0x73a6b3c33e2d63383de5c6786cbaca231ff789f4c853af6d54cb883d8780adc0" + gas_amounts: + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + - 30000000000000000 + diff --git a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap.new b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap.new new file mode 100644 index 0000000000000..1d27859ca3a99 --- /dev/null +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__populated_genesis_snapshot_matches-2.snap.new @@ -0,0 +1,338 @@ +--- +source: crates/sui-swarm-config/tests/snapshot_tests.rs +assertion_line: 99 +expression: genesis.sui_system_object().into_genesis_version_for_tooling() +--- +epoch: 0 +protocol_version: 47 +system_state_version: 1 +validators: + total_stake: 20000000000000000 + active_validators: + - metadata: + sui_address: "0x60307f36c284875bf298d4d85a673046648b1ac4b47e712e42ab10d57dd77a26" + protocol_pubkey_bytes: + - 153 + - 242 + - 94 + - 246 + - 31 + - 128 + - 50 + - 185 + - 20 + - 99 + - 100 + - 96 + - 152 + - 44 + - 92 + - 198 + - 241 + - 52 + - 239 + - 29 + - 218 + - 231 + - 102 + - 87 + - 242 + - 203 + - 254 + - 193 + - 235 + - 252 + - 141 + - 9 + - 115 + - 116 + - 8 + - 13 + - 246 + - 252 + - 240 + - 220 + - 184 + - 188 + - 75 + - 13 + - 142 + - 10 + - 245 + - 216 + - 14 + - 187 + - 255 + - 43 + - 76 + - 89 + - 159 + - 84 + - 244 + - 45 + - 99 + - 18 + - 223 + - 195 + - 20 + - 39 + - 96 + - 120 + - 193 + - 204 + - 52 + - 126 + - 187 + - 190 + - 197 + - 25 + - 139 + - 226 + - 88 + - 81 + - 63 + - 56 + - 107 + - 147 + - 13 + - 2 + - 194 + - 116 + - 154 + - 128 + - 62 + - 35 + - 48 + - 149 + - 94 + - 189 + - 26 + - 16 + network_pubkey_bytes: + - 148 + - 228 + - 168 + - 73 + - 49 + - 68 + - 233 + - 230 + - 150 + - 32 + - 140 + - 190 + - 208 + - 2 + - 89 + - 230 + - 221 + - 181 + - 111 + - 151 + - 155 + - 145 + - 195 + - 41 + - 103 + - 86 + - 9 + - 133 + - 190 + - 97 + - 144 + - 155 + worker_pubkey_bytes: + - 31 + - 42 + - 121 + - 1 + - 168 + - 66 + - 228 + - 211 + - 98 + - 59 + - 198 + - 28 + - 225 + - 193 + - 113 + - 125 + - 46 + - 118 + - 142 + - 15 + - 215 + - 45 + - 248 + - 52 + - 26 + - 245 + - 102 + - 21 + - 185 + - 22 + - 240 + - 56 + proof_of_possession_bytes: + - 151 + - 191 + - 31 + - 245 + - 62 + - 131 + - 184 + - 23 + - 162 + - 33 + - 124 + - 71 + - 229 + - 10 + - 56 + - 179 + - 47 + - 67 + - 223 + - 65 + - 196 + - 125 + - 67 + - 111 + - 55 + - 104 + - 114 + - 157 + - 166 + - 146 + - 6 + - 104 + - 90 + - 214 + - 33 + - 36 + - 63 + - 93 + - 228 + - 221 + - 166 + - 7 + - 164 + - 61 + - 169 + - 219 + - 78 + - 19 + name: "0" + description: "" + image_url: "" + project_url: "" + net_address: /ip4/127.0.0.1/tcp/80 + p2p_address: /ip4/127.0.0.1/udp/80 + primary_address: /ip4/127.0.0.1/udp/80 + worker_address: /ip4/127.0.0.1/udp/80 + next_epoch_protocol_pubkey_bytes: ~ + next_epoch_proof_of_possession: ~ + next_epoch_network_pubkey_bytes: ~ + next_epoch_worker_pubkey_bytes: ~ + next_epoch_net_address: ~ + next_epoch_p2p_address: ~ + next_epoch_primary_address: ~ + next_epoch_worker_address: ~ + extra_fields: + id: + id: "0x2ac0d31a21f5c6cd7dd974f9ed14eebfc2e8bf520214ab3e515ff67e7bf0ec6e" + size: 0 + voting_power: 10000 + operation_cap_id: "0x9759b404ed4a40128cefa29253dbfabeff6170c3f766a9213f14a41387e27cc1" + gas_price: 1000 + staking_pool: + id: "0xf2dddbf8fe616c5b68fd0f3d1b1cbdf532347df629f8fdb18b4059a7ddefd017" + activation_epoch: 0 + deactivation_epoch: ~ + sui_balance: 20000000000000000 + rewards_pool: + value: 0 + pool_token_balance: 20000000000000000 + exchange_rates: + id: "0xebc316ffa8e3273107c2d470e22c7e7ba0a1a61f9afe8c5063a92fd2a1f00224" + size: 1 + pending_stake: 0 + pending_total_sui_withdraw: 0 + pending_pool_token_withdraw: 0 + extra_fields: + id: + id: "0xf972aafc09c26504fc2c409e0af5e3991e85b543b13f2a9331971e18ebf27d37" + size: 0 + commission_rate: 200 + next_epoch_stake: 20000000000000000 + next_epoch_gas_price: 1000 + next_epoch_commission_rate: 200 + extra_fields: + id: + id: "0xb618f82862a41e5fa54da4c7c61fb6fbdc2002038b01817323a8f5d69c6ab1c9" + size: 0 + pending_active_validators: + contents: + id: "0x92e8627e02ff3634ef1b48c5152b518829afc773605907b60095ced347f44699" + size: 0 + pending_removals: [] + staking_pool_mappings: + id: "0x7aa878c7a9373a09aea42092ab54f6531c072d3eb5a3ae080ac15c2665647260" + size: 1 + inactive_validators: + id: "0x467e7821b12e644bb5d546b11843a6bfbbd756ea08605a9350a2ee40ffc10f25" + size: 0 + validator_candidates: + id: "0xcafb85e7f656cc47fa3cfc6ee3cf193ec80c9247d637dbda14d0c603e04e8436" + size: 0 + at_risk_validators: + contents: [] + extra_fields: + id: + id: "0x86042d3081f12494a4520eebd768505a308323bc9b553538263045d40ade1c30" + size: 0 +storage_fund: + total_object_storage_rebates: + value: 0 + non_refundable_balance: + value: 0 +parameters: + epoch_duration_ms: 86400000 + stake_subsidy_start_epoch: 0 + max_validator_count: 150 + min_validator_joining_stake: 30000000000000000 + validator_low_stake_threshold: 20000000000000000 + validator_very_low_stake_threshold: 15000000000000000 + validator_low_stake_grace_period: 7 + extra_fields: + id: + id: "0x8640b57d32461344079d0f02ecbae8a6f85a543ff11ecbfd652b153115fd99af" + size: 0 +reference_gas_price: 1000 +validator_report_records: + contents: [] +stake_subsidy: + balance: + value: 9230000000000000000 + distribution_counter: 0 + current_distribution_amount: 1000000000000000 + stake_subsidy_period_length: 10 + stake_subsidy_decrease_rate: 1000 + extra_fields: + id: + id: "0xa720b445519313f3588e8621a0b7dd8a1e595c0371239d51adef28da000ca0f2" + size: 0 +safe_mode: false +safe_mode_storage_rewards: + value: 0 +safe_mode_computation_rewards: + value: 0 +safe_mode_storage_rebates: 0 +safe_mode_non_refundable_storage_fee: 0 +epoch_start_timestamp_ms: 10 +extra_fields: + id: + id: "0x27d07b5c7e208be753f5e3a84db1f758c502549742daa3a39c850f3b8f9101c1" + size: 0 + From a874b1ead3aa7f2f4255b09b5bdaf8161e342b02 Mon Sep 17 00:00:00 2001 From: Andrew Schran Date: Wed, 22 May 2024 16:31:40 -0400 Subject: [PATCH 3/4] update openrpc.json --- crates/sui-open-rpc/spec/openrpc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sui-open-rpc/spec/openrpc.json b/crates/sui-open-rpc/spec/openrpc.json index 49519593b60d4..38a0fb528bb62 100644 --- a/crates/sui-open-rpc/spec/openrpc.json +++ b/crates/sui-open-rpc/spec/openrpc.json @@ -1359,7 +1359,7 @@ "name": "Result", "value": { "minSupportedProtocolVersion": "1", - "maxSupportedProtocolVersion": "46", + "maxSupportedProtocolVersion": "47", "protocolVersion": "6", "featureFlags": { "accept_zklogin_in_multisig": false, From b55e0cd77da6df98c1a039963114e49382296c7a Mon Sep 17 00:00:00 2001 From: Andrew Schran Date: Thu, 23 May 2024 13:43:43 -0400 Subject: [PATCH 4/4] snapshot fixes --- ...ests__genesis_config_snapshot_matches.snap | 2 +- ..._populated_genesis_snapshot_matches-2.snap | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) 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 90bffc9f3953c..dee99a1960169 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: 46 + protocol_version: 47 allow_insertion_of_extra_objects: true epoch_duration_ms: 86400000 stake_subsidy_start_epoch: 0 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 f69413e631d17..101f1cbc6c3d0 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: 46 +protocol_version: 47 system_state_version: 1 validators: total_stake: 20000000000000000 @@ -240,13 +240,13 @@ validators: next_epoch_worker_address: ~ extra_fields: id: - id: "0xaa1f81615726f743a44d460de2f93a2d3d2d8cf5304cdcff7e0630efd3e1add2" + id: "0x2ac0d31a21f5c6cd7dd974f9ed14eebfc2e8bf520214ab3e515ff67e7bf0ec6e" size: 0 voting_power: 10000 - operation_cap_id: "0x47e3f1223ad17dd878503d1b53d6328ba003739bcd48c802f23cf1ae139e0dca" + operation_cap_id: "0x9759b404ed4a40128cefa29253dbfabeff6170c3f766a9213f14a41387e27cc1" gas_price: 1000 staking_pool: - id: "0xdbae44f768932c55ec5c4d2353ef383412ff46ece64fd7e627dc478a8a983b85" + id: "0xf2dddbf8fe616c5b68fd0f3d1b1cbdf532347df629f8fdb18b4059a7ddefd017" activation_epoch: 0 deactivation_epoch: ~ sui_balance: 20000000000000000 @@ -254,14 +254,14 @@ validators: value: 0 pool_token_balance: 20000000000000000 exchange_rates: - id: "0xd9c4fa6435a92316e35b4cad08c275e0d253d094e088ecc2e11612e059f4bcc1" + id: "0xebc316ffa8e3273107c2d470e22c7e7ba0a1a61f9afe8c5063a92fd2a1f00224" size: 1 pending_stake: 0 pending_total_sui_withdraw: 0 pending_pool_token_withdraw: 0 extra_fields: id: - id: "0x611cd0036780b5f5b48c4450a1c1e101187a3051fe5304b1614f09b821a1ea16" + id: "0xf972aafc09c26504fc2c409e0af5e3991e85b543b13f2a9331971e18ebf27d37" size: 0 commission_rate: 200 next_epoch_stake: 20000000000000000 @@ -269,27 +269,27 @@ validators: next_epoch_commission_rate: 200 extra_fields: id: - id: "0xbcf528f56cdf5f086fa182caa99e4f61232e85fa253faf471473981a39b1bbfb" + id: "0xb618f82862a41e5fa54da4c7c61fb6fbdc2002038b01817323a8f5d69c6ab1c9" size: 0 pending_active_validators: contents: - id: "0x52dbbc972f61964c94f821673e4456871ee8b4280379469883797cde9a7e75c2" + id: "0x92e8627e02ff3634ef1b48c5152b518829afc773605907b60095ced347f44699" size: 0 pending_removals: [] staking_pool_mappings: - id: "0xd7b77390caad378d1d2f4589ded333643396ca90fbe47731253a365841d22c7b" + id: "0x7aa878c7a9373a09aea42092ab54f6531c072d3eb5a3ae080ac15c2665647260" size: 1 inactive_validators: - id: "0xd7502286e0070887f753b8a4e68aa6e9ac1efcdd9519d997805cdf44f8e02b91" + id: "0x467e7821b12e644bb5d546b11843a6bfbbd756ea08605a9350a2ee40ffc10f25" size: 0 validator_candidates: - id: "0x87c0342f7b777631eb5afc7c0cc21e287aa448c28f97d5d16ec57f5a4127d8f7" + id: "0xcafb85e7f656cc47fa3cfc6ee3cf193ec80c9247d637dbda14d0c603e04e8436" size: 0 at_risk_validators: contents: [] extra_fields: id: - id: "0xf6344e8ae8b62ca78e477400f08d67bfd1c831b7a65b2d27d6942167111c4d45" + id: "0x86042d3081f12494a4520eebd768505a308323bc9b553538263045d40ade1c30" size: 0 storage_fund: total_object_storage_rebates: @@ -306,7 +306,7 @@ parameters: validator_low_stake_grace_period: 7 extra_fields: id: - id: "0x2fa928349e0701ded15f5a6b9b8934d73a350ba419119cae5605b679780b5244" + id: "0x8640b57d32461344079d0f02ecbae8a6f85a543ff11ecbfd652b153115fd99af" size: 0 reference_gas_price: 1000 validator_report_records: @@ -320,7 +320,7 @@ stake_subsidy: stake_subsidy_decrease_rate: 1000 extra_fields: id: - id: "0xe6764c48ab10ea4ac1e210c3786bdef3dcfc18d0d2dadd42ba019546b87ae64c" + id: "0xa720b445519313f3588e8621a0b7dd8a1e595c0371239d51adef28da000ca0f2" size: 0 safe_mode: false safe_mode_storage_rewards: @@ -332,6 +332,6 @@ safe_mode_non_refundable_storage_fee: 0 epoch_start_timestamp_ms: 10 extra_fields: id: - id: "0x41f2308e40998f1ff547ad1497181ce0ea5771a10fe0b0dc89958cc3f16f171e" + id: "0x27d07b5c7e208be753f5e3a84db1f758c502549742daa3a39c850f3b8f9101c1" size: 0