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

Darwinia2.0 and ETH updates #578

Merged
merged 42 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
123b83c
fix:new api
furoxr Mar 12, 2023
8290c77
feat:pangolin support bridge e2e
furoxr Mar 13, 2023
cf0e22b
feat:follow api update
furoxr Mar 13, 2023
189986d
feat:init pangolin-goerli
furoxr Mar 13, 2023
4d53da8
feat:Add PangolinGoerli bridge and chain to support types
furoxr Mar 13, 2023
8eec168
feat:update ci
furoxr Mar 13, 2023
c93333c
fix:fork version
furoxr Mar 16, 2023
9faea3e
feat:follow eth update
furoxr Mar 20, 2023
a8105c7
fix:eth bridge dependencies
furoxr Mar 20, 2023
cfe10fe
feat:follow eth update
furoxr Mar 20, 2023
63a7022
feat:update dependencies
furoxr Mar 20, 2023
7775dde
Fix service config (#558)
furoxr Dec 27, 2022
7bfb34a
Clean
furoxr Mar 20, 2023
b58ce76
feat:compatiable with eth update
furoxr Mar 20, 2023
32e962e
Merge branch 'nada-capella' into nada-pangolin-goerli
furoxr Mar 20, 2023
bd11ed0
fix
furoxr Mar 20, 2023
92292cf
feat:capella execution layer
furoxr Mar 23, 2023
4f47c18
feat:use estimated gas
furoxr Mar 23, 2023
e92bc45
feat:update verification
furoxr Mar 23, 2023
27721ab
clean
furoxr Mar 24, 2023
9b342eb
fix:ci
furoxr Mar 28, 2023
ccb353d
fix:estimate gas
furoxr Apr 4, 2023
d86d94a
tests:message test
furoxr Apr 18, 2023
806d8a2
clean
furoxr Apr 18, 2023
0d8191b
Update gas limit
furoxr Apr 20, 2023
b8b6688
Follow BLC header relay update
furoxr Apr 20, 2023
2bdd8c7
Remove execution layer relay related
furoxr Apr 20, 2023
9ccb56d
fix:ecdsa stuck after connection failed
furoxr Apr 24, 2023
93e4b37
fix:Increase margin to gas limit
furoxr Apr 24, 2023
82dfa6c
format
furoxr Apr 24, 2023
9dec5ff
feat:Add timeout to waiting for tx confirmation
furoxr Apr 24, 2023
6b8b152
Ignore tests
furoxr Apr 24, 2023
a07345d
Merge branch 'master' into nada-pangolin-goerli
furoxr Apr 24, 2023
87a1f19
Temp ignore other bridges
furoxr Apr 25, 2023
46ca2d3
feat:Update darwinia-ethereum bridge
furoxr Apr 25, 2023
0eac6c0
feat:Update CI
furoxr Apr 25, 2023
773a817
Remove pangoro-goerli
furoxr Apr 26, 2023
bf0cc26
Clean
furoxr Apr 26, 2023
2678623
Update darwinia rpc
furoxr Apr 26, 2023
955efdb
Add eth bridges to release ci
furoxr Apr 26, 2023
523ecff
Merge branch 'master' into nada-pangolin-goerli
fewensa Apr 26, 2023
47b78c2
Code clean
fewensa Apr 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ jobs:
matrix:
bridge:
- pangolin-pangoro
- pangolin-goerli
- darwinia-crab
- darwinia-ethereum
# - pangoro-chapel
# - pangoro-goerli
steps:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
matrix:
package:
- bridger
# - darwinia-ethereum
- darwinia-ethereum
- darwinia-crab
- pangolin-pangoro
- pangolin-goerli
# - pangoro-chapel
# - pangoro-goerli
steps:
Expand Down Expand Up @@ -169,9 +170,10 @@ jobs:
matrix:
package:
- bridger
# - darwinia-ethereum
- darwinia-ethereum
- darwinia-crab
- pangolin-pangoro
- pangolin-goerli
# - pangoro-chapel
# - pangoro-goerli
steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
matrix:
package:
- bridger
# - darwinia-ethereum
- darwinia-ethereum
# - darwinia-crab
- pangolin-pangoro
- pangolin-goerli
# - pangolin-pangoro
# - pangoro-chapel
# - pangoro-goerli
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**/*.DS_Store
target
.idea
.vscode

/Cargo.lock

Expand Down
37 changes: 17 additions & 20 deletions .maintain/config/bridge-darwinia-ethereum.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
enable_beacon_header_relay = true
# Whether to relay sync commit from beacon chain to evm chain
enable_sync_commit_relay = true
# Whether to relay execution layer state root from execution chain to evm chain
enable_execution_header_layer = true
# Whether to sign the messages root and relay headers from evm chain to beacon chain
enable_ecdsa_relay = true
# Whether to relay messages from execution chain to evm chain
Expand All @@ -17,47 +15,46 @@ max_message_num_per_relaying = 15
header_relay_minimum_interval = 900

[darwinia_evm]
endpoint = "https://rpc.darwinia.network"
contract_address = "0xD2A37C4523542F2dFD7Cb792D2aeAd5c61C1bAAE"
execution_layer_contract_address = "0xeC3c9B4d3674B3D03fdf20b082A3C2c669075990"
inbound_address = "0xf1B8a9F8436800499DB8186f2da2fb3e78Ff7c2B"
outbound_address = "0xcA3749C8C3aF04278D596a3fBe461481B6aa1b01"
fee_market_address = "0xcA927Df15afb7629b79dA4713a871190315c7409"
chain_message_committer_address = "0xea7d0fE22AF25d9655f7AdDd6a59E37e84B3AB5F"
lane_message_committer_address = "0x56746a8099a7e6D962802A23e01FeDdc1282cDAe"
chain_message_committer_address = "0xea7d0fE22AF25d9655f7AdDd6a59E37e84B3AB5F"
contract_address = "0xD2A37C4523542F2dFD7Cb792D2aeAd5c61C1bAAE"
endpoint = "https://rpc.darwinia.network"
fee_market_address = "0xcA927Df15afb7629b79dA4713a871190315c7409"
inbound_address = "0xf1B8a9F8436800499DB8186f2da2fb3e78Ff7c2B"
lane_message_committer_address = "0x56746a8099a7e6D962802A23e01FeDdc1282cDAe"
outbound_address = "0xcA3749C8C3aF04278D596a3fBe461481B6aa1b01"
# private_key in format of 0x... or ...
private_key = "..."
private_key = "..."
# Max gas price bridger would use, if eth_gasPrice returns a bigger one. Unit is wei.
max_gas_price = 9000000000

[darwinia_substrate]
endpoint = "wss://darwinia-rpc.darwinia.network"
endpoint = "wss://rpc.darwinia.network"
# private_key in format of 0x... or BIP39 mnemonic code
private_key = "..."

[beacon]
# Beacon chain api endpoint and api supplier
endpoint = "http://unstable.mainnet.beacon-api.nimbus.team"
api_supplier = "Nimbus"
api_supplier = "Nimbus"
endpoint = "http://unstable.mainnet.beacon-api.nimbus.team"
# Bridger also support Lodestar api
# endpoint = "https://lodestar-mainnet-rpc.darwinia.network"
# api_supplier = "Lodestar"

[ethereum]
# Execution layer api endpoint, register one at https://dashboard.alchemy.com/
endpoint = "..."
inbound_address = "0x4E210866d089856a8A0435965FefEe19640487E5"
outbound_address = "0x169F28bfbfFCddFdc772A94Cf020bbB4CAdc8E01"
fee_market_address = "0xCD97185B7d05f8ea91d241C8dfD51a2Cc9c0547a"
endpoint = "..."
fee_market_address = "0xCD97185B7d05f8ea91d241C8dfD51a2Cc9c0547a"
inbound_address = "0x4E210866d089856a8A0435965FefEe19640487E5"
outbound_address = "0x169F28bfbfFCddFdc772A94Cf020bbB4CAdc8E01"
# private_key in format of 0x... or ...
private_key = "..."
posa_light_client_address = "0xf46349a32cA70C0B9fFbD19937Fb1623e7F3db19"
private_key = "..."
# Max gas price bridger would use, if eth_gasPrice returns a bigger one. Unit is wei.
max_gas_price = 9000000000
# Bridger use etherscan gas oracle to get more appropriate gas price.
# Register to get a free etherescan api key at https://docs.etherscan.io/api-endpoints/gas-tracker
etherscan_api_key = "api_key..."

[index]
evm_chain = { endpoint = "https://thegraph.darwinia.network/ethv2/subgraphs/name/bridge-darwinia" }
substrate_chain = { endpoint = "https://subql.darwinia.network/subql-bridger-darwinia/" }
evm_chain = { endpoint = "https://thegraph.darwinia.network/ethv2/subgraphs/name/bridge-darwinia" }
57 changes: 57 additions & 0 deletions .maintain/config/bridge-pangolin-goerli.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[general]
# Whether to relay beacon chain header to evm chain
enable_beacon_header_relay = true
# Whether to relay sync commit from beacon chain to evm chain
enable_sync_commit_relay = true
# Whether to sign the messages root and relay headers from evm chain to beacon chain
enable_ecdsa_relay = true
# Whether to relay messages from execution chain to evm chain
enable_message_execution_to_evm = true
# Whether to relay messages from evm chain to execution chain
enable_message_evm_to_execution = true
# Max number of messages every delivery
max_message_num_per_relaying = 15
# Minimum seconds between two header relay
header_relay_minimum_interval = 900

[pangolin_evm]
chain_message_committer_address = "0x0f82Dc70C65F62799E6436f41d605756f943140e"
contract_address = "0x9Ca2b190d84E635F131060319FACc943b0653680"
endpoint = "https://pangolin-rpc.darwinia.network"
fee_market_address = "0x4DBdC9767F03dd078B5a1FC05053Dd0C071Cc005"
inbound_address = "0xB59a893f5115c1Ca737E36365302550074C32023"
lane_message_committer_address = "0x59EA974B74ec6A49338438bCc5d0388E294E4E20"
outbound_address = "0xAbd165DE531d26c229F9E43747a8d683eAD54C6c"
# private_key in format of 0x... or ...
private_key = "..."
# Max gas price bridger would use, if eth_gasPrice returns a bigger one. Unit is wei.
max_gas_price = 24513218380275

[pangolin_substrate]
endpoint = "wss://pangolin-rpc.darwinia.network"
# private_key in format of 0x... or BIP39 mnemonic code
private_key = "//Alice"

[beacon]
endpoint = "https://lodestar-goerli.chainsafe.io"
# Beacon chain rpc supplier: Nimbus or Lodestar
api_supplier = "Nimbus"

[goerli]
endpoint = "https://eth-goerli.g.alchemy.com/v2/3Jsx6GWpt8x8g783OqtWoGSHxIsIji2O"
fee_market_address = "0x6c73B30a48Bb633DC353ed406384F73dcACcA5C3"
inbound_address = "0x0F6e081B1054c59559Cf162e82503F3f560cA4AF"
outbound_address = "0x9B5010d562dDF969fbb85bC72222919B699b5F54"
posa_light_client_address = "0x66aB6f080b37Df0a99687A0bBB65A798bC1067C1"
# private_key in format of 0x... or ...
private_key = "..."
# Max gas price bridger would use, if eth_gasPrice returns a bigger one. Unit is wei.
max_gas_price = 9000000000
# Bridger use etherscan gas oracle to get more appropriate gas price.
# Register to get a free etherescan api key at https://docs.etherscan.io/api-endpoints/gas-tracker
etherscan_api_key = "api_key..."


[index]
evm_chain = { endpoint = "https://thegraph.darwinia.network/ethv2/subgraphs/name/bridge-pangolin" }
substrate_chain = { endpoint = "https://subql.darwinia.network/subql-bridger-pangolin/" }
60 changes: 0 additions & 60 deletions .maintain/config/bridge-pangoro-goerli.toml

This file was deleted.

14 changes: 7 additions & 7 deletions assistants/bin-e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ support-toolkit = { path = "../../frame/supports/support-toolkit" }


[patch.crates-io]
eth2_hashing = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
eth2_serde_utils = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
eth2_ssz = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
eth2_ssz_derive = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
eth2_ssz_types = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
tree_hash = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
tree_hash_derive = { git = "https://github.com/sigp/lighthouse", branch = "stable" }
eth2_hashing = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
eth2_serde_utils = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
eth2_ssz = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
eth2_ssz_derive = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
eth2_ssz_types = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
tree_hash = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
tree_hash_derive = { git = "https://github.com/sigp/lighthouse", tag = "v3.5.1" }
2 changes: 0 additions & 2 deletions assistants/bin-e2e/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ impl<T: EcdsaClient> lifeline::Resource<BridgeBus> for BridgeConfig<T> {}
pub struct GeneralConfig {
pub enable_beacon_header_relay: bool,
pub enable_sync_commit_relay: bool,
pub enable_execution_header_layer: bool,
pub enable_ecdsa_relay: bool,
pub enable_message_execution_to_evm: bool,
pub enable_message_evm_to_execution: bool,
Expand Down Expand Up @@ -75,7 +74,6 @@ pub struct BeaconApiConfig {
pub struct EVMChainConfig {
pub endpoint: String,
pub contract_address: String,
pub execution_layer_contract_address: String,
#[serde(deserialize_with = "evm_secret_key_from_str")]
pub private_key: String,
pub inbound_address: String,
Expand Down
8 changes: 4 additions & 4 deletions assistants/bin-e2e/src/service/ecdsa_relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<T: EcdsaClient> Service for ECDSARelayService<T> {
Tracker::new(microkv.clone(), "scan.darwinia.collecting-authorities");
let tracker_collected_authorities =
Tracker::new(microkv, "scan.darwinia.collected-authorities");
let ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let mut ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let _greet_collecting_message =
Self::try_task("substrate-to-eth-ecdsa-collecting-message", async move {
ecdsa_source
Expand All @@ -52,7 +52,7 @@ impl<T: EcdsaClient> Service for ECDSARelayService<T> {
.await;
Ok(())
});
let ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let mut ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let _greet_collected_message =
Self::try_task("substrate-to-eth-ecdsa-collected-message", async move {
ecdsa_source
Expand All @@ -63,7 +63,7 @@ impl<T: EcdsaClient> Service for ECDSARelayService<T> {
.await;
Ok(())
});
let ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let mut ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let _greet_collecting_authorities = Self::try_task(
"substrate-to-eth-ecdsa-collecting-authorities",
async move {
Expand All @@ -76,7 +76,7 @@ impl<T: EcdsaClient> Service for ECDSARelayService<T> {
Ok(())
},
);
let ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let mut ecdsa_source = Self::get_ecdsa_source(bridge_config.clone())?;
let _greet_collected_authorities =
Self::try_task("substrate-to-eth-ecdsa-collected-authorities", async move {
ecdsa_source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl<T: EcdsaClient> EthereumToDarwiniaHeaderRelayService<T> {
let darwinia_client = EthLightClient::new(
&config.darwinia_evm.endpoint,
Address::from_str(&config.darwinia_evm.contract_address)?,
Address::from_str(&config.darwinia_evm.execution_layer_contract_address)?,
&config.darwinia_evm.private_key,
U256::from_dec_str(&config.darwinia_evm.max_gas_price)?,
)?;
Expand Down
Loading