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

Add API for account dump & transaction trace fix #1072

Merged
merged 2 commits into from
Sep 21, 2020
Merged

Add API for account dump & transaction trace fix #1072

merged 2 commits into from
Sep 21, 2020

Conversation

prd-fox
Copy link
Contributor

@prd-fox prd-fox commented Sep 17, 2020

A new API named debug_dumpAddress has been added in this PR, which fetches the state of an address at a given block height (including pending and latest). This includes it's code, balance, nonce, storage etc.
Note that the storage can get large, so the response can take some time. The request can also take some time due to needing to rebuild the contracts environment if the state isn't present, so if planning on using this API regularly it is recommended to run the node in archive mode.

Also included is a bug fix for tracing transactions. If the transaction is public, a write operation would fail and abort the trace due to the private state being used instead of the public state. The public state is now set correctly in this case.

…for public transactions, causing public write operations to abort the trace.

Add API method to fetch a straight dump of an account as it exists at a particular block height.
@jpmsam jpmsam requested review from vsmk98 and trung September 17, 2020 11:14
vsmk98
vsmk98 previously approved these changes Sep 17, 2020
Copy link
Contributor

@vsmk98 vsmk98 left a comment

Choose a reason for hiding this comment

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

LGTM

eth/api.go Show resolved Hide resolved
Copy link
Contributor

@trung trung left a comment

Choose a reason for hiding this comment

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

LGTM

@jpmsam jpmsam merged commit c36f04b into Consensys:master Sep 21, 2020
@prd-fox prd-fox deleted the dump_account_api branch September 22, 2020 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants