Darwinia 2.0 Blockchain Data Migration

Principles Of Data Migration

Keep The Ledger Consistent

The Darwinia 2.0 blockchain ledger will be identical to the Darwinia 1.0 ledger in every way. This means that neither the number of accounts nor the balances of the accounts will change as a result of this upgrade.

💡 All balances will have 18 digits of precision in Darwinia 2.0. Therefore, 
the underlying raw balance of the Darwinia 1.0 substrate account will be 10⁹ 
larger than it previously was. The balance’s value will stay the same, 
nevertheless.
💡 Due to Darwinia 2.0 not using an identical set of pallets from Darwinia 1.0, 
for example the Darwinia 1.0 consensus mechanism, some outdated data will be 
removed. These data does not affect the ledger.

Verifiable

Public access to data and the migration procedure is paramount, and will be available every step of the way during the merge. The source code will be posted on the GitHub repository, and freely available for inspection by anyone. The Darwinia 2.0 genesis file will be created based on Darwinia Chain and Darwinia Parachain, and will maintain a record of every state change that must eventually be transferred to Darwinia 2.0 at the specific time (block height).

Darwinia 2.0’s genesis file will be made available early in the process, and all of the code will be open-source.

Migration Process

Preparation Of Migration Tool

GitHub - darwinia-network/darwinia-2.0: Preparation for Darwinia 2.0

You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…

github.com

What the tool does:

  1. Takes a snapshot of bothDarwinia Chain and Darwinia Parachain at a certain height.
  2. Merges the chain data.
  3. Builds Darwinia 2.0’s genesis file in JSON format.

Snapshot Of Darwinia 1.0

Anyone can use the migration tool once it is ready to take a snapshot of Darwinia 1.0, and both the snapshot results and the Darwinia 2.0 genesis file subsequently produced will be accessible to all users.

On-Chain Voting

A Darwinia 1.0 on-chain governance proposal will be prepared before the actual migration.

This proposal will provide all relevant details on the migration as well as an executable WASM binary that will halt Darwinia 1.0.

The WASM bytecode will execute on-chain and halt Darwinia 1.0 after the proposal is approved.

Launch Of Darwinia 2.0

The collators will utilize the Darwinia 2.0 genesis file to bootstrap Darwinia 2.0 blockchain network, and will be fully launched at the point in time the collators have synced the full node data, and are gossiping amongst their connected peers about new block candidates.

Account Migration

Users on Darwinia 1.0 should migrate their accounts to Darwinia 2.0.

Users will need to take manual action after Darwinia 2.0 launches in order to transfer data protected by their private keys from their old accounts to their new accounts. This is because of the change in address format.

The accounts on Darwinia Smart Chain (EVM) can be used immediately on 
Darwinia 2.0 without having to make an account migration.

Why? Because they use the same encryption algorithm, the accounts for 
Darwinia 2.0 and Darwinia Smart Chain are identical. When Darwinia 2.0 
launches, these accounts will be read straight from Genesis into the new 
system pallet. As a result, users of Darwinia 2.0 can immediately access these 
accounts by using their Darwinia Smart Chain private key.

The user must supply a new H160 address when migrating. The new H160 address needs to be a brand new address managed by the new private key for the user.

What is a brand new address?

1. This address cannot be a previously used on-chain address.
2. You hold this address's private key. This address is not from any 
third-party platform.
3. This new address was created using a reputable wallet, like MetaMask.

The account migration is a process of associating the user’s data from Darwinia 1.0 (including ledger data) with the user’s new Darwinia 2.0 account (H160 address). You can only migrate an account for which you have its private key because the process requires confirmation and closing of a signature dialog box in order to approve the data transfer to the new account.

Account migration will perform the following:

  1. All free tokens will be migrated to the new account.
  2. RING locked by phragmen election, democracy, and fee market pallets will be released.
  3. RING locked in the vesting pallet will remain locked in the vesting pallet.
  4. After claiming, staked RING, KTON, and DEPOSITs will be in the bonded state.

After Account Migration

For Bonded RING / KTON / DEPOSITs

Due to a change in the staking mechanism, RING / KTON / DEPOSITs being staked on Darwinia 1.0 will not be automatically staked after the migration, i.e. they will not automatically start to generate earnings without manual intervention.

After migrating, you will have two options:

  1. Unbonding and not continuing to stake.
  2. By selecting a collator, you enter the new staking system and become a delegator.

For Those Who Want To Participate in On-chain Activities

If you participated in on-chain activities in Darwinia 1.0, you will need to rejoin in Darwinia 2.0 if you want to continue participating in Darwinia 2.0, which may re-lock some of your RING mainly for the purpose of:

  1. Participating in democracy.
  2. Becoming a relayer and participating in the fee market.

More Details

Darwinia 2.0 🚀 · Issue #9 · darwinia-network/darwinia-2.0

You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…

github.com

Pallet Storage Migration List · Issue #26 · darwinia-network/darwinia-2.0

You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…

github.com

Related Reading

About Darwinia Network

GitHub | Website | Medium | Twitter | Telegram | Discord

Darwinia is a cross-chain messaging infrastructure, which provides a light client-based, programmable, universal cross-chain messaging network for decentralized applications. Now, we’ve successfully used Darwinia’s light-client cross-chain messaging protocol(LCMP) to bridge cross-chain messages between substrate-based chains, and even between substrate-based chains and EVM chains, meanwhile, Darwinia provides developers with an SDK, so they can easily integrate cross-chain capabilities into their Dapps. This will have profound implications for cross-chain interoperability, and Darwinia as a cross-chain messaging infrastructure will facilitate the building of a hybrid cross-chain network.

0
Darwinia NetworkPost author

Darwinia Network is a highly-secure programmable cross-chain messaging infrastructure for decentralized applications. Our light-client cross-chain messaging protocol (LCMP) supports arbitrary message passing between Substrate chains, and between Substrate and EVM chains, and SDK empower developers with the tools necessary to build the next generation of Web3 applications and seamless user experiences even when transacting across multiple chains or protocols.

Darwinia as a cross-chain messaging infrastructure will facilitate the building of a hybrid cross-chain network for Polkadot.

Follow us: linktr.ee/darwinianetwork

Darwinia Network is a programmable cross-chain messaging infrastructure for decentralized applications. Our light client-based cross-chain messaging protocol (LCMP) supports arbitrary message passing between Substrate and EVM chains, and SDK empowers developers with the tools necessary to build the next generation of Web3 applications, and create seamless user experiences, even when transacting across multiple chains.

Follow us: linktr.ee/darwinianetwork

0 comments

Darwinia Network is a programmable cross-chain messaging infrastructure for decentralized applications. Our light... Show More