Skip to content

Commit

Permalink
remove error detail from default feature list
Browse files Browse the repository at this point in the history
  • Loading branch information
areshand committed Nov 21, 2024
1 parent 1a4fe24 commit 86056a3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 41 deletions.
1 change: 0 additions & 1 deletion aptos-move/aptos-vm/src/aptos_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ impl AptosVM {
error_vm_status.clone(),
self.features()
.is_enabled(FeatureFlag::CHARGE_INVARIANT_VIOLATION),
self.features(),
);

match txn_status {
Expand Down
6 changes: 0 additions & 6 deletions storage/aptosdb/src/db/include/aptosdb_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion types/src/on_chain_config/aptos_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion types/src/proptest_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ impl TransactionPayload {

prop_compose! {
fn arb_transaction_status()(vm_status in any::<VMStatus>()) -> 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
}
}
Expand Down
33 changes: 1 addition & 32 deletions types/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -912,22 +912,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
Expand Down Expand Up @@ -980,7 +964,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);
Expand All @@ -1003,21 +986,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 {
Expand Down

0 comments on commit 86056a3

Please sign in to comment.