Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Upgrade guide for v0.7.0 #528

Closed
fewensa opened this issue Sep 29, 2022 · 2 comments
Closed

Upgrade guide for v0.7.0 #528

fewensa opened this issue Sep 29, 2022 · 2 comments

Comments

@fewensa
Copy link
Contributor

fewensa commented Sep 29, 2022

In this version, the Ethereum v2 bridge is supported.

⚠️ ⚠️ ⚠️ Th Ethereum v2 bridge named bridge-darwinia-ethereum, Ethereum v1 bridge renamed to bridge-darwinia-ethereum-pow
⚠️ ⚠️ ⚠️ You don't need to, nor can you upgrade Ethereum v1 bridge dariwnia-ethereum directly
⚠️ ⚠️ ⚠️ If you need to upgrade the Ethereum v1 bridge in the future, please modify your script to use darwinia-ethereum-pow

How to run bridge ethv2:

Copy config file from .maintain/config/bridge-darwinia-ethereum.toml to BRIDGER_HOME and change your seed.

bridger darwinia-ethereum start
@furoxr
Copy link
Contributor

furoxr commented Sep 29, 2022

How to config the bridger

1. Get Ethereum rpc api url

Bridger uses this api to communicate with ethereum, querying events, sending tx etc...

  1. Register a account at Alchemy
  2. Create a app
  3. Click VIEW KEY and copy the https part to ethereum.execution_layer_endpoint in the config

2. Get Etherscan api key

Bridger uses this api to get a approriate gas price.

  1. Register a account at Etherscan
  2. Add a api key at API Keys
  3. Copy the API Key Token to ethereum.etherscan_api_key in the config

3. For ECDSA authorities

ECDSA authorities have two roles:

  1. Sign the new message root
  2. Sign the authorities change
# Execute this to begin to play the first role
bridger darwinia-ethereum kv put scan.darwinia.collecting-message.running true
# Execute this to begin to play the second role
bridger darwinia-ethereum kv put scan.darwinia.collecting-authorities.running true

4. For relayers who want to relay headers from Darwinia to Ethereum

# Execute this to begin to relay new message root
bridger darwinia-ethereum kv put scan.darwinia.collected-message.running true
# Execute this to begin to relay new authorities change
bridger darwinia-ethereum kv put scan.darwinia.collected-authorities.running true

@fewensa fewensa closed this as completed Oct 31, 2022
@furoxr
Copy link
Contributor

furoxr commented Nov 10, 2022

About gas price

Bridger use two different methods to get a dynamic gas price when triggering a transaction.

Darwinia side

Bridger use eth_gasprice rpc to get gas price. What's more, gas price used can not exceed the value set in the config darwinia.max_gas_price.

ETH side

  1. If ethereum.etherscan_api_key in the config is not empty, Bridger will use etherscan to get the gas price.
  2. If ethereum.etherscan_api_key in the config is empty, Bridger will use eth_gasprice to get gas price.
    Also, gas price used can not exceed the value set in the config ethereum.max_gas_price

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants