-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(forge script
): running script with --broadcast
for a transaction sequence can error out due to nonce desync from rpc latency
#9095
Labels
Comments
pogobounce
added
T-bug
Type: bug
T-needs-triage
Type: this issue needs to be labelled
labels
Oct 11, 2024
zerosnacks
added
T-to-investigate
Type: to investigate
Cmd-forge-script
Command: forge script
labels
Oct 11, 2024
zerosnacks
changed the title
running script with
bugOct 11, 2024
--broadcast
for a transaction sequence can error out due to nonce desync from rpc latency(forge script
): running script with --broadcast
for a transaction sequence can error out due to nonce desync from rpc latency
pogobounce
added a commit
to pogobounce/foundry
that referenced
this issue
Oct 11, 2024
Can you try using the [EDIT: |
I mentioned in the issue,
|
rplusq
pushed a commit
to rplusq/foundry
that referenced
this issue
Nov 29, 2024
… error out due to nonce desync from rpc latency (foundry-rs#9096) * fix for issue foundry-rs#9095 * changed 'if' statement into 'match' * fmt fix * repeat ask for provider nonce on desync * loop break and tokio::time use instead of std::thread
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (a17869a 2024-10-09T00:24:42.688171700Z)
What command(s) is the bug in?
forge script
Operating System
Windows
Describe the bug
On some chains with fast block times and/or relatively high latency providers, running a deployment script with
--broadcast
that sends a sequence of transactions can lead to the script failing, as the RPC will report an older transaction count for the EOA.Examples of affected chains: Gnosis Mainnet, Arbitrum Sepolia. I'm sure there's others out there, or will be.
Note;
--slow
doesn't fix/alleviate the error for me, either.Basic example script
Command
Output
Sometimes it sends just one transaction before failing, sometimes it sends more, but invariably it fails before finishing the sequence.
The text was updated successfully, but these errors were encountered: