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

Are there compatible issues when upgrading runtime have changed Storage name or structure? #35

Closed
hackfisher opened this issue Jul 5, 2019 · 5 comments
Assignees

Comments

@hackfisher
Copy link
Contributor

Shouldn't there be a migration design just like db migration?

@hackfisher hackfisher added the U-Question [Uncategorized] Further information/discussion is requested label Jul 5, 2019
@AurevoirXavier
Copy link
Member

Could you explain it in more detail? So we can build a testing env for this.

@sekisamu
Copy link
Contributor

sekisamu commented Nov 28, 2019

I guess, for now, we could only do it in a 'smart-contract-upgrade' way.

@hackfisher
Copy link
Contributor Author

hackfisher commented Nov 28, 2019

Could you explain it in more detail? So we can build a testing env for this.

For example, In Balances Module:

The current ReserveBalance is as following:

pub ReservedBalance get(fn reserved_balance): map T::AccountId => T::Balance;

What if we change the name of ReservedBalance to ReservedX, or change the type of map to vec etc. The underline storage keys might be changed or broken then.

I guess we may meet such migration challenges in future mainet upgrading process, and asking for the best practice.

In worst case, we could do migration through Extrinsics, just like Ethereum TXs?

@hackfisher
Copy link
Contributor Author

@AurevoirXavier
Copy link
Member

AurevoirXavier commented Jan 6, 2020

First try in #218

@AurevoirXavier AurevoirXavier added A3-inprogress and removed U-Question [Uncategorized] Further information/discussion is requested labels Jan 6, 2020
@AurevoirXavier AurevoirXavier self-assigned this Jan 6, 2020
boundless-forest pushed a commit that referenced this issue Aug 1, 2023
* Wip implement transaction_by_hash for EthApi

* pallet-ethereum: add Transactions StorageMap

* Implement transaction_by_hash Runtime API

* pallet-ethereum: change Transactions to store references only

* polkadot-evm/frontier/pull/35#discussion_r438019271

* Move Transaction build logic to Rpc module
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

No branches or pull requests

3 participants