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

Darwinia Spec 1101 #693

Merged
merged 5 commits into from
Jul 29, 2021
Merged

Darwinia Spec 1101 #693

merged 5 commits into from
Jul 29, 2021

Conversation

aurexav
Copy link
Member

@aurexav aurexav commented Jul 29, 2021

Migrate DarwiniaEthereumBacking to EthereumBacking

Created from VS Code using CodeStream

@aurexav aurexav marked this pull request as draft July 29, 2021 09:24
use frame_support::migration;

log::info!("Moving storage `DarwiniaEthereumBacking` to `EthereumBacking`");
migration::move_pallet(b"DarwiniaEthereumBacking", b"EthereumBacking");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event storage key in Ethereum smart contract for locking assets need be upgrade too. @hujw77 @WoeOm

@aurexav
Copy link
Member Author

aurexav commented Jul 29, 2021

@wi1dcard

Is this name available?

docker pull quay.io/darwinia-network/darwinia:v0.11.0-fix-storage

@aurexav aurexav marked this pull request as ready for review July 29, 2021 09:35
@wi1dcard
Copy link
Contributor

@wi1dcard

Is this name available?

docker pull quay.io/darwinia-network/darwinia:v0.11.0-fix-storage

Yes, it conforms to the name convention of docker images.

@aurexav
Copy link
Member Author

aurexav commented Jul 29, 2021

Yes, it conforms to the name convention of docker images.

Where can I specify the name? In toml, README or somewhere.

@wi1dcard
Copy link
Contributor

Where can I specify the name? In toml, README or somewhere.

Just create a tag named v0.11.0-fix-storage. Or if you'd like to have a tag with a different name, please let me know after the tag has been created and I will manually push the docker images.

@aurexav
Copy link
Member Author

aurexav commented Jul 29, 2021

Just create a tag named v0.11.0-fix-storage. Or if you'd like to have a tag with a different name, please let me know after the tag has been created and I will manually push the docker images.

Great, I'll create a tag named v0.11.0-fix-storage directly.

@hackfisher
Copy link
Contributor

hackfisher commented Jul 29, 2021

If between 1100 and 1101, some one send transaction and write some storage in the same value or map key, will the migrate overwrite. Will it abort due to there are already exist?

@aurexav
Copy link
Member Author

aurexav commented Jul 29, 2021

Try Runtime

Click to expand!
2021-07-29 17:41:01 `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0
2021-07-29 17:41:01 [#0] 🗳  Finalized election round with compute ElectionCompute::OnChain.
2021-07-29 17:41:01 [0] 💸 new validator set of size 1 has been processed for era 1
2021-07-29 17:41:01 initializing remote client to "http://localhost:20000"
2021-07-29 17:41:01 scraping keypairs from remote node http://localhost:20000 @ 0x59603ed330fa54b728809fe130ee783dbcff169c91d27fc31c29c85b59d79136
2021-07-29 17:41:01 downloading data for all modules.
2021-07-29 17:41:36 extending externalities with 1 manually injected keys
2021-07-29 17:41:36 injecting a total of 98188 keys
2021-07-29 17:41:38 try-runtime::on_runtime_upgrade Darwinia.
2021-07-29 17:41:38 Moving storage `DarwiniaEthereumBacking` to `EthereumBacking`
2021-07-29 17:41:38 ⚠️ System declares internal migrations (which *might* execute), setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 Moving storage `DarwiniaEthereumBacking` to `EthereumBacking`
2021-07-29 17:41:38 ✅ no migration for TronBacking, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for EthereumRelayAuthorities, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for EthereumRelayerGame, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for EthereumBacking, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for EthereumRelay, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for CrabBacking, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Multisig, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Proxy, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Scheduler, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Recovery, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Society, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Identity, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Utility, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Vesting, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Sudo, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Treasury, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for TechnicalMembership, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for PhragmenElection, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for TechnicalCommittee, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Council, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Democracy, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for DarwiniaHeaderMMR, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for AuthorityDiscovery, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for ImOnline, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Grandpa, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Session, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Historical, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Offences, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Staking, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for ElectionProviderMultiPhase, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Authorship, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for TransactionPayment, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Kton, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Balances, setting storage version to PalletVersion { major: 2, minor: 3, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Timestamp, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for Babe, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 ✅ no migration for RandomnessCollectiveFlip, setting storage version to PalletVersion { major: 3, minor: 0, patch: 0 }
2021-07-29 17:41:38 try-runtime executed without errors. Consumed weight = 512972800000000, total weight = 512000000000000 (1.0019)

@hackfisher hackfisher merged commit b4440e2 into v0.11.0-fork Jul 29, 2021
@hackfisher hackfisher deleted the xavier-migrate branch July 29, 2021 09:48
@aurexav
Copy link
Member Author

aurexav commented Jul 29, 2021

If between 1100 and 1101, some one send transaction and write some storage in the same value or map key, will the migrate overwrite. Will it abort due to there are already exist?

Yes. It will be overwritten. But I didn't find any extrinsic could execute successfully. Except lock. But the LockAssetEvent storage will be cleared each block. So it's okay.

@hackfisher
Copy link
Contributor

aurexav pushed a commit that referenced this pull request Aug 3, 2021
aurexav pushed a commit that referenced this pull request Aug 3, 2021
* add logs

* update crates version

* update runtime version

* merge `CHANGELOG` from #693

* update `CHANGELOG`
boundless-forest pushed a commit that referenced this pull request Aug 1, 2023
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.30 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.30...1.0.31)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 this pull request may close these issues.

3 participants