Skip to content

Invalid validation of pending transactions #11239

@ngotchac

Description

@ngotchac

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

No response

What version of Foundryup are you on?

No response

What command(s) is the bug in?

No response

Operating System

None

Describe the bug

It seems that the validation of pending transactions, when anvil is started w/o automine, is sometimes rejecting valid transactions.

That's the case when:

  • (1) A transaction is funding an account
  • (2) Another transaction from the funded account in (1) is sending more value than its balance before (1)

For example:

anvil --fork-block-number 49683935 --fork-url http://archive.bsc

$ cast publish "$(cast-bsc tx 0x8509e4a7ee4830e5435a0253144511c1183f88e6fd521eb8805ad21d875736bd --raw)" --async
OK

$ cast publish "$(cast-bsc tx 0xecf4eac0d9ae901037fd2b527170f45e11750e67f317a635050b44ec39abe2bc --raw)" --async
Error: server returned an error response: error code -32003: Insufficient funds for gas * price + value

The second tx would be valid if mined/validated of the first one.


I'm not sure what the best option is. Maybe a way to force a tx/bypass those checks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-anvilCommand: anvilT-featureType: featurefirst issueA good way to start contributing

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions