Skip to content

Commit

Permalink
refactor!: increase max gas limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
KaoImin committed Dec 7, 2023
1 parent d38ae58 commit 3c31972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protocol/src/constants/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ use crate::types::U64;

/// There is not a standard for the maximum gas limit, as long as the account
/// balance can pay the `gas_limit * gas_price`. For reduce some useless
/// calculation, `30_000_000` is large enough to cover the transaction usage.
pub const MAX_GAS_LIMIT: u64 = 30_000_000;
/// calculation, `50_000_000` is large enough to cover the transaction usage.
pub const MAX_GAS_LIMIT: u64 = 50_000_000;
/// According to [go-ethereum](https://github.com/ethereum/go-ethereum/blob/be65b47/eth/gasprice/gasprice.go#L38),
/// the maximum gas price is 500 Gwei.
pub const MAX_GAS_PRICE: U64 = U64([500 * GWEI]);
pub const MIN_TRANSACTION_GAS_LIMIT: u64 = 21_000;
/// The mempool refresh timeout is 50 milliseconds.
pub const MEMPOOL_REFRESH_TIMEOUT: u64 = 50;
pub const MAX_BLOCK_GAS_LIMIT: u64 = 30_000_000;
pub const MAX_BLOCK_GAS_LIMIT: u64 = 50_000_000;
// MAX_FEE_HISTORY is the maximum number of blocks that can be retrieved for a
// fee history request. Between 1 and 1024 blocks can be requested in a single
// query. reference: https://docs.infura.io/infura/networks/ethereum/json-rpc-methods/eth_feehistory/
Expand Down

0 comments on commit 3c31972

Please sign in to comment.