Skip to content

Conversation

@JoeHowarth
Copy link
Contributor

Previously high call data txs with too low gas limit were not rejected until getting to execution, but now they are rejected at rpc. This means that we cannot fill blocks to stress proposal creation and raptor cast. This pr fixes this

omegablitz
omegablitz previously approved these changes Oct 6, 2025
Base automatically changed from staging-jhow/txgen/join-report-w-metrics to master October 7, 2025 00:04
@JoeHowarth JoeHowarth dismissed omegablitz’s stale review October 7, 2025 00:04

The base branch was changed.

Copy link
Contributor

@eerkaijun eerkaijun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the execution submodule bump intended?

@JoeHowarth JoeHowarth changed the title Txgen: HighCallData GenMode uses erc20 call with 2^32 bytes calldata Txgen: HighCallData GenMode uses erc20 call with 2^15 bytes calldata Oct 8, 2025
@omegablitz
Copy link
Contributor

HighCallData also needs to require the Erc20 contract to be deployed

@JoeHowarth JoeHowarth force-pushed the jhow/txgen/high-calldata-fix branch from 8b98a94 to 2c09b83 Compare October 23, 2025 17:56
@Copilot Copilot AI review requested due to automatic review settings October 23, 2025 17:56
@JoeHowarth JoeHowarth force-pushed the jhow/txgen/high-calldata-fix branch from 2c09b83 to 252ed95 Compare October 23, 2025 17:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the HighCallData generator to use ERC20 contract calls with large calldata (2^15 bytes) instead of deployment transactions. The change addresses an issue where transactions with insufficient gas limits are now rejected at the RPC level rather than during execution, requiring a new approach to stress-test block filling, proposal creation, and raptor cast.

Key changes:

  • Removed the HighCallDataLowGasLimit generation mode entirely
  • Modified HighCallData generator to use ERC20 contract calls with 2KB calldata instead of deployment transactions
  • Made the make_tx helper function public to support the new implementation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
monad-eth-testutil/examples/txgen/shared/erc20.rs Made make_tx function public for use in high calldata generation
monad-eth-testutil/examples/txgen/generators/mod.rs Updated HighCallData generator initialization to use ERC20 contract and removed HighCallDataLowGasLimit mode
monad-eth-testutil/examples/txgen/generators/high_call_data.rs Replaced deployment-based approach with new high_calldata_erc20_call function that creates contract calls with large calldata
monad-eth-testutil/examples/txgen/config.rs Removed all configuration entries for deprecated HighCallDataLowGasLimit mode
monad-eth-testutil/examples/txgen/cli.rs Removed CLI option for deprecated HighCallDataLowGasLimit mode

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

ctx: &GenCtx,
) -> TxEnvelope {
let max_fee_per_gas = ctx.base_fee * 2;
let input = vec![0u8; 2 << 10];
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bit shift operation 2 << 10 evaluates to 2048 (2 * 2^10), but the PR description states the calldata should be 2^15 bytes (32768 bytes). This should be 1 << 15 or 32768 to match the intended size.

Suggested change
let input = vec![0u8; 2 << 10];
let input = vec![0u8; 1 << 15];

Copilot uses AI. Check for mistakes.
from.nonce += 1;
from.native_bal = from
.native_bal
.checked_sub(U256::from(400_000 * max_fee_per_gas))
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 400_000 for gas estimation is hardcoded. Consider defining this as a named constant (e.g., ESTIMATED_GAS_USAGE) to improve code clarity and maintainability.

Copilot uses AI. Check for mistakes.
Previously high call data txs with too low gas limit were not rejected
until getting to execution, but now they are rejected at rpc.
This means that we cannot fill blocks to stress proposal creation and
raptor cast. This pr fixes this
@JoeHowarth JoeHowarth force-pushed the jhow/txgen/high-calldata-fix branch from 252ed95 to 0ce1a04 Compare October 23, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants