diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_21.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_21.snap index 7ca0100335ed9..9355bae0dbd8e 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_21.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_21.snap @@ -1,5 +1,6 @@ --- source: crates/sui-protocol-config/src/lib.rs +assertion_line: 1578 expression: "ProtocolConfig::get_for_version(cur, *chain_id)" --- version: 21 diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_44.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_44.snap index b1c1dcf2bad16..d4e7aa90b2f10 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_44.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_44.snap @@ -260,4 +260,3 @@ 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__Mainnet_version_50.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_50.snap index 5941b1fcedc16..9d142ad4f11c7 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_50.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Mainnet_version_50.snap @@ -269,4 +269,3 @@ random_beacon_reduction_allowed_delta: 800 consensus_max_transaction_size_bytes: 262144 consensus_max_transactions_in_block_bytes: 6291456 max_deferral_rounds_for_congestion_control: 10 - diff --git a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_44.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_44.snap index 87d3f97634bc9..e2f643d2e776d 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_44.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_44.snap @@ -262,4 +262,3 @@ 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_50.snap b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_50.snap index e6c194f4402a4..894bc84497f49 100644 --- a/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_50.snap +++ b/crates/sui-protocol-config/src/snapshots/sui_protocol_config__test__Testnet_version_50.snap @@ -278,4 +278,3 @@ consensus_max_transactions_in_block_bytes: 6291456 max_deferral_rounds_for_congestion_control: 10 min_checkpoint_interval_ms: 200 checkpoint_summary_version_specific_data: 1 - diff --git a/scripts/compatibility/check-protocol-compatibility.sh b/scripts/compatibility/check-protocol-compatibility.sh index bff2f9a71a677..2fd661e81cd98 100755 --- a/scripts/compatibility/check-protocol-compatibility.sh +++ b/scripts/compatibility/check-protocol-compatibility.sh @@ -75,6 +75,19 @@ else fi echo "Checking for changes to snapshot files matching $NETWORK_PATTERN" + +# The fields `scoring_decision_mad_divisor`, `scoring_decision_cutoff_value` were removed from the protocol config, +# but they are still present in older snapshot files. We need to delete them from the snapshot files before +# checking if the git repo is clean. +# TODO: Remove this workaround once commit 3959d9af51172824b0e4f20802c71e416596c7df has been release to all networks. +SED=$(which gsed) +if [ -z "$SED" ]; then + SED=$(which sed) +fi + +grep -lE 'scoring_decision_mad_divisor|scoring_decision_cutoff_value' crates/sui-protocol-config/src/snapshots/$NETWORK_PATTERN | xargs $SED -Ei '/(scoring_decision_mad_divisor|scoring_decision_cutoff_value)/d' +git add . + check_git_clean "Detected changes to snapshot files since $ORIGIN_COMMIT - not safe to release" "$NETWORK_PATTERN" # remove any snapshot file changes that were ignored