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

Full history of contract code migrations #130

Closed
4 tasks
alpe opened this issue Jun 4, 2020 · 4 comments · Fixed by #195
Closed
4 tasks

Full history of contract code migrations #130

alpe opened this issue Jun 4, 2020 · 4 comments · Fixed by #195

Comments

@alpe
Copy link
Contributor

alpe commented Jun 4, 2020

Summary

Contracts can be migrated to different code versions. A full history of the changes would be helpful for audits and debugging issues.

Problem Definition

Follow up from comment

Proposal

Mandatory data would be codeID and AbsoluteTxPosition for each migration
This data should be available via rest/ cli as an ordered list.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alpe alpe changed the title Full history of contract ode migrations Full history of contract code migrations Jun 4, 2020
@ethanfrey
Copy link
Member

Sounds good. Let's do it for 0.9

@alpe
Copy link
Contributor Author

alpe commented Jun 5, 2020

As we currently store the init_msg with the codeInfo It may make sense to store the migrate_msg with this history

@ethanfrey
Copy link
Member

As we currently store the init_msg with the codeInfo It may make sense to store the migrate_msg with this history

You mean with the ContractInfo?

But yes, I agree, adding an array in the same ContractInfo struct seems like a fine solution as long as we can assume there will never be more than 10 or 20 migrations on a contract. I guess it just means each migration makes the contract more expensive to load.

I would go for this simple solution now and you can add a TODO issue to see about making this more performant if the information rarely needs to be read.

@ethanfrey
Copy link
Member

@alpe it seems you are close to finishing up all the gov stuff 🎉

If you feel blocked some day, you could also tackle this one for the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants