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

Deployment tool for POA-bridges #10

Open
rstormsf opened this issue Mar 23, 2018 · 2 comments
Open

Deployment tool for POA-bridges #10

rstormsf opened this issue Mar 23, 2018 · 2 comments

Comments

@rstormsf
Copy link

rstormsf commented Mar 23, 2018

Title

  Title: Deployment tool for POA-bridges
  Layer: Bridges

Abstract

POA team needs unifed tool in order to deploy
https://github.com/poanetwork/poa-parity-bridge-contracts

Rationale

There are two parts of development: Rust and Solidity. Both teams need to be able to deploy contracts.
As a solution, it would be easier for both of the teams to use only one deployment tool.

Specification

There is an existing deployment script that is written in javascript:
https://github.com/poanetwork/poa-parity-bridge-contracts/blob/upgradable/migrations/3_upgradeable_deployment.js

There needs to be same strategy script re-written in Rust.

Home Deployment(Sokol)

  1. Deploy EternalStorageProxy contract (Example address: '0x01')
    that will be used as Home Bridge Validators Proxy contract
  2. Deploy BridgeValidators contract (Example address: '0x02')
  3. Call upgradeTo of EternalStorageProxy that is used as Home Bridge Validators with 2 parameters:
  • 0 - version of implementation contract
  • address of implementation which is the address of step#2 BridgeValidators deployed contract (0x02)
  1. Call initialize method at Home Bridge Validators Proxy(0x01) with 2 parameters:
  • REQUIRED_NUMBER_OF_VALIDATORS. Example: 1
  • Array of validators. Example ["0x0039F22efB07A647557C7C5d17854CFD6D489eF3", "0xf052d236b8076879d86c9e4c116a068a0d420c55"]
  1. Deploy Home Bridge. Example address: 0x03
  2. Deploy EternalStorageProxy contract
    that will be used as Home Bridge Proxy contract. Example address: 0x04
  3. Call upgradeTo of EternalStorageProxy that is used as Home Bridge Proxy(step#6) with 2 parameters:
  • 0 - version of implementation contract
  • address of implementation which is the address of step#5 HomeBridge deployed contract. (0x03)
  1. Call initialize method at Home Bridge Proxy address with 2 parameters:
  • address of Home Bridge Validators address Proxy ( step# 1) 0x01
  • Daily Limit in wei: Example 1000000000000000000 == 1 ether

=====

Foreign Deployment on Kovan

=====

  1. Deploy POA20 contract Example(0x05)
  2. Deploy EternalStorageProxy contract
    that will be used as Foreign Bridge Validators Proxy contract. Example 0x06
  3. Deploy BridgeValidators contract Example 0x07
  4. Call upgradeTo of EternalStorageProxy(0x06) that is used as Foreign Bridge Validators Proxy(step#10) with 2 parameters:
  • 0 - version of implementation contract
  • address of implementation which is the address of step#11 Foreign BridgeValidators deployed contract. (0x07)
  1. Call initialize method at Foreign Bridge Validators Proxy(0x06) with 2 parameters:
  • REQUIRED_NUMBER_OF_VALIDATORS. Example: 1
  • Array of validators. Example ["0x0039F22efB07A647557C7C5d17854CFD6D489eF3", "0xf052d236b8076879d86c9e4c116a068a0d420c55"]
  1. Deploy EternalStorageProxy contract
    that will be used as Foreign Bridge Proxy contract. Example 0x08
  2. Deploy Foreign Bridge contract Example 0x09
  3. Call upgradeTo of EternalStorageProxy(0x08) that is used as Foreign Bridge Proxy(step#14) with 2 parameters:
  • 0 - version of implementation contract
  • address of implementation which is the address of step#15 Foreign Bridge deployed contract. (0x09)
  1. Call initialize method at Foreign Bridge Proxy(0x08) address with 2 parameters:
  • address of Foreign Bridge Validators address Proxy ( step# 10) 0x06
  • address of POA20 token contract. Step#9 0x05
  • Daily Limit in wei: Example 1000000000000000000 == 1 ether
  1. Call transferOwnership of POA20 contract(0x05) with 1 parameter:
  • address of Foreign Bridge Proxy (0x08) from step#14
@igorbarinov
Copy link
Member

@rstormsf are will still interested in this tool or it's implemented different way?

@rstormsf
Copy link
Author

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

2 participants