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

Cross-contract call tracing #45

Merged
merged 12 commits into from Sep 6, 2023
Merged

Cross-contract call tracing #45

merged 12 commits into from Sep 6, 2023

Conversation

pmikolajczyk41
Copy link
Member

We make use of the recent extension to pallet-contracts, which enables tracing cross-contract calls.

Copy link
Collaborator

@deuszx deuszx left a comment

Choose a reason for hiding this comment

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

Left a couple of comments. In general, code looks confusing (which in Substrate usually means good) but the example usage (test) is not very useful.

drink/src/lib.rs Show resolved Hide resolved
drink/src/runtime/minimal.rs Show resolved Hide resolved

struct TestDebugger;
impl DebugExtT for TestDebugger {
fn after_call(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to see a test where DebugExtT::after_call is used to extract some data from the after_call trace (and before_call as well) which is then used to make some assertions in the unit test itself. I think an example like that would be far more useful for future users of this tracing feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

this would require interpreting Values from input_data :|

@pmikolajczyk41 pmikolajczyk41 merged commit 22b0679 into main Sep 6, 2023
1 check passed
@pmikolajczyk41 pmikolajczyk41 deleted the ccc-tracing branch September 6, 2023 07:20
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

3 participants