paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.93k stars 1.17k forks source link

base chain: op-reth nonce returns an error when getting transaction data #11708

Open rayn316 opened 2 weeks ago

rayn316 commented 2 weeks ago

Describe the bug

The nonce value is inconsistent with the actual user nonce

Steps to reproduce

Use the request request node to view the nonce in the returned data and compare it with the browser.

curl --location --request POST 'http://127.0.0.1:21601' \ --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc":"2.0", "method":"eth_getTransactionByBlockHashAndIndex", "params":[ "0xd75603fddf8651d797bf4c7c6f36e404726a6a9771b6fd66b4337bd0207f5a9d", "0x0" ], "id":1 }'

Node logs

No response

Platform(s)

Linux (x86)

What version/commit are you on?

v1.1.0

What database version are you on?

2024-10-14T08:30:26.080146Z INFO Initialized tracing, debug log directory: /root/.cache/reth/logs/dev Current database version: 2 Local database version: 2

Which chain / network are you on?

base

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

mattsse commented 2 weeks ago

could you please elaborate, what error is returned, what is inconsistent?

rayn316 commented 2 weeks ago

could you please elaborate, what error is returned, what is inconsistent?

This account obviously has a lot of transactions, nonce should not be 0x0. https://basescan.org/address/0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001

result info,

    "nonce": "0x0",
image
emhane commented 2 weeks ago

the missing deposit receipt version is solved by a pretty big change which is making TransactionCompat stateful (adding ref to self as arg to TransactionCompat::fill), as mentioned in https://github.com/paradigmxyz/reth/pull/11440#issuecomment-2405081663