Summary
ChainConfig adds priority_fee_gwei: u64 (default 1). When gas.rs constructs the maxPriorityFeePerGas field of the EIP-1559 transaction envelope, it must multiply this value by 1,000,000,000 (1 gwei in wei) before passing it to alloy's TransactionRequest.
If the value is passed as U256::from(chain_cfg.priority_fee_gwei) without the multiplication, the priority fee is 1 wei — more than nine orders of magnitude below the BSC validator minimum of 1 gwei (1,000,000,000 wei). BSC validators will not prioritise or include the tx.
There is no compile-time or runtime error. The tx enters the mempool and stays stuck indefinitely. The only observable signal is the absence of included txs — indistinguishable from the base-fee headroom case without inspecting the mempool entry's maxPriorityFeePerGas field directly.
File
crates/charon-executor/src/gas.rs — fetch_params() (construction of GasParams)
Fix
let priority_fee_wei = U256::from(chain_cfg.priority_fee_gwei)
.checked_mul(U256::from(1_000_000_000u64))
.ok_or(GasError::Overflow)?;
Add a unit test: assert_eq!(priority_fee_wei(1), U256::from(1_000_000_000u64)).
Refs #43
Summary
ChainConfigaddspriority_fee_gwei: u64(default 1). Whengas.rsconstructs themaxPriorityFeePerGasfield of the EIP-1559 transaction envelope, it must multiply this value by 1,000,000,000 (1 gwei in wei) before passing it to alloy'sTransactionRequest.If the value is passed as
U256::from(chain_cfg.priority_fee_gwei)without the multiplication, the priority fee is 1 wei — more than nine orders of magnitude below the BSC validator minimum of 1 gwei (1,000,000,000 wei). BSC validators will not prioritise or include the tx.There is no compile-time or runtime error. The tx enters the mempool and stays stuck indefinitely. The only observable signal is the absence of included txs — indistinguishable from the base-fee headroom case without inspecting the mempool entry's
maxPriorityFeePerGasfield directly.File
crates/charon-executor/src/gas.rs—fetch_params()(construction ofGasParams)Fix
Add a unit test:
assert_eq!(priority_fee_wei(1), U256::from(1_000_000_000u64)).Refs #43