-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement three trace APIs #2205
base: main
Are you sure you want to change the base?
Conversation
- trace_block - trace_filter - trace_transaction Plus tests and docs
Bencher Report
Click to view all benchmark results
|
zilliqa/src/api/trace.rs
Outdated
.skip(after as usize) | ||
.take(count as usize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it wasteful to only use these parameters after you've already collected all_traces
? Should we use them above? Or equivalently, make all_traces
an Iterator
which you collect the correct number of here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, good point. I did a procedural approach here and used a loop label here because that was the smaller change from what we already had, but it feels a bit gnarly to me so I'm very open to switching to the iterator approach if you'd prefer?
- Moved pagination earlier in the code to avoid unnecessary traces - I've taken a procedural approach here with use of a loop label, but I'm open to switching to iterators
Plus tests and docs
Closes #2117
Closes #2192
Closes #2197