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

Commit

Permalink
Refactor bridger (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa authored Jul 23, 2021
1 parent fd1c67b commit 82d0d95
Show file tree
Hide file tree
Showing 315 changed files with 17,560 additions and 19,604 deletions.
26 changes: 10 additions & 16 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
charset=utf-8
end_of_line=lf
indent_size=tab
indent_style=tab
insert_final_newline=true
max_line_length=100
tab_width=4
trim_trailing_whitespace=true

[*.{sh,yml,yaml}]
indent_size=2
indent_style=space

[*.md]
indent_size=4
indent_style=space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-03-01
toolchain: nightly-2021-04-15
override: true
target: wasm32-unknown-unknown

Expand Down
77 changes: 0 additions & 77 deletions .maintain/config/mainnet.sample.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .maintain/config/ropsten_crab.sample.yml

This file was deleted.

85 changes: 0 additions & 85 deletions .maintain/config/ropsten_pangolin.sample.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .maintain/config/task-darwinia-ethereum.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[darwinia]
# a offchain-indexing opening darwinia node
endpoint = "ws://127.0.0.1:9944"

# private key of relayer, or, private key of proxy
relayer_private_key = "0x..."
# (optional) real account public key
relayer_real_account = "0x..."

# private key to sign ecdsa messages
ecdsa_authority_private_key = "0x..."

strict = false

[web3]
endpoint = "https://mainnet.infura.io/v3/<YOUR_KEY>"

[ethereum]
endpoint = [ "https://mainnet.infura.io/v3/<YOUR_KEY>" ]

# below two need to be all setted if you want to do the relay job
# (optional) the person who will relay darwinia data to ethereum
relayer_private_key = "0x..."
# (optional) the darwinia account public key who will get the reward
relayer_beneficiary_darwinia_account = "0x..."

# useless for now
subscribe_ring_address = "0x9469d013805bffb7d3debe5e7839237e535ec483"
subscribe_kton_address = "0x9f284e1337a815fe77d2ff4ae46544645b20c5ff"

# listen to gringotts bank cross-chain transfer
subscribe_bank_address = "0x649fdf6ee483a96e020b889571e93700fbd82d88"
subscribe_bank_topics = ["0xe77bf2fa8a25e63c1e5e29e1b2fcb6586d673931e020c4e3ffede453b830fb12"]

# listen to ring/kton cross-chain transfer
subscribe_issuing_address = "0xea7938985898af7fd945b03b7bc2e405e744e913"
subscribe_issuing_topics = ["0xc9dcda609937876978d7e0aa29857cb187aea06ad9e843fd23fd32108da73f10"]

# listen to set authorities
subscribe_relay_address = "0x5cde5Aafeb8E06Ce9e4F94c2406d3B6CB7098E49"
subscribe_relay_topics = ["0x91d6d149c7e5354d1c671fe15a5a3332c47a38e15e8ac0339b24af3c1090690f"]

atom = 0

[shadow]
endpoint = "https://shadow.darwinia.network"

[service]
interval_ethereum = 120
interval_relay = 60
interval_redeem = 90
interval_guard = 30

[http_client]
timeout = 3000
14 changes: 14 additions & 0 deletions .maintain/config/task-pangolin-millau.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[pangolin]
endpoint = "ws://127.0.0.1:23044"
signer = "//Alice"

[millau]
endpoint = "ws://127.0.0.1:13044"
signer = "//Alice"

[relay]
lanes = [ "00000000" ]
auto_start = false
signer_pangolin = "//Alice"
signer_millau = "//Millau"
prometheus_params = { no_prometheus = false, prometheus_host = "127.0.0.1", prometheus_port = 9616 }
11 changes: 0 additions & 11 deletions .maintain/systemd/bridger.service.sample

This file was deleted.

25 changes: 25 additions & 0 deletions .maintain/vercel/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
#
#

set -xe

BIN_PATH=$(dirname $(readlink -f $0))
WORK_PATH=${BIN_PATH}/../

cd ${WORK_PATH}

yum -y update && yum -y upgrade && yum -y install \
git make \
clang gcc gcc-c++ llvm

RUST_TOOLCHAIN=nightly-2021-04-15

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --profile minimal --default-toolchain ${RUST_TOOLCHAIN}

source ~/.cargo/env

rustup target add wasm32-unknown-unknown

cargo doc --all --no-deps --release
Loading

0 comments on commit 82d0d95

Please sign in to comment.