-
Notifications
You must be signed in to change notification settings - Fork 10
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
State export import #348
State export import #348
Conversation
Codecov Report
@@ Coverage Diff @@
## main #348 +/- ##
==========================================
+ Coverage 56.92% 57.57% +0.64%
==========================================
Files 73 73
Lines 5205 5440 +235
==========================================
+ Hits 2963 3132 +169
- Misses 1954 1996 +42
- Partials 288 312 +24
|
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.
Nice Work! 🏅
I left a number of comments showing my thinking and areas that stood out to me as well. If you review them / answer them and are content with it, no need to wait another approval from me.
I didn't look at go style, just the business logic.
because sanity checks have been removed.
5cd1ff5
to
a2d530d
Compare
PoE genesis restructuring
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.
LGTM. Great work.
Didn't review everything in detail, as it's a really long PR, but followed your "review path" suggestion.
repeated cosmwasm.wasm.v1.Model models = 1 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
// CustomModel contains the raw json data for a contract to seed it's state on |
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.
// CustomModel contains the raw json data for a contract to seed it's state on | |
// CustomModel contains the raw json data for a contract to seed its state on |
return nil | ||
} | ||
} | ||
newCursor, err := v.doPageableQuery(ctx, ValsetQuery{ListActiveValidators: &ListValidatorsQuery{StartAfter: cursor.String()}}, &rsp) |
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.
This is correct AFAIK. It's a little tricky with the pagination cursor, but this code is similar / equivalent to the one in TestListAllValidatorsViaCursor
integration test (it just uses the doPageableQuery
wrapper).
The cursor is a just copy of a field of the last element of the page (the operator address).
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.
lgtm 🥇 excellent work!
Based on the #340 spike and #344
This design comes with a new
state_exporter_importer
privilege that allow contracts to register for a custom in state export/import callback.Design choices
No support for:
Reviewer
Genesis changes #351 are included in this branch, now
A good start would be to follow the code in:
Please do Squash + Merge. The single commits do not add value in the history
Follow up tasks
#356
#357
Testing
State export import can be manually tested via: