Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

State tracing in runtime #6572

Closed
gnunicorn opened this issue Jul 3, 2020 · 6 comments
Closed

State tracing in runtime #6572

gnunicorn opened this issue Jul 3, 2020 · 6 comments
Labels
A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it.

Comments

@gnunicorn
Copy link
Contributor

gnunicorn commented Jul 3, 2020

Especially for balance transfers exchanges are asking us to provide not only the wasm blob and the final state but what is called "state traces", effectively the specific low level functions that are being executed by a specific transaction and the state changes those finally lead to. In past implementations we just added logging facilities to the specific function calls and be done with it but with the separation of concerns in substrate between client and runtime this is a bit more tricky for us.

Following #6916, we need to add event_debug!-traces with the to-be-hashed-key and its value prior to any unhashed-call that changes state – maybe also add event_trace! to the inner of unhashed as well as to all non-mutating-unhashed-calls to allow for debugging. Combined with the span-tree we should be able to identify which extrinsic lead to which changes.

@bkchr
Copy link
Member

bkchr commented Jul 3, 2020

Isn't this issue basically this: #6401 + state=tracing?

@bkchr
Copy link
Member

bkchr commented Jul 5, 2020

And how should non decl_storage storage accesses being traced?

@bkchr
Copy link
Member

bkchr commented Jul 5, 2020

Maybe we could just support a node only changes trie?

@xlc
Copy link
Contributor

xlc commented Jul 5, 2020

Sounds like #4939?

RPC state_queryStorage is already able to fetch all the changes of a particular storage key and all the blocks causing the changes.

@shawntabrizi
Copy link
Member

@gnunicorn @dvdplm Can we close this?

@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it.
Projects
None yet
Development

No branches or pull requests

5 participants