From cf6bb822ce6d8f4fbffe326f2e461cb3858ff320 Mon Sep 17 00:00:00 2001 From: Igor Date: Thu, 16 Jan 2025 15:14:34 -0800 Subject: [PATCH] lint and compatible framework --- aptos-move/aptos-vm/src/aptos_vm.rs | 5 +- .../forge-cli/src/suites/land_blocking.rs | 4 +- testsuite/forge-cli/src/suites/ungrouped.rs | 74 +++++++++++++++++++ 3 files changed, 77 insertions(+), 6 deletions(-) diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index a2b6042340574..128790cc9a4b5 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -3126,10 +3126,7 @@ impl VMValidator for AptosVM { }; let initial_balance = if self.features().is_account_abstraction_enabled() { - vm_params - .txn - .max_aa_gas - .min(txn_data.max_gas_amount().into()) + vm_params.txn.max_aa_gas.min(txn_data.max_gas_amount()) } else { txn_data.max_gas_amount() }; diff --git a/testsuite/forge-cli/src/suites/land_blocking.rs b/testsuite/forge-cli/src/suites/land_blocking.rs index 5b2a2eafbe456..9cd6e219d9d99 100644 --- a/testsuite/forge-cli/src/suites/land_blocking.rs +++ b/testsuite/forge-cli/src/suites/land_blocking.rs @@ -2,7 +2,7 @@ // Parts of the project are originally copyright © Meta Platforms, Inc. // SPDX-License-Identifier: Apache-2.0 -use super::ungrouped::mixed_emit_job; +use super::ungrouped::mixed_compatible_emit_job; use crate::{suites::realistic_environment::realistic_env_max_load_test, TestCommand}; use aptos_forge::{success_criteria::SuccessCriteria, ForgeConfig}; use aptos_testcases::{ @@ -48,5 +48,5 @@ pub(crate) fn framework_upgrade() -> ForgeConfig { helm_values["chain"]["epoch_duration_secs"] = FrameworkUpgrade::EPOCH_DURATION_SECS.into(); })) - .with_emit_job(mixed_emit_job()) + .with_emit_job(mixed_compatible_emit_job()) } diff --git a/testsuite/forge-cli/src/suites/ungrouped.rs b/testsuite/forge-cli/src/suites/ungrouped.rs index 2830e63712dec..8dcc2528bdd79 100644 --- a/testsuite/forge-cli/src/suites/ungrouped.rs +++ b/testsuite/forge-cli/src/suites/ungrouped.rs @@ -543,6 +543,80 @@ pub fn mixed_emit_job() -> EmitJobRequest { ]) } +// framework_usecases can have new features, so might fail publishing. +pub fn mixed_compatible_emit_job() -> EmitJobRequest { + EmitJobRequest::default() + .mode(EmitJobMode::MaxLoad { + mempool_backlog: 10000, + }) + .transaction_mix(vec![ + // To test both variants, make module publish with such frequency, so that there are + // similar number of sequential and parallel blocks. + // For other transactions, make more expensive transactions somewhat rarer. + ( + TransactionTypeArg::AccountGeneration.materialize_default(), + 10000, + ), + ( + TransactionTypeArg::CoinTransfer.materialize_default(), + 10000, + ), + (TransactionTypeArg::PublishPackage.materialize_default(), 3), + ( + TransactionTypeArg::Batch100Transfer.materialize_default(), + 100, + ), + ( + TransactionTypeArg::VectorPicture30k.materialize_default(), + 100, + ), + ( + TransactionTypeArg::SmartTablePicture30KWith200Change.materialize( + 1, + true, + WorkflowProgress::when_done_default(), + ), + 100, + ), + ( + TransactionTypeArg::TokenV2AmbassadorMint.materialize_default(), + 10000, + ), + // ( + // TransactionTypeArg::ModifyGlobalResource.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::ModifyGlobalResourceAggV2.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::ModifyGlobalFlagAggV2.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::ModifyGlobalBoundedAggV2.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::ResourceGroupsGlobalWriteTag1KB.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::ResourceGroupsGlobalWriteAndReadTag1KB.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::TokenV1NFTMintAndTransferSequential.materialize_default(), + // 1000, + // ), + // ( + // TransactionTypeArg::TokenV1FTMintAndTransfer.materialize_default(), + // 10000, + // ), + ]) +} + fn fullnode_reboot_stress_test() -> ForgeConfig { ForgeConfig::default() .with_initial_validator_count(NonZeroUsize::new(7).unwrap())