diff --git a/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs b/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs index e5c02e02da275..040e5dfadccb3 100644 --- a/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs +++ b/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs @@ -1121,9 +1121,9 @@ pub enum EntryFunctionCall { VestingWithoutStakingCreateVestingContractWithAmounts { shareholders: Vec, - amounts: Vec, - schedule_numerator: Vec, - schedule_denominator: u64, + shares: Vec, + vesting_numerators: Vec, + vesting_denominator: u64, start_timestamp_secs: u64, period_duration: u64, withdrawal_address: AccountAddress, @@ -1850,18 +1850,18 @@ impl EntryFunctionCall { }, VestingWithoutStakingCreateVestingContractWithAmounts { shareholders, - amounts, - schedule_numerator, - schedule_denominator, + shares, + vesting_numerators, + vesting_denominator, start_timestamp_secs, period_duration, withdrawal_address, contract_creation_seed, } => vesting_without_staking_create_vesting_contract_with_amounts( shareholders, - amounts, - schedule_numerator, - schedule_denominator, + shares, + vesting_numerators, + vesting_denominator, start_timestamp_secs, period_duration, withdrawal_address, @@ -5068,9 +5068,9 @@ pub fn vesting_without_staking_admin_withdraw( pub fn vesting_without_staking_create_vesting_contract_with_amounts( shareholders: Vec, - amounts: Vec, - schedule_numerator: Vec, - schedule_denominator: u64, + shares: Vec, + vesting_numerators: Vec, + vesting_denominator: u64, start_timestamp_secs: u64, period_duration: u64, withdrawal_address: AccountAddress, @@ -5088,9 +5088,9 @@ pub fn vesting_without_staking_create_vesting_contract_with_amounts( vec![], vec![ bcs::to_bytes(&shareholders).unwrap(), - bcs::to_bytes(&amounts).unwrap(), - bcs::to_bytes(&schedule_numerator).unwrap(), - bcs::to_bytes(&schedule_denominator).unwrap(), + bcs::to_bytes(&shares).unwrap(), + bcs::to_bytes(&vesting_numerators).unwrap(), + bcs::to_bytes(&vesting_denominator).unwrap(), bcs::to_bytes(&start_timestamp_secs).unwrap(), bcs::to_bytes(&period_duration).unwrap(), bcs::to_bytes(&withdrawal_address).unwrap(), @@ -7069,9 +7069,9 @@ mod decoder { Some( EntryFunctionCall::VestingWithoutStakingCreateVestingContractWithAmounts { shareholders: bcs::from_bytes(script.args().get(0)?).ok()?, - amounts: bcs::from_bytes(script.args().get(1)?).ok()?, - schedule_numerator: bcs::from_bytes(script.args().get(2)?).ok()?, - schedule_denominator: bcs::from_bytes(script.args().get(3)?).ok()?, + shares: bcs::from_bytes(script.args().get(1)?).ok()?, + vesting_numerators: bcs::from_bytes(script.args().get(2)?).ok()?, + vesting_denominator: bcs::from_bytes(script.args().get(3)?).ok()?, start_timestamp_secs: bcs::from_bytes(script.args().get(4)?).ok()?, period_duration: bcs::from_bytes(script.args().get(5)?).ok()?, withdrawal_address: bcs::from_bytes(script.args().get(6)?).ok()?, diff --git a/aptos-move/framework/supra-framework/doc/vesting_without_staking.md b/aptos-move/framework/supra-framework/doc/vesting_without_staking.md index 6aa2fef1106a0..fd1a383778704 100644 --- a/aptos-move/framework/supra-framework/doc/vesting_without_staking.md +++ b/aptos-move/framework/supra-framework/doc/vesting_without_staking.md @@ -1114,7 +1114,7 @@ Create a vesting schedule with the given schedule of distributions, a vesting st -
public entry fun create_vesting_contract_with_amounts(admin: &signer, shareholders: vector<address>, amounts: vector<u64>, schedule_numerator: vector<u64>, schedule_denominator: u64, start_timestamp_secs: u64, period_duration: u64, withdrawal_address: address, contract_creation_seed: vector<u8>)
+
public entry fun create_vesting_contract_with_amounts(admin: &signer, shareholders: vector<address>, shares: vector<u64>, vesting_numerators: vector<u64>, vesting_denominator: u64, start_timestamp_secs: u64, period_duration: u64, withdrawal_address: address, contract_creation_seed: vector<u8>)
 
@@ -1126,9 +1126,9 @@ Create a vesting schedule with the given schedule of distributions, a vesting st
public entry fun create_vesting_contract_with_amounts (
     admin: &signer,
     shareholders: vector<address>,
-    amounts: vector<u64>,
-    schedule_numerator: vector<u64>,
-    schedule_denominator: u64,
+    shares: vector<u64>,
+    vesting_numerators: vector<u64>,
+    vesting_denominator: u64,
     start_timestamp_secs: u64,
     period_duration: u64,
     withdrawal_address: address,
@@ -1136,11 +1136,11 @@ Create a vesting schedule with the given schedule of distributions, a vesting st
 ) acquires AdminStore {
     assert!(!system_addresses::is_reserved_address(withdrawal_address),
         error::invalid_argument(EINVALID_WITHDRAWAL_ADDRESS),);
-    assert_account_is_registered_for_apt(withdrawal_address);
+    assert_account_is_registered_for_supra(withdrawal_address);
     assert!(vector::length(&shareholders) > 0,
         error::invalid_argument(ENO_SHAREHOLDERS));
     assert!(
-        vector::length(&shareholders) == vector::length(&amounts),
+        vector::length(&shareholders) == vector::length(&shares),
         error::invalid_argument(ESHARES_LENGTH_MISMATCH),
     );
 
@@ -1160,15 +1160,15 @@ Create a vesting schedule with the given schedule of distributions, a vesting st
     let (contract_signer, contract_signer_cap) = create_vesting_contract_account(admin,
         contract_creation_seed);
     let contract_signer_address = signer::address_of(&contract_signer);
-    let schedule = vector::map_ref(&schedule_numerator, |numerator| {
-        let event = fixed_point32::create_from_rational(*numerator, schedule_denominator);
+    let schedule = vector::map_ref(&vesting_numerators, |numerator| {
+        let event = fixed_point32::create_from_rational(*numerator, vesting_denominator);
         event
     });
 
     let vesting_schedule = create_vesting_schedule(schedule, start_timestamp_secs, period_duration);
     let shareholders_map = simple_map::create<address, VestingRecord>();
     let grant_amount = 0;
-    vector::for_each_reverse(amounts, |amount| {
+    vector::for_each_reverse(shares, |amount| {
         let shareholder = vector::pop_back(&mut shareholders);
         simple_map::add(&mut shareholders_map,
             shareholder,
diff --git a/consensus/src/consensus_observer/observer/consensus_observer.rs b/consensus/src/consensus_observer/observer/consensus_observer.rs
index 032a3fa38f8bc..5a47cb1912e0b 100644
--- a/consensus/src/consensus_observer/observer/consensus_observer.rs
+++ b/consensus/src/consensus_observer/observer/consensus_observer.rs
@@ -33,7 +33,7 @@ use aptos_config::{
     network_id::PeerNetworkId,
 };
 use aptos_consensus_types::{pipeline, pipelined_block::PipelinedBlock};
-use aptos_crypto::{bls12381, Genesis};
+use aptos_crypto::{bls12381, ed25519, Genesis};
 use aptos_event_notifications::{DbBackedOnChainConfig, ReconfigNotificationListener};
 use aptos_infallible::Mutex;
 use aptos_logger::{debug, error, info, warn};
@@ -790,7 +790,7 @@ impl ConsensusObserver {
         let epoch_state = self.get_epoch_state();
 
         // Start the new epoch
-        let sk = Arc::new(bls12381::PrivateKey::genesis());
+        let sk = Arc::new(ed25519::PrivateKey::genesis());
         let signer = Arc::new(ValidatorSigner::new(AccountAddress::ZERO, sk.clone()));
         let dummy_signer = Arc::new(DagCommitSigner::new(signer.clone()));
         let (_, rand_msg_rx) =
diff --git a/consensus/src/epoch_manager.rs b/consensus/src/epoch_manager.rs
index 3d5100fef872d..26fb2a855554a 100644
--- a/consensus/src/epoch_manager.rs
+++ b/consensus/src/epoch_manager.rs
@@ -66,7 +66,7 @@ use aptos_consensus_types::{
     proof_of_store::ProofCache,
     utils::PayloadTxnsSize,
 };
-use aptos_crypto::ed25519::PrivateKey;
+use aptos_crypto::ed25519::{Ed25519PrivateKey, PrivateKey};
 use aptos_dkg::{
     pvss::{traits::Transcript, Player},
     weighted_vuf::traits::WeightedVUF,
@@ -760,7 +760,7 @@ impl EpochManager

{ async fn start_round_manager( &mut self, - consensus_key: Option>, + consensus_key: Option>, recovery_data: RecoveryData, epoch_state: Arc, onchain_consensus_config: OnChainConsensusConfig, @@ -1314,7 +1314,7 @@ impl EpochManager

{ async fn start_new_epoch_with_dag( &mut self, epoch_state: Arc, - loaded_consensus_key: Option>, + loaded_consensus_key: Option>, onchain_consensus_config: OnChainConsensusConfig, on_chain_execution_config: OnChainExecutionConfig, onchain_randomness_config: OnChainRandomnessConfig, diff --git a/consensus/src/pipeline/execution_client.rs b/consensus/src/pipeline/execution_client.rs index 9d50fe08e4a3f..31156e2e7d399 100644 --- a/consensus/src/pipeline/execution_client.rs +++ b/consensus/src/pipeline/execution_client.rs @@ -52,13 +52,14 @@ use futures::{ use futures_channel::mpsc::unbounded; use move_core_types::account_address::AccountAddress; use std::sync::Arc; +use aptos_crypto::ed25519::Ed25519PrivateKey; #[async_trait::async_trait] pub trait TExecutionClient: Send + Sync { /// Initialize the execution phase for a new epoch. async fn start_epoch( &self, - maybe_consensus_key: Option>, + maybe_consensus_key: Option>, epoch_state: Arc, commit_signer_provider: Arc, payload_manager: Arc, @@ -184,7 +185,7 @@ impl ExecutionProxyClient { fn spawn_decoupled_execution( &self, - maybe_consensus_key: Option>, + maybe_consensus_key: Option>, commit_signer_provider: Arc, epoch_state: Arc, rand_config: Option, @@ -298,7 +299,7 @@ impl ExecutionProxyClient { impl TExecutionClient for ExecutionProxyClient { async fn start_epoch( &self, - maybe_consensus_key: Option>, + maybe_consensus_key: Option>, epoch_state: Arc, commit_signer_provider: Arc, payload_manager: Arc, @@ -492,7 +493,7 @@ pub struct DummyExecutionClient; impl TExecutionClient for DummyExecutionClient { async fn start_epoch( &self, - _maybe_consensus_key: Option>, + _maybe_consensus_key: Option>, _epoch_state: Arc, _commit_signer_provider: Arc, _payload_manager: Arc, diff --git a/consensus/src/quorum_store/batch_coordinator.rs b/consensus/src/quorum_store/batch_coordinator.rs index 177e8d102c6e9..72f02ae6497af 100644 --- a/consensus/src/quorum_store/batch_coordinator.rs +++ b/consensus/src/quorum_store/batch_coordinator.rs @@ -76,7 +76,7 @@ impl BatchCoordinator { let peer_id = persist_requests[0].author(); let batches = persist_requests .iter() - .map(|persisted_value| persisted_value.batch_info().clone()) + .map(|persisted_value| (persisted_value.batch_info().clone(), persisted_value.clone().summary())) .collect(); let signed_batch_infos = batch_store.persist(persist_requests); if !signed_batch_infos.is_empty() { diff --git a/consensus/src/quorum_store/counters.rs b/consensus/src/quorum_store/counters.rs index a1de3764c869e..fc31cd77e2189 100644 --- a/consensus/src/quorum_store/counters.rs +++ b/consensus/src/quorum_store/counters.rs @@ -30,6 +30,14 @@ static TRANSACTION_COUNT_BUCKETS: Lazy> = Lazy::new(|| { .unwrap() }); +static PROOF_COUNT_BUCKETS: Lazy> = Lazy::new(|| { + [ + 1.0, 3.0, 5.0, 7.0, 10.0, 12.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 60.0, 75.0, 100.0, + 125.0, 150.0, 200.0, 250.0, 300.0, 500.0, + ] + .to_vec() +}); + static BYTE_BUCKETS: Lazy> = Lazy::new(|| { exponential_buckets( /*start=*/ 500.0, /*factor=*/ 1.5, /*count=*/ 25, @@ -73,6 +81,46 @@ pub static MAIN_LOOP: Lazy = Lazy::new(|| { ) }); +pub static PROOF_QUEUE_ADD_BATCH_SUMMARIES_DURATION: Lazy = Lazy::new(|| { + DurationHistogram::new( + register_histogram!( + "quorum_store_proof_queue_add_batch_summaries_duration", + "Duration of adding batch summaries to proof queue" + ) + .unwrap(), + ) +}); + +pub static PROOF_QUEUE_COMMIT_DURATION: Lazy = Lazy::new(|| { + DurationHistogram::new( + register_histogram!( + "quorum_store_proof_queue_commit_duration", + "Duration of committing proofs from proof queue" + ) + .unwrap(), + ) +}); + +pub static PROOF_QUEUE_UPDATE_TIMESTAMP_DURATION: Lazy = Lazy::new(|| { + DurationHistogram::new( + register_histogram!( + "quorum_store_proof_queue_update_block_timestamp_duration", + "Duration of updating block timestamp in proof queue" + ) + .unwrap(), + ) +}); + +pub static PROOF_QUEUE_REMAINING_TXNS_DURATION: Lazy = Lazy::new(|| { + DurationHistogram::new( + register_histogram!( + "quorum_store_proof_queue_remaining_txns_duration", + "Duration of calculating remaining txns in proof queue" + ) + .unwrap(), + ) +}); + /// Duration of each run of the event loop. pub static PROOF_MANAGER_MAIN_LOOP: Lazy = Lazy::new(|| { DurationHistogram::new( @@ -84,6 +132,8 @@ pub static PROOF_MANAGER_MAIN_LOOP: Lazy = Lazy::new(|| { ) }); + + /// Duration of each run of the event loop. pub static BATCH_GENERATOR_MAIN_LOOP: Lazy = Lazy::new(|| { DurationHistogram::new( @@ -397,6 +447,14 @@ pub static NUM_TOTAL_TXNS_LEFT_ON_UPDATE: Lazy = Lazy::new(|| { ) }); +pub static NUM_UNIQUE_TOTAL_TXNS_LEFT_ON_UPDATE: Lazy = Lazy::new(|| { + register_histogram!( + "quorum_store_num_unique_total_txns_left_on_update", + "Histogram for the number of total txns left after adding or cleaning batches, without duplicates.", + TRANSACTION_COUNT_BUCKETS.clone() + ).unwrap() +}); + /// Histogram for the number of total batches/PoS left after adding or cleaning batches. pub static NUM_TOTAL_PROOFS_LEFT_ON_UPDATE: Lazy = Lazy::new(|| { register_avg_counter( diff --git a/crates/aptos/src/account/multisig_account.rs b/crates/aptos/src/account/multisig_account.rs index f77a321f88edc..c38e4b3e8e435 100644 --- a/crates/aptos/src/account/multisig_account.rs +++ b/crates/aptos/src/account/multisig_account.rs @@ -1,6 +1,7 @@ // Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 +use anyhow::anyhow; use crate::common::{ types::{ CliCommand, CliError, CliTypedResult, EntryFunctionArguments, MultisigAccount, @@ -25,6 +26,7 @@ use clap::Parser; use move_core_types::{ident_str, language_storage::ModuleId}; use serde::Serialize; use serde_json::json; +use supra_aptos::{SupraCommand, SupraCommandArguments}; /// Create a new multisig account (v2) on-chain. /// @@ -42,6 +44,13 @@ pub struct Create { /// transaction. #[clap(long)] pub(crate) num_signatures_required: u64, + /// Allow the multisig account to update its own metadata key and value + /// Metadata Key + #[clap(long)] + metadata_keys: Vec, + /// Metadata Value + #[clap(long)] + metadata_values: Vec, #[clap(flatten)] pub(crate) txn_options: TransactionOptions, } @@ -106,6 +115,40 @@ impl CliCommand for Create { } } +#[async_trait] +impl SupraCommand for Create { + async fn supra_command_arguments(self) -> anyhow::Result { + if self.metadata_keys.len() != self.metadata_values.len() { + return Err(anyhow!("Not all metadata key has a metadata value.")) + }; + let metadata_key = self.metadata_keys.iter() + .map(|k| to_bytes(k)) + .collect::, _>>()?; + + let metadata_value = self.metadata_values.iter() + .map(|v| to_bytes(v)) + .collect::, _>>()?; + + let payload = aptos_stdlib::multisig_account_create_with_owners( + self.additional_owners, + self.num_signatures_required, + metadata_key, + metadata_value, + self.timeout_duration, + ); + + Ok( + SupraCommandArguments { + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + } + ) + } +} + /// Propose a new multisig transaction. /// /// As one of the owners of the multisig, propose a new transaction. This also implicitly approves @@ -151,6 +194,32 @@ impl CliCommand for CreateTransaction { } } +#[async_trait] +impl SupraCommand for CreateTransaction { + async fn supra_command_arguments(self) -> anyhow::Result { + let multisig_transaction_payload_bytes = + to_bytes::(&self.entry_function_args.try_into()?)?; + let payload = if self.store_hash_only { + aptos_stdlib::multisig_account_create_transaction_with_hash( + self.multisig_account.multisig_address, + HashValue::sha3_256_of(&multisig_transaction_payload_bytes).to_vec(), + ) + } else { + aptos_stdlib::multisig_account_create_transaction( + self.multisig_account.multisig_address, + multisig_transaction_payload_bytes, + ) + }; + Ok(SupraCommandArguments{ + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + }) + } +} + /// Verify entry function matches on-chain transaction proposal. #[derive(Debug, Parser)] pub struct VerifyProposal { @@ -260,6 +329,26 @@ impl CliCommand for Approve { } } +#[async_trait] +impl SupraCommand for Approve { + async fn supra_command_arguments(self) -> anyhow::Result { + let payload = aptos_stdlib::multisig_account_approve_transaction( + self.multisig_account_with_sequence_number + .multisig_account + .multisig_address, + self.multisig_account_with_sequence_number.sequence_number, + ); + + Ok(SupraCommandArguments { + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + }) + } +} + /// Reject a multisig transaction. /// /// As one of the owners of the multisig, reject a transaction proposed for the multisig. @@ -292,6 +381,25 @@ impl CliCommand for Reject { } } +#[async_trait] +impl SupraCommand for Reject { + async fn supra_command_arguments(self) -> anyhow::Result { + let payload = aptos_stdlib::multisig_account_reject_transaction( + self.multisig_account_with_sequence_number + .multisig_account + .multisig_address, + self.multisig_account_with_sequence_number.sequence_number, + ); + Ok(SupraCommandArguments { + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + }) + } +} + /// Execute a proposed multisig transaction that has a full payload stored on-chain. #[derive(Debug, Parser)] pub struct Execute { @@ -318,6 +426,23 @@ impl CliCommand for Execute { } } +#[async_trait] +impl SupraCommand for Execute { + async fn supra_command_arguments(self) -> anyhow::Result { + let payload = TransactionPayload::Multisig(Multisig { + multisig_address: self.multisig_account.multisig_address, + transaction_payload: None, + }); + Ok(SupraCommandArguments { + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + }) + } +} + /// Execute a proposed multisig transaction that has only a payload hash stored on-chain. #[derive(Debug, Parser)] pub struct ExecuteWithPayload { @@ -345,6 +470,23 @@ impl CliCommand for ExecuteWithPayload { } } +#[async_trait] +impl SupraCommand for ExecuteWithPayload { + async fn supra_command_arguments(self) -> anyhow::Result { + let payload = TransactionPayload::Multisig(Multisig { + multisig_address: self.execute.multisig_account.multisig_address, + transaction_payload: Some(self.entry_function_args.try_into()?), + }); + Ok(SupraCommandArguments { + payload, + sender_account: self.execute.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.execute.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.execute.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.execute.txn_options.gas_options), + }) + } +} + /// Remove a proposed multisig transaction. /// /// The transaction to be removed needs to have as many rejections as the number of signatures @@ -372,3 +514,19 @@ impl CliCommand for ExecuteReject { .map(|inner| inner.into()) } } + +#[async_trait] +impl SupraCommand for ExecuteReject { + async fn supra_command_arguments(self) -> anyhow::Result { + let payload = aptos_stdlib::multisig_account_execute_rejected_transaction( + self.multisig_account.multisig_address, + ); + Ok(SupraCommandArguments { + payload, + sender_account: self.txn_options.sender_account, + profile_options: supra_aptos::ProfileOptions::from(self.txn_options.profile_options), + rest_options: supra_aptos::RestOptions::from(self.txn_options.rest_options), + gas_options: supra_aptos::GasOptions::from(self.txn_options.gas_options), + }) + } +} diff --git a/crates/aptos/src/common/types.rs b/crates/aptos/src/common/types.rs index 6163c3311e5df..b76331ab4d0ee 100644 --- a/crates/aptos/src/common/types.rs +++ b/crates/aptos/src/common/types.rs @@ -2028,6 +2028,12 @@ pub struct MultisigAccount { pub(crate) multisig_address: AccountAddress, } +impl MultisigAccount { + pub fn multisig_address(&self) -> AccountAddress { + self.multisig_address + } +} + #[derive(Clone, Debug, Parser, Serialize)] pub struct MultisigAccountWithSequenceNumber { #[clap(flatten)] @@ -2037,6 +2043,16 @@ pub struct MultisigAccountWithSequenceNumber { pub(crate) sequence_number: u64, } +impl MultisigAccountWithSequenceNumber { + pub fn multisig_account(&self) -> &MultisigAccount { + &self.multisig_account + } + + pub fn sequence_number(&self) -> u64 { + self.sequence_number + } +} + #[derive(Debug, Parser)] pub struct TypeArgVec { /// TypeTag arguments separated by spaces. diff --git a/crates/aptos/src/governance/mod.rs b/crates/aptos/src/governance/mod.rs index 6dc9b0ada353e..70db6b284e9d8 100644 --- a/crates/aptos/src/governance/mod.rs +++ b/crates/aptos/src/governance/mod.rs @@ -52,6 +52,7 @@ use std::{ }; use supra_aptos::{SupraCommand, SupraCommandArguments}; use tempfile::TempDir; +use crate::common::types::PoolAddressArgs; /// Tool for on-chain governance /// diff --git a/execution/executor-test-helpers/src/integration_test_impl.rs b/execution/executor-test-helpers/src/integration_test_impl.rs index e466dfb0f5ed1..0163f08e07915 100644 --- a/execution/executor-test-helpers/src/integration_test_impl.rs +++ b/execution/executor-test-helpers/src/integration_test_impl.rs @@ -19,25 +19,13 @@ use aptos_storage_interface::{ state_view::{DbStateViewAtVersion, VerifiedStateViewAtVersion}, DbReaderWriter, Order, }; -use aptos_types::{ - account_config::{aptos_test_root_address, AccountResource, CoinStoreResource}, - block_metadata::BlockMetadata, - chain_id::ChainId, - event::EventKey, - ledger_info::LedgerInfo, - state_store::{MoveResourceExt, StateView}, - test_helpers::transaction_test_helpers::{block, TEST_BLOCK_EXECUTOR_ONCHAIN_CONFIG}, - transaction::{ - signature_verified_transaction::{ - into_signature_verified_block, SignatureVerifiedTransaction, - }, - Transaction::{self, UserTransaction}, - TransactionListWithProof, TransactionWithProof, WriteSetPayload, +use aptos_types::{account_config::{aptos_test_root_address, AccountResource, CoinStoreResource}, block_metadata::BlockMetadata, chain_id::ChainId, event::EventKey, ledger_info::LedgerInfo, state_store::{MoveResourceExt, StateView}, test_helpers::transaction_test_helpers::{block, TEST_BLOCK_EXECUTOR_ONCHAIN_CONFIG}, transaction::{ + signature_verified_transaction::{ + into_signature_verified_block, SignatureVerifiedTransaction, }, - trusted_state::{TrustedState, TrustedStateChange}, - waypoint::Waypoint, - AptosCoinType, -}; + Transaction::{self, UserTransaction}, + TransactionListWithProof, TransactionWithProof, WriteSetPayload, +}, trusted_state::{TrustedState, TrustedStateChange}, waypoint::Waypoint, SupraCoinType}; use aptos_vm::AptosVM; use rand::SeedableRng; use std::{path::Path, sync::Arc}; @@ -555,7 +543,7 @@ pub fn create_db_and_executor>( } pub fn get_account_balance(state_view: &dyn StateView, address: &AccountAddress) -> u64 { - CoinStoreResource::::fetch_move_resource(state_view, address) + CoinStoreResource::::fetch_move_resource(state_view, address) .unwrap() .map_or(0, |coin_store| coin_store.coin()) }