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 utility to extract payloads by addresses #5389

Conversation

fxamacker
Copy link
Member

Requires #5386

This PR adds extract-payload-by-address utility program for creating a subset of execution state which can save time during development, testing, and support/troubleshooting.

Given the intended use case, this utility uses stream reading and writing to reduce memory requirements and can be used on laptops, etc.

It requires these flags:

  • --input-filename
  • --output-filename
  • --addresses filters payloads to export for specified addresses (accounts)

This utility can be used to create a subset of execution state
which can save time during development, testing, and
support/troubleshooting.
@fxamacker fxamacker self-assigned this Feb 14, 2024
@fxamacker fxamacker added enhancement New feature or request Performance Execution Cadence Execution Team labels Feb 14, 2024
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines 106 to 107
var data [9]byte
data[0] = 0x1b
Copy link
Member

Choose a reason for hiding this comment

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

What is this magic value?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! This hex value is a CBOR integer indicator.

I refactored to use named variable in 75e1099

@turbolent turbolent requested review from a team February 14, 2024 00:28
@fxamacker fxamacker merged commit 27e9dc0 into fxamacker/extract-payloads-from-state-extraction Feb 15, 2024
@fxamacker fxamacker deleted the fxamacker/extract-payloads-by-addresses branch February 15, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Execution Cadence Execution Team Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants