From 8f7d959472669fccf0bdb0deb5606b6ca1c6b690 Mon Sep 17 00:00:00 2001 From: George Mitenkov Date: Wed, 6 Nov 2024 09:07:17 +0000 Subject: [PATCH 1/4] [replay] Add tns to skip --- .github/workflows/replay-verify.yaml | 4 ++-- aptos-move/aptos-vm-environment/src/environment.rs | 4 +++- types/src/on_chain_config/aptos_features.rs | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/replay-verify.yaml b/.github/workflows/replay-verify.yaml index dbc5221fc9cae..955fbcd953f3b 100644 --- a/.github/workflows/replay-verify.yaml +++ b/.github/workflows/replay-verify.yaml @@ -66,7 +66,7 @@ jobs: SUB_DIR: e1 HISTORY_START: 862000000 # to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1 - TXNS_TO_SKIP: "0" + TXNS_TO_SKIP: 1232167272 1232167433 1235493554 1239820988 1250224262 1255724440 1354496836 1354498540 1354518687 1354538946 1354547451 1354547636 1354558872 1877277141 5431332424 5519863118 5519863551 5519864968 5519871391 5519874963 5519932878 5519937773 5519943799 5519946298 5519946983 5519948038 5521992576 5523758958 5525311310 5525344101 5526949497 5527564033 5609106498 5611465782 5611472644 5938100116 5938192908 5938204128 5938221027 6047311953 6204828501 # 1195000000-122000000: https://github.com/aptos-labs/aptos-core/pull/13832 RANGES_TO_SKIP: "1195000000-1220000000" BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml @@ -111,7 +111,7 @@ jobs: SUB_DIR: e1 HISTORY_START: 862000000 # to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1 - TXNS_TO_SKIP: "0" + TXNS_TO_SKIP: 523296049 523298111 575378008 575383660 575455170 575457845 575461986 575470789 596888095 612286393 981890562 1011802725 1030023658 1652667187 1652669110 1652686860 1652689144 1652722847 1654190659 1654191460 1673664597 1730942524 1730944006 1730945331 1730945814 1730946863 1730952284 1730956071 1730959853 1730967212 1731006027 1759904543 1792070645 1797308520 1798657294 1806178096 # 1195000000-1220000000: https://github.com/aptos-labs/aptos-core/pull/13832 RANGES_TO_SKIP: "1195000000-1220000000" BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml diff --git a/aptos-move/aptos-vm-environment/src/environment.rs b/aptos-move/aptos-vm-environment/src/environment.rs index 151dc19247ef9..70a96749edac2 100644 --- a/aptos-move/aptos-vm-environment/src/environment.rs +++ b/aptos-move/aptos-vm-environment/src/environment.rs @@ -23,6 +23,7 @@ use aptos_vm_types::storage::StorageGasParameters; use move_vm_runtime::{config::VMConfig, RuntimeEnvironment, WithRuntimeEnvironment}; use sha3::{Digest, Sha3_256}; use std::sync::Arc; +use aptos_types::on_chain_config::FeatureFlag; /// A runtime environment which can be used for VM initialization and more. Contains features /// used by execution, gas parameters, VM configs and global caches. Note that it is the user's @@ -175,8 +176,9 @@ impl Environment { ) -> Self { // We compute and store a hash of configs in order to distinguish different environments. let mut sha3_256 = Sha3_256::new(); - let features = + let mut features = fetch_config_and_update_hash::(&mut sha3_256, state_view).unwrap_or_default(); + features.enable(FeatureFlag::ENABLE_LOADER_V2); // If no chain ID is in storage, we assume we are in a testing environment. let chain_id = fetch_config_and_update_hash::(&mut sha3_256, state_view) diff --git a/types/src/on_chain_config/aptos_features.rs b/types/src/on_chain_config/aptos_features.rs index d1297014ad21f..cc3e04e02958e 100644 --- a/types/src/on_chain_config/aptos_features.rs +++ b/types/src/on_chain_config/aptos_features.rs @@ -196,6 +196,7 @@ impl Default for Features { for feature in FeatureFlag::default_features() { features.enable(feature); } + features.enable(FeatureFlag::ENABLE_LOADER_V2); features } } From 15bcea34f7f1089c2370a4df75e8dab3ffba44a3 Mon Sep 17 00:00:00 2001 From: George Mitenkov Date: Wed, 6 Nov 2024 18:57:08 +0000 Subject: [PATCH 2/4] [replay] Add txns to skip flag --- .github/workflows/workflow-run-replay-verify.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow-run-replay-verify.yaml b/.github/workflows/workflow-run-replay-verify.yaml index 40788a9fa0e28..bf87c7480c370 100644 --- a/.github/workflows/workflow-run-replay-verify.yaml +++ b/.github/workflows/workflow-run-replay-verify.yaml @@ -248,6 +248,7 @@ jobs: ./aptos-debugger aptos-db replay-verify \ --metadata-cache-dir $MC \ --command-adapter-config ${{ inputs.BACKUP_CONFIG_TEMPLATE_PATH }} \ + --txns-to-skip ${{ inputs.TXNS_TO_SKIP }} \ --start-version $begin \ --end-version $end \ \ From e0dc552467ae30082a59493e7390e18b750a17f2 Mon Sep 17 00:00:00 2001 From: George Mitenkov Date: Thu, 7 Nov 2024 16:48:24 +0000 Subject: [PATCH 3/4] Fix wrong ranges & update with new txns --- .github/workflows/replay-verify.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/replay-verify.yaml b/.github/workflows/replay-verify.yaml index 955fbcd953f3b..d464eeff2a8d3 100644 --- a/.github/workflows/replay-verify.yaml +++ b/.github/workflows/replay-verify.yaml @@ -66,7 +66,7 @@ jobs: SUB_DIR: e1 HISTORY_START: 862000000 # to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1 - TXNS_TO_SKIP: 1232167272 1232167433 1235493554 1239820988 1250224262 1255724440 1354496836 1354498540 1354518687 1354538946 1354547451 1354547636 1354558872 1877277141 5431332424 5519863118 5519863551 5519864968 5519871391 5519874963 5519932878 5519937773 5519943799 5519946298 5519946983 5519948038 5521992576 5523758958 5525311310 5525344101 5526949497 5527564033 5609106498 5611465782 5611472644 5938100116 5938192908 5938204128 5938221027 6047311953 6204828501 + TXNS_TO_SKIP: 1232167272 1232167433 1235493554 1239820988 1250224262 1255724440 1354496836 1354498540 1354518687 1354538946 1354547451 1354547636 1354558872 1877277141 5431332424 5519863118 5519863551 5519864968 5519871391 5519874963 5519932878 5519937773 5519943799 5519946298 5519946983 5519948038 5521992576 5523758958 5525311310 5525344101 5526949497 5527564033 5609106498 5611465782 5611472644 5938100116 5938192908 5938204128 5938221027 6047311953 6204828501 6206344839 # 1195000000-122000000: https://github.com/aptos-labs/aptos-core/pull/13832 RANGES_TO_SKIP: "1195000000-1220000000" BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml @@ -90,7 +90,7 @@ jobs: SUB_DIR: e1 HISTORY_START: 518000000 #TXNS_TO_SKIP: 12253479 12277499 148358668 - TXNS_TO_SKIP: "0" + TXNS_TO_SKIP: 523296049 523298111 575378008 575383660 575455170 575457845 575461986 575470789 596888095 612286393 981890562 1011802725 1030023658 1652667187 1652669110 1652686860 1652689144 1652722847 1654190659 1654191460 1673664597 1730942524 1730944006 1730945331 1730945814 1730946863 1730952284 1730956071 1730959853 1730967212 1731006027 1759904543 1792070645 1797308520 1798657294 1806178096 # 1197378568-1198492648: https://github.com/aptos-labs/aptos-core/pull/13832 RANGES_TO_SKIP: "1197378568-1198492648" BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml @@ -111,7 +111,7 @@ jobs: SUB_DIR: e1 HISTORY_START: 862000000 # to see historical TXNS_TO_SKIP, check out ce6158ac2764ee9d4c8738a85f3bcdc6bd0cadc1 - TXNS_TO_SKIP: 523296049 523298111 575378008 575383660 575455170 575457845 575461986 575470789 596888095 612286393 981890562 1011802725 1030023658 1652667187 1652669110 1652686860 1652689144 1652722847 1654190659 1654191460 1673664597 1730942524 1730944006 1730945331 1730945814 1730946863 1730952284 1730956071 1730959853 1730967212 1731006027 1759904543 1792070645 1797308520 1798657294 1806178096 + TXNS_TO_SKIP: "0" # 1195000000-1220000000: https://github.com/aptos-labs/aptos-core/pull/13832 RANGES_TO_SKIP: "1195000000-1220000000" BACKUP_CONFIG_TEMPLATE_PATH: terraform/helm/fullnode/files/backup/gcs.yaml From 56187b621e37bdedd6a8630cc1f246751da66478 Mon Sep 17 00:00:00 2001 From: George Mitenkov Date: Sat, 9 Nov 2024 16:56:43 +0000 Subject: [PATCH 4/4] rollback loader v2 force enable --- aptos-move/aptos-vm-environment/src/environment.rs | 4 +--- types/src/on_chain_config/aptos_features.rs | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/aptos-move/aptos-vm-environment/src/environment.rs b/aptos-move/aptos-vm-environment/src/environment.rs index 70a96749edac2..151dc19247ef9 100644 --- a/aptos-move/aptos-vm-environment/src/environment.rs +++ b/aptos-move/aptos-vm-environment/src/environment.rs @@ -23,7 +23,6 @@ use aptos_vm_types::storage::StorageGasParameters; use move_vm_runtime::{config::VMConfig, RuntimeEnvironment, WithRuntimeEnvironment}; use sha3::{Digest, Sha3_256}; use std::sync::Arc; -use aptos_types::on_chain_config::FeatureFlag; /// A runtime environment which can be used for VM initialization and more. Contains features /// used by execution, gas parameters, VM configs and global caches. Note that it is the user's @@ -176,9 +175,8 @@ impl Environment { ) -> Self { // We compute and store a hash of configs in order to distinguish different environments. let mut sha3_256 = Sha3_256::new(); - let mut features = + let features = fetch_config_and_update_hash::(&mut sha3_256, state_view).unwrap_or_default(); - features.enable(FeatureFlag::ENABLE_LOADER_V2); // If no chain ID is in storage, we assume we are in a testing environment. let chain_id = fetch_config_and_update_hash::(&mut sha3_256, state_view) diff --git a/types/src/on_chain_config/aptos_features.rs b/types/src/on_chain_config/aptos_features.rs index cc3e04e02958e..d1297014ad21f 100644 --- a/types/src/on_chain_config/aptos_features.rs +++ b/types/src/on_chain_config/aptos_features.rs @@ -196,7 +196,6 @@ impl Default for Features { for feature in FeatureFlag::default_features() { features.enable(feature); } - features.enable(FeatureFlag::ENABLE_LOADER_V2); features } }