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

eth/tracers: use hex encoding for debug_traceBlock argument #24517

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

guifel
Copy link
Contributor

@guifel guifel commented Mar 8, 2022

debug_traceBlock wasn't usable over RPC because the RLP block JSON input isn't being Unmarshalled.

See the bug using the geth console:


> var rlp = debug.getBlockRlp(<ANY BLOCK NUMBER>)

> debug.traceBlock(rlp)
Error: could not decode block: rlp: expected input list for types.Header, decoding into (types.Block)(types.extblock).Header
	at web3.js:6365:37(47)
	at send (web3.js:5099:62(35))
	at <eval>:1:17(4)

With the fix, the above commands work.

Copy link
Contributor

@fjl fjl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

It is an API change though. I think @holiman uses this method a lot for debugging, so he should decide if the change is OK.

@fjl fjl changed the title Fix debug_traceBlock rlp block decoding eth/tracers: change debug_traceBlock argument to use hex encoding Mar 15, 2022
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from me -- I've been annoyed by this before

@fjl fjl changed the title eth/tracers: change debug_traceBlock argument to use hex encoding eth/tracers: use hex encoding for debug_traceBlock argument Mar 15, 2022
@ligi ligi added the pr:merge label Mar 15, 2022
@fjl fjl added this to the 1.10.17 milestone Mar 15, 2022
@fjl fjl merged commit 85042b7 into ethereum:master Mar 15, 2022
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Mar 16, 2022
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Sep 30, 2022
cp-wjhan pushed a commit to cp-yoonjin/go-wemix that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants