From 632487ee01d7fc381a947282cd25e758b84695e2 Mon Sep 17 00:00:00 2001 From: Bo Wu Date: Wed, 20 Nov 2024 09:19:22 -0800 Subject: [PATCH] remove error detail from default feature list --- aptos-move/aptos-vm/src/aptos_vm.rs | 1 - .../aptosdb/src/db/include/aptosdb_writer.rs | 6 ---- types/src/on_chain_config/aptos_features.rs | 1 - types/src/proptest_types.rs | 4 +-- types/src/transaction/mod.rs | 34 +------------------ 5 files changed, 3 insertions(+), 43 deletions(-) diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index cc94c805c21aa8..1622b461330a59 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -475,7 +475,6 @@ impl AptosVM { error_vm_status.clone(), self.features() .is_enabled(FeatureFlag::CHARGE_INVARIANT_VIOLATION), - self.features(), ); match txn_status { diff --git a/storage/aptosdb/src/db/include/aptosdb_writer.rs b/storage/aptosdb/src/db/include/aptosdb_writer.rs index 71a35d21a5ab9e..59348b78285b9e 100644 --- a/storage/aptosdb/src/db/include/aptosdb_writer.rs +++ b/storage/aptosdb/src/db/include/aptosdb_writer.rs @@ -309,12 +309,6 @@ impl AptosDB { .commit_transaction_accumulator(chunk.first_version, chunk.transaction_infos) .unwrap() }); - s.spawn(|_| { - self.commit_transaction_auxiliary_data( - chunk.first_version, - chunk.transaction_outputs.iter().map(TransactionOutput::auxiliary_data)) - .unwrap() - }); }); Ok(new_root_hash) diff --git a/types/src/on_chain_config/aptos_features.rs b/types/src/on_chain_config/aptos_features.rs index 905c907b7df4e0..4b4faa2f2dd6ee 100644 --- a/types/src/on_chain_config/aptos_features.rs +++ b/types/src/on_chain_config/aptos_features.rs @@ -163,7 +163,6 @@ impl FeatureFlag { FeatureFlag::COIN_TO_FUNGIBLE_ASSET_MIGRATION, FeatureFlag::OBJECT_NATIVE_DERIVED_ADDRESS, FeatureFlag::DISPATCHABLE_FUNGIBLE_ASSET, - FeatureFlag::REMOVE_DETAILED_ERROR_FROM_HASH, FeatureFlag::CONCURRENT_FUNGIBLE_ASSETS, FeatureFlag::AGGREGATOR_V2_IS_AT_LEAST_API, FeatureFlag::CONCURRENT_FUNGIBLE_BALANCE, diff --git a/types/src/proptest_types.rs b/types/src/proptest_types.rs index 33765c9c2e4608..6ecd73ef8d6ac0 100644 --- a/types/src/proptest_types.rs +++ b/types/src/proptest_types.rs @@ -19,7 +19,7 @@ use crate::{ epoch_state::EpochState, event::{EventHandle, EventKey}, ledger_info::{generate_ledger_info_with_sig, LedgerInfo, LedgerInfoWithSignatures}, - on_chain_config::{Features, ValidatorSet}, + on_chain_config::ValidatorSet, proof::TransactionInfoListWithProof, state_store::{state_key::StateKey, state_value::StateValue}, transaction::{ @@ -499,7 +499,7 @@ impl TransactionPayload { prop_compose! { fn arb_transaction_status()(vm_status in any::()) -> TransactionStatus { - let (txn_status, _) = TransactionStatus::from_vm_status(vm_status, true, &Features::default()); + let (txn_status, _) = TransactionStatus::from_vm_status(vm_status, true); txn_status } } diff --git a/types/src/transaction/mod.rs b/types/src/transaction/mod.rs index b557dfc00e877e..dbd4d7ba9721c9 100644 --- a/types/src/transaction/mod.rs +++ b/types/src/transaction/mod.rs @@ -11,7 +11,6 @@ use crate::{ contract_event::{ContractEvent, FEE_STATEMENT_EVENT_TYPE}, keyless::{KeylessPublicKey, KeylessSignature}, ledger_info::LedgerInfo, - on_chain_config::{FeatureFlag, Features}, proof::{TransactionInfoListWithProof, TransactionInfoWithProof}, state_store::ShardedStateUpdates, transaction::authenticator::{ @@ -912,22 +911,6 @@ impl ExecutionStatus { _ => ExecutionStatus::MiscellaneousError(None), } } - - pub fn remove_error_detail(self) -> Self { - match self { - ExecutionStatus::MoveAbort { - location, - code, - info: _, - } => ExecutionStatus::MoveAbort { - location, - code, - info: None, - }, - ExecutionStatus::MiscellaneousError(_) => ExecutionStatus::MiscellaneousError(None), - _ => self, - } - } } /// The status of executing a transaction. The VM decides whether or not we should `Keep` the @@ -980,7 +963,6 @@ impl TransactionStatus { pub fn from_vm_status( vm_status: VMStatus, charge_invariant_violation: bool, - features: &Features, ) -> (Self, TransactionAuxiliaryData) { let status_code = vm_status.status_code(); let txn_aux = TransactionAuxiliaryData::from_vm_status(&vm_status); @@ -1003,21 +985,7 @@ impl TransactionStatus { } }, }; - - if features.is_enabled(FeatureFlag::REMOVE_DETAILED_ERROR_FROM_HASH) { - (status.remove_error_detail(), txn_aux) - } else { - (status, txn_aux) - } - } - - pub fn remove_error_detail(self) -> Self { - match self { - TransactionStatus::Keep(status) => { - TransactionStatus::Keep(status.remove_error_detail()) - }, - _ => self, - } + (status, txn_aux) } pub fn from_executed_vm_status(vm_status: VMStatus) -> Self {