Skip to content

Commit ebb21af

Browse files
committed
fix: increase txn expiration
1 parent aa45303 commit ebb21af

File tree

5 files changed

+81
-5
lines changed

5 files changed

+81
-5
lines changed

aptos-move/framework/aptos-framework/doc/governed_gas_pool.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [Function `deposit_from`](#0x1_governed_gas_pool_deposit_from)
1919
- [Function `deposit_from_fungible_store`](#0x1_governed_gas_pool_deposit_from_fungible_store)
2020
- [Function `deposit_gas_fee`](#0x1_governed_gas_pool_deposit_gas_fee)
21+
- [Function `deposit_gas_fee_v2`](#0x1_governed_gas_pool_deposit_gas_fee_v2)
2122
- [Function `get_balance`](#0x1_governed_gas_pool_get_balance)
2223
- [Specification](#@Specification_1)
2324
- [Function `initialize`](#@Specification_1_initialize)
@@ -411,12 +412,39 @@ Deposits gas fees into the governed gas pool.
411412

412413

413414
<pre><code><b>public</b> <b>fun</b> <a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_gas_fee">deposit_gas_fee</a>(gas_payer: <b>address</b>, gas_fee: u64) <b>acquires</b> <a href="governed_gas_pool.md#0x1_governed_gas_pool_GovernedGasPool">GovernedGasPool</a> {
414-
<b>if</b> (<a href="../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_operations_default_to_fa_apt_store_enabled">features::operations_default_to_fa_apt_store_enabled</a>()) {
415+
// get the sender <b>to</b> preserve the signature but do nothing
416+
<a href="governed_gas_pool.md#0x1_governed_gas_pool_governed_gas_pool_address">governed_gas_pool_address</a>();
417+
}
418+
</code></pre>
419+
420+
421+
422+
</details>
423+
424+
<a id="0x1_governed_gas_pool_deposit_gas_fee_v2"></a>
425+
426+
## Function `deposit_gas_fee_v2`
427+
428+
Deposits gas fees into the governed gas pool.
429+
@param gas_payer The address of the account that paid the gas fees.
430+
@param gas_fee The amount of gas fees to be deposited.
431+
432+
433+
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_gas_fee_v2">deposit_gas_fee_v2</a>(gas_payer: <b>address</b>, gas_fee: u64)
434+
</code></pre>
435+
436+
437+
438+
<details>
439+
<summary>Implementation</summary>
440+
441+
442+
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_gas_fee_v2">deposit_gas_fee_v2</a>(gas_payer: <b>address</b>, gas_fee: u64) <b>acquires</b> <a href="governed_gas_pool.md#0x1_governed_gas_pool_GovernedGasPool">GovernedGasPool</a> {
443+
<b>if</b> (<a href="../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_operations_default_to_fa_apt_store_enabled">features::operations_default_to_fa_apt_store_enabled</a>()) {
415444
<a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_from_fungible_store">deposit_from_fungible_store</a>(gas_payer, gas_fee);
416445
} <b>else</b> {
417446
<a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_from">deposit_from</a>&lt;AptosCoin&gt;(gas_payer, gas_fee);
418447
};
419-
420448
}
421449
</code></pre>
422450

aptos-move/framework/aptos-framework/doc/transaction_fee.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This module provides an interface to burn or collect and redistribute transactio
1919
- [Function `register_proposer_for_fee_collection`](#0x1_transaction_fee_register_proposer_for_fee_collection)
2020
- [Function `burn_coin_fraction`](#0x1_transaction_fee_burn_coin_fraction)
2121
- [Function `process_collected_fees`](#0x1_transaction_fee_process_collected_fees)
22+
- [Function `burn_from`](#0x1_transaction_fee_burn_from)
2223
- [Function `burn_fee`](#0x1_transaction_fee_burn_fee)
2324
- [Function `mint_and_refund`](#0x1_transaction_fee_mint_and_refund)
2425
- [Function `collect_fee`](#0x1_transaction_fee_collect_fee)
@@ -598,6 +599,53 @@ at the beginning of the block or during reconfiguration.
598599

599600

600601

602+
</details>
603+
604+
<a id="0x1_transaction_fee_burn_from"></a>
605+
606+
## Function `burn_from`
607+
608+
Burns a specified amount of AptosCoin from an address.
609+
610+
@param core_resource The signer representing the core resource account.
611+
@param account The address from which to burn AptosCoin.
612+
@param fee The amount of AptosCoin to burn.
613+
@abort If the burn capability is not available.
614+
615+
616+
<pre><code><b>public</b> <b>fun</b> <a href="transaction_fee.md#0x1_transaction_fee_burn_from">burn_from</a>(aptos_framework: &<a href="../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer">signer</a>, <a href="account.md#0x1_account">account</a>: <b>address</b>, fee: u64)
617+
</code></pre>
618+
619+
620+
621+
<details>
622+
<summary>Implementation</summary>
623+
624+
625+
<pre><code><b>public</b> <b>fun</b> <a href="transaction_fee.md#0x1_transaction_fee_burn_from">burn_from</a>(aptos_framework: &<a href="../../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer">signer</a>, <a href="account.md#0x1_account">account</a>: <b>address</b>, fee: u64) <b>acquires</b> <a href="transaction_fee.md#0x1_transaction_fee_AptosFABurnCapabilities">AptosFABurnCapabilities</a>, <a href="transaction_fee.md#0x1_transaction_fee_AptosCoinCapabilities">AptosCoinCapabilities</a> {
626+
<a href="system_addresses.md#0x1_system_addresses_assert_aptos_framework">system_addresses::assert_aptos_framework</a>(aptos_framework);
627+
<b>if</b> (<b>exists</b>&lt;<a href="transaction_fee.md#0x1_transaction_fee_AptosFABurnCapabilities">AptosFABurnCapabilities</a>&gt;(@aptos_framework)) {
628+
<b>let</b> burn_ref = &<b>borrow_global</b>&lt;<a href="transaction_fee.md#0x1_transaction_fee_AptosFABurnCapabilities">AptosFABurnCapabilities</a>&gt;(@aptos_framework).burn_ref;
629+
<a href="aptos_account.md#0x1_aptos_account_burn_from_fungible_store">aptos_account::burn_from_fungible_store</a>(burn_ref, <a href="account.md#0x1_account">account</a>, fee);
630+
} <b>else</b> {
631+
<b>let</b> burn_cap = &<b>borrow_global</b>&lt;<a href="transaction_fee.md#0x1_transaction_fee_AptosCoinCapabilities">AptosCoinCapabilities</a>&gt;(@aptos_framework).burn_cap;
632+
<b>if</b> (<a href="../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_operations_default_to_fa_apt_store_enabled">features::operations_default_to_fa_apt_store_enabled</a>()) {
633+
<b>let</b> (burn_ref, burn_receipt) = <a href="coin.md#0x1_coin_get_paired_burn_ref">coin::get_paired_burn_ref</a>(burn_cap);
634+
<a href="aptos_account.md#0x1_aptos_account_burn_from_fungible_store">aptos_account::burn_from_fungible_store</a>(&burn_ref, <a href="account.md#0x1_account">account</a>, fee);
635+
<a href="coin.md#0x1_coin_return_paired_burn_ref">coin::return_paired_burn_ref</a>(burn_ref, burn_receipt);
636+
} <b>else</b> {
637+
<a href="coin.md#0x1_coin_burn_from">coin::burn_from</a>&lt;AptosCoin&gt;(
638+
<a href="account.md#0x1_account">account</a>,
639+
fee,
640+
burn_cap,
641+
);
642+
};
643+
};
644+
}
645+
</code></pre>
646+
647+
648+
601649
</details>
602650

603651
<a id="0x1_transaction_fee_burn_fee"></a>

aptos-move/framework/aptos-framework/doc/transaction_validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ Called by the Adapter
649649
<b>if</b> (amount_to_burn &gt; storage_fee_refunded) {
650650
<b>let</b> burn_amount = amount_to_burn - storage_fee_refunded;
651651
<b>if</b> (<a href="../../aptos-stdlib/../move-stdlib/doc/features.md#0x1_features_governed_gas_pool_enabled">features::governed_gas_pool_enabled</a>()) {
652-
<a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_gas_fee">governed_gas_pool::deposit_gas_fee</a>(gas_payer, burn_amount);
652+
<a href="governed_gas_pool.md#0x1_governed_gas_pool_deposit_gas_fee_v2">governed_gas_pool::deposit_gas_fee_v2</a>(gas_payer, burn_amount);
653653
} <b>else</b> {
654654
<a href="transaction_fee.md#0x1_transaction_fee_burn_fee">transaction_fee::burn_fee</a>(gas_payer, burn_amount);
655655
}

crates/transaction-emitter-lib/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub struct EmitArgs {
122122
#[clap(long)]
123123
pub target_tps: Option<usize>,
124124

125-
#[clap(long, default_value_t = 30)]
125+
#[clap(long, default_value_t = 120)]
126126
pub txn_expiration_time_secs: u64,
127127

128128
/// Time to run --emit-tx for in seconds.

crates/transaction-emitter-lib/src/emitter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl Default for EmitJobRequest {
194194
init_gas_price_multiplier: 2,
195195
mint_to_root: false,
196196
skip_minting_accounts: false,
197-
txn_expiration_time_secs: 60,
197+
txn_expiration_time_secs: 120,
198198
init_expiration_multiplier: 3.0,
199199
init_retry_interval: Duration::from_secs(10),
200200
num_accounts_mode: NumAccountsMode::TransactionsPerAccount(20),

0 commit comments

Comments
 (0)