Skip to content

Error: 'pending state is not available' when sending a transaction #9622

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

Closed
2 tasks done
susuper opened this issue Jan 4, 2025 · 7 comments
Closed
2 tasks done

Error: 'pending state is not available' when sending a transaction #9622

susuper opened this issue Jan 4, 2025 · 7 comments
Labels
T-bug Type: bug T-to-investigate Type: to investigate

Comments

@susuper
Copy link

susuper commented Jan 4, 2025

Component

Cast

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.3.0 (8cc2079 2025-01-04T00:21:00.936896000Z)

What command(s) is the bug in?

cast send 0x0000000000000000000000000000000000000000 --value 0 --rpc-url https://rpc.mainnet.taiko.xyz --interactive

Operating System

Linux

Describe the bug

Any attempt to create a transaction on the Taiko mainnet results in the following error:
Error: server returned an error response: error code -32000: pending state is not available

Version nightly-a428ba6ad8856611339a6319290aade3347d25d9 does not exhibit this issue.

@susuper susuper added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Jan 4, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 4, 2025
@zerosnacks zerosnacks added T-to-investigate Type: to investigate and removed T-needs-triage Type: this issue needs to be labelled labels Jan 6, 2025
@grandizzy
Copy link
Collaborator

looks like issue was introduced with updating alloy 0.6.4 #9280 @yash-atreya mind to have a look at? thank you!

@jsvisa
Copy link
Contributor

jsvisa commented Jan 7, 2025

I think it's an issue of Taiko's, Taiko doesn't support pending tag, ref NomicFoundation/hardhat#6076 (comment)

cast will send eth_estimateGas with the pending tag to estimate the gas usage, you can give the gas-limit to temporary bypass the error, eg:

cast send 0x0000000000000000000000000000000000000000 --value 0 --rpc-url https://rpc.mainnet.taiko.xyz/ --interactive --gas-limit 21000

In foundry's side, I think maybe we can add a new arg for eth_estimateGas to use instead of the default pending tag

@grandizzy
Copy link
Collaborator

@jsvisa thank you, makes sense! @susuper pls use the --gas-limit to make it work.
Not sure though about adding the new arg for eth_estimateGas as that's Taiko related, @yash-atreya wdyt?

@zerosnacks
Copy link
Member

@jsvisa thank you, makes sense! @susuper pls use the --gas-limit to make it work. Not sure though about adding the new arg for eth_estimateGas as that's Taiko related, @yash-atreya wdyt?

I don't think we should implement a workaround for this as Taiko should adhere to the execution spec and close this as won't fix

@yash-atreya
Copy link
Member

@jsvisa thank you, makes sense! @susuper pls use the --gas-limit to make it work. Not sure though about adding the new arg for eth_estimateGas as that's Taiko related, @yash-atreya wdyt?

yep! I'd agree with @zerosnacks here. This issue arises after the alloy bump because we now set BlockId::Pending in alloy for eth_call and eth_estimateGas.

@jsvisa
Copy link
Contributor

jsvisa commented Jan 7, 2025

I don't think we should implement a workaround for this as Taiko should adhere to the execution spec and close this as won't fix

Yeah, agree with it. this bug should be fixed in Taiko's side.

@grandizzy
Copy link
Collaborator

closing per above comments

@grandizzy grandizzy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug T-to-investigate Type: to investigate
Projects
Status: Done
Development

No branches or pull requests

5 participants