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

op-reth outputs bad data for "eth_getTransactionByBlockHashAndIndex" method #10463

Open
1 task done
AntonieDavid opened this issue Aug 22, 2024 · 5 comments
Open
1 task done
Assignees
Labels
A-op-reth Related to Optimism and op-reth C-bug An unexpected or incorrect behavior S-needs-design This issue requires design work to think about how it would best be accomplished

Comments

@AntonieDavid
Copy link

AntonieDavid commented Aug 22, 2024

Describe the bug

I've been testing the op-reth client on base mainnet and found a big difference when comparing the results from the node running on op-reth to the ones from a node running op-geth.
for simplicity, the main differences are for the following params: nonce - differint values and for the following params they are existent in one response and nonexistent in the other gasPrice/yParity/isSystemTx/mint/depositReceiptVersion

Steps to reproduce

payload for that request: { "jsonrpc":"2.0", "method":"eth_getTransactionByBlockHashAndIndex", "params": "0xa7f29213cecdb3d3f2f861d02156c128724f96f4b7a0c32fee15584325184301", "0x0"], "id":1}
op-reth service file flags/description:
ExecStart=/usr/local/bin/op-reth node \ --ws --ws.port=8546 --ws.addr=0.0.0.0 --ws.origins="*" \ --http --http.port=8545 --http.addr=0.0.0.0 \ --http.corsdomain="*" \ --authrpc.addr=0.0.0.0 \ --authrpc.jwtsecret=/node/data/secret.jwt \ --authrpc.port=8551 \ --datadir=/node/data/reth/ \ --rollup.sequencer-http=https://mainnet-sequencer.base.org \ --http.api=admin,debug,eth,net,trace,web3,rpc,reth,ots,eth-call-bundle \ --ws.api=admin,debug,eth,net,trace,web3,rpc,reth,ots,eth-call-bundle \ --metrics 0.0.0.0:6060 \ --chain base \ --rpc.gascap 18446744073709551615 \ --rpc.max-connections 429496729 \ --rpc.max-logs-per-response 0 \ --rpc.max-subscriptions-per-connection 10000 \ --rollup.disable-tx-pool-gossip

Node logs

output from the op-reth client:
{"jsonrpc":"2.0","result":{"hash":"0xc468b38a20375922828c8126912740105125143b9856936085474b2590bbca91","nonce":"0x0","blockHash":"0xa7f29213cecdb3d3f2f861d02156c128724f96f4b7a0c32fee15584325184301","blockNumber":"0x11c7b4b","transactionIndex":"0x0","from":"0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001","to":"0x4200000000000000000000000000000000000015","value":"0x0","gas":"0xf4240","input":"0x440a5e20000008dd00101c1200000000000000040000000066c352bb000000000139c4f500000000000000000000000000000000000000000000000000000000c0cff1460000000000000000000000000000000000000000000000000000000000000001d4c88f4065ac9671e8b1329b90773e89b5ddff9cf8675b2b5e9c1b28320609930000000000000000000000005050f69a9786f081509234f1a7f4684b5e5b76c9","r":"0x0","s":"0x0","v":"0x0","yParity":"0x0","type":"0x7e","isSystemTx":false,"sourceHash":"0x417d134467f4737fcdf2475f0ecdd2a0ed6d87ecffc888ba9f60ee7e3b8ac26a"},"id":1}


output from the op-geth client:
{"jsonrpc":"2.0","id":1,"result":{"blockHash":"0xa7f29213cecdb3d3f2f861d02156c128724f96f4b7a0c32fee15584325184301","blockNumber":"0x11c7b4b","from":"0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001","gas":"0xf4240","gasPrice":"0x0","hash":"0xc468b38a20375922828c8126912740105125143b9856936085474b2590bbca91","input":"0x440a5e20000008dd00101c1200000000000000040000000066c352bb000000000139c4f500000000000000000000000000000000000000000000000000000000c0cff1460000000000000000000000000000000000000000000000000000000000000001d4c88f4065ac9671e8b1329b90773e89b5ddff9cf8675b2b5e9c1b28320609930000000000000000000000005050f69a9786f081509234f1a7f4684b5e5b76c9","nonce":"0x11c7b4c","to":"0x4200000000000000000000000000000000000015","transactionIndex":"0x0","value":"0x0","type":"0x7e","v":"0x0","r":"0x0","s":"0x0","sourceHash":"0x417d134467f4737fcdf2475f0ecdd2a0ed6d87ecffc888ba9f60ee7e3b8ac26a","mint":"0x0","depositReceiptVersion":"0x1"}}

Platform(s)

Linux (x86)

What version/commit are you on?

op-reth --version reth Version: 1.0.3 Commit SHA: 390f30a Build Timestamp: 2024-08-05T23:59:17.371843433Z Build Features: jemalloc,optimism Build Profile: maxperf

What database version are you on?

op-reth db version
2024-08-22T18:23:51.766359Z INFO Initialized tracing, debug log directory: /root/.cache/reth/logs/optimism
Error: Datadir does not exist: "/root/.local/share/reth/optimism"

Which chain / network are you on?

base mainnet

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

source "$HOME/.cargo/env" && RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak,optimism --bin op-reth

Code of Conduct

  • I agree to follow the Code of Conduct
@AntonieDavid AntonieDavid added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Aug 22, 2024
@mattsse mattsse added A-op-reth Related to Optimism and op-reth and removed S-needs-triage This issue needs to be labelled labels Aug 24, 2024
@mattsse mattsse self-assigned this Aug 24, 2024
@mattsse
Copy link
Collaborator

mattsse commented Aug 24, 2024

@emhane
Copy link
Member

emhane commented Aug 28, 2024

trait method EthTransactions::transaction_by_block_and_tx_index requires an op override. are you under way with this already @mattsse ?

@mattsse
Copy link
Collaborator

mattsse commented Aug 29, 2024

completed should be

  • gasPrice
  • isSystemTx
  • depositReceiptVersion

missing mint is actually correct in the op-reth response because this should be omitted from rpc if there's no mint in the tx, it is present in op-geth because there's an rlp issue that results in mint 0x0 for deposit txs without mints. But for consistency, we could also return mint: 0x0 in those cases until fixed if you want @AntonieDavid ?

how to deal with the additional yParity field is tbd

@AntonieDavid
Copy link
Author

there's no need for mint: 0x0 if there's no mint in the tx. thanks for the solution so far, looking forward for the yParity also.

@emhane emhane added the S-needs-design This issue requires design work to think about how it would best be accomplished label Sep 17, 2024
@emhane
Copy link
Member

emhane commented Sep 17, 2024

how to deal with yParity field needs design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth C-bug An unexpected or incorrect behavior S-needs-design This issue requires design work to think about how it would best be accomplished
Projects
Status: Todo
Development

No branches or pull requests

3 participants