foundry icon indicating copy to clipboard operation
foundry copied to clipboard

anvil/blockscout: unknown_key deposit_nonce

Open igor-ritual opened this issue 1 year ago • 5 comments

Component

Anvil

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

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

anvil 0.2.0 (03f5a95 2024-01-17T16:52:30.296944551Z)

What command(s) is the bug in?

blockscout

Operating System

macOS (Apple Silicon)

Describe the bug

blockscout is unable to fetch block information and produces the error attached.

https://gist.github.com/igor-ritual/1a08e7a06be7b3b32438b41aa1b455c1

Let me know if it's better to bring this up with blockscout instead.

igor-ritual avatar Feb 06 '24 20:02 igor-ritual

This is a blockscout issue unfortunately, it seems they have a receipt with an unknown field

onbjerg avatar Feb 06 '24 20:02 onbjerg

Actually - can you tell me a bit more about the setup? Is this blockscout for an Anvil instance?

onbjerg avatar Feb 06 '24 20:02 onbjerg

I posted here given I noticed past issues regarding blockscout compatibility. The setup is simple, I run anvil and blockscout using the public docker images. Blockscout is unable to render transactions information due to the issue presented here. I pointed the blockscout instance to a geth instance and blockscout rendered blocks and transactions correctly.

igor-ritual avatar Feb 06 '24 20:02 igor-ritual

@onbjerg Do you believe this issue is related to a change in the rpc spec for anvil?

igor-ritual avatar Feb 16 '24 15:02 igor-ritual

hey, having the same issue, i believe the issue lies in these lines

"deposit_nonce" is not properly serialised to cameCase in the trx receipt blockscout correctly expects depositNonce here but fails on 'deposit_nonce' in receipt

eg.

❯ cast rpc eth_getTransactionReceipt 0xae22e5cabeb7d4b002a1c9a7f8681e3fb1979083d819e9a569ef5941d5f4875c 
{"transactionHash":"0xae22e5cabeb7d4b002a1c9a7f8681e3fb1979083d819e9a569ef5941d5f4875c","transactionIndex":"0x0","blockHash":"0x8ac029f3a384db0471cdccca7245dff1cc3aeea4e0e4e18dd3a68c2e4c32df74","blockNumber":"0x25","cumulativeGasUsed":"0x13c9b","gasUsed":"0x13c9b","effectiveGasPrice":"0x565adcb7","from":"0xa0ee7a142d267c1f36714e4a8f75612f20a79720","to":"0x84ea74d481ee0a5332c457a4d796187f6ba67feb","contractAddress":null,"logs":[{"address":"0x84ea74d481ee0a5332c457a4d796187f6ba67feb","topics":["0x1695b8d06ec800b4615e745cfb5bd00c1f2875615d42925c3b5afa543bb24c48","0x0000000000000000000000000000000000000000000000000000000000000000"],"data":"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000410bc400000000000000000000000000000000000000000000000000000000000000250000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x8ac029f3a384db0471cdccca7245dff1cc3aeea4e0e4e18dd3a68c2e4c32df74","blockNumber":"0x25","transactionHash":"0xae22e5cabeb7d4b002a1c9a7f8681e3fb1979083d819e9a569ef5941d5f4875c","transactionIndex":"0x0","logIndex":"0x0","removed":false}],"logsBloom":"0x00000000000000000000000000000000000000400000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000400000000000000000000000000000020000000000000000000000000000000000008000000000000000000000000000000","status":"0x1","type":"0x2","deposit_nonce":null}

vanderian avatar Feb 17 '24 21:02 vanderian

@mattsse when will this fix be packaged into a release?

igor-ritual avatar Feb 19 '24 16:02 igor-ritual

@igor-ritual this should be working now—could you do foundryup and confirm? if not i'll reopen and triage.

Evalir avatar Feb 19 '24 16:02 Evalir

@Evalir I'm using the foundry docker image. It appears the latest tag updated 23 days ago so I'll use the nightly tag.

https://github.com/foundry-rs/foundry/pkgs/container/foundry/versions?filters%5Bversion_type%5D=tagged

igor-ritual avatar Feb 19 '24 16:02 igor-ritual