-
Notifications
You must be signed in to change notification settings - Fork 184
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
Allow export of global registers (owner is empty string) #5939
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5939 +/- ##
==========================================
+ Coverage 55.61% 55.81% +0.20%
==========================================
Files 1128 1128
Lines 88939 88963 +24
==========================================
+ Hits 49459 49655 +196
+ Misses 34767 34569 -198
- Partials 4713 4739 +26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -239,8 +238,8 @@ func writeSelectedPayloads(logger zerolog.Logger, w io.Writer, payloads []*ledge | |||
return includedPayloadCount, nil | |||
} | |||
|
|||
func includePayloadByAddresses(payload *ledger.Payload, addresses []common.Address) (bool, error) { | |||
if len(addresses) == 0 { | |||
func includePayloadByOwners(payload *ledger.Payload, owners map[string]struct{}) (bool, error) { |
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.
I think it might be better to just always include the system registers, because it doesn't really make sense not to. They are small, so if you want to do further migrations with the resulting data they wont affect much and you basically need them to properly use the resulting state in transactions and scripts.
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.
Yeah, I was thinking of doing that, thanks for seconding it. I was not aware of the empty registers and given we only test/develop with filtered state locally, I accidentally broke the migration. Will make the appropriate change
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.
Added in a82f463
Global registers have an empty address.
Allow the util commands which allow filtering of state,
execution-state-extract
andextract-payloads-by-address
, to allow such global registers to be included in the final payloads.