-
Notifications
You must be signed in to change notification settings - Fork 396
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
Full history of contract code migrations #195
Conversation
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.
Looks good.
I also agree to store the code history under a different key.
And then have a separate query endpoint that just returns the history.
I don't think we have to split the history into multiple keys, as it is only used on init and migrate, which are relatively heavy/privledged ops, and not loaded on execute (which should remain cheap)
"source": "https://example.com", | ||
"builder": "foo/bar:tag", | ||
"instantiate_config": { | ||
"type": 1, |
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 thought you updated this to "Nobody" / "Everybody" instead of numbers? Or is that PR not merged?
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.
yes, this is an old configuration I had before. Good 👁️ . It also shows that the field is not validated proper I will fix this
Pushed some additional tests. They are not really related to this feature but red areas on the critical path.... should make codecov happy 😆 |
Codecov Report
@@ Coverage Diff @@
## master #195 +/- ##
==========================================
+ Coverage 71.71% 71.91% +0.20%
==========================================
Files 27 27
Lines 2584 2610 +26
==========================================
+ Hits 1853 1877 +24
- Misses 621 623 +2
Partials 110 110
Continue to review full report at Codecov.
|
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.
Looks good to merge with the extra tests
Resolves #130
A contract history is stored within ContractInfo for:
Note: The genesis import/ export was more complex than storing some history data within the entity.
Moving the history out of the ContractInfo makes more sense to me to optimize the workflow and save gas. I will add a ticket to have this as a second step.
For admin use:
WIP
,R4R
,docs
, etc)