Skip to content
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

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

Closed
1 task done
rayn316 opened this issue Oct 14, 2024 · 8 comments · Fixed by #12488
Closed
1 task done

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

rayn316 opened this issue Oct 14, 2024 · 8 comments · Fixed by #12488
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Milestone

Comments

@rayn316
Copy link

rayn316 commented Oct 14, 2024

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

  • I agree to follow the Code of Conduct
@rayn316 rayn316 added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Oct 14, 2024
@rayn316 rayn316 changed the title op-reth nonce returns an error when getting transaction data base chain: op-reth nonce returns an error when getting transaction data Oct 14, 2024
@mattsse
Copy link
Collaborator

mattsse commented Oct 14, 2024

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

@rayn316
Copy link
Author

rayn316 commented Oct 14, 2024

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

@mattsse mattsse added this to the release 1.1.1 milestone Oct 14, 2024
@emhane emhane added A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Oct 14, 2024
@emhane
Copy link
Member

emhane commented Oct 14, 2024

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 #11440 (comment)

@rayn316
Copy link
Author

rayn316 commented Nov 6, 2024

Do I need to resynchronize the node for this to take effect? ​​After upgrading the software to v1.1.1, the nonce returned by the transaction request has not changed.
Nonce still returns 0x0

curl -s -X POST -H "Content-Type":application/json --data '{"method":"eth_getTransactionByHash","params":["0x0089734ba94159246d3c343b72b44fe034b053075c32f764b2816c342e62946e"],"id":1,"jsonrpc":"2.0"}' http://127.0.0.1:21601 |jq
image

@rayn316
Copy link
Author

rayn316 commented Nov 6, 2024

Or is it because of the huge transaction volume of this address? https://basescan.org/address/0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001
Return normal Nonce when querying other users' transactions

@mattsse mattsse reopened this Nov 6, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in Reth Tracker Nov 6, 2024
@emhane
Copy link
Member

emhane commented Nov 12, 2024

Or is it because of the huge transaction volume of this address? https://basescan.org/address/0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001 Return normal Nonce when querying other users' transactions

that is a system address - does its txns not get a nonce? @mattsse

@mattsse
Copy link
Collaborator

mattsse commented Nov 12, 2024

for rpc, the noce field is the tx receipt's nonce field

@mattsse
Copy link
Collaborator

mattsse commented Nov 12, 2024

looks like we just need to use the nonce here

.and_then(|receipt| receipt.deposit_receipt_version);

I believe we already had this at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants