The new releases containing the changes related to the Phase 1 of the migration have been prepared:
The following steps should be done as part of the procedure to migrate the xDai bridge from SCD tokens to MCD in the phase 1:
- Discover if any MCD transfer to the bridge contract happened, write down the block where the first such transfer happened.
- The bridge administrators must initiate and complete signing on the xDai chain for the invocation of the
setMaxPerTx
method with0
value. Starting from this point the oracles will relay only deposit requests for SCD tokens.setMaxPerTx
ABI:
{"constant":false,"inputs":[{"name":"_maxPerTx","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}
- Deploy new implementation of the bridge contract on the Mainnet Ethereum.
- The bridge upgradability administrators must initiate and complete signing on the Mainnet Ethereum for the invocation of the
upgradeTo
(orupgradeAndCall
if the feature "Relative daily limits" is included in the new implementation) method. At this point users must be still able to deposit SCD tokens'. - Stop all oracles on every validator node. Starting from this point users will be able initiate SCD transfers to the bridge contracts, but they will not be relayed.
- Deploy new implementation of the bridge contract on the xDai chain if it is necessary to include security fixes and enhancements (e.g. the feature "Relative daily limits").
- If the step 6 is applicable, the bridge upgradability administrators must initiate and complete signing on the xDai chain for the invocation of the
upgradeTo
(orupgradeAndCall
) method. - Upgrade oracles on every validator node. (checkout the branch!!! clone --recursive!!!)
- Run the oracles on the validators nodes. Starting from this point the oracles will handle all deposit requests postponed after the step 5.
- The bridge administrators must initiate and complete signing on the Ethereum Mainnet chain for the invocation of the
migrateToMCD
method with addresses of the migration and MCD contracts. Make sure that no oracles are restarted after step 9 since they still serve deposit requests for SCD. - Stop all oracles on every validator node.
- Compare the last block numbers observed by every oracle to find a minimal one. Reset the last observed block to the comparison result. If there is any transaction found on the step 1 use the block number that includes this transaction.
- Run the oracles on the validators nodes. Starting from this point the oracles will handle all existing deposit requests for MCD tokens.
- The bridge administrators must initiate and complete signing on the xDai chain for the invocation of the
setMaxPerTx
method with an initial value. Starting from this point the oracles handle all withdrawal requests and unlock MCD tokens. - If there is any not relayed transfer request for SCD token in the Ethereum Mainnet after the step 11, the the bridge upgradability administrators must initiate and complete signing for
claimTokens
to refund SCD tokens to the initial owners.