From dc0cb2ac0560d65ade8c0fbafa279e33a4cd9d7d Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Tue, 14 Mar 2023 14:55:37 +0200 Subject: [PATCH 01/27] Add an Example and simple config file --- config/example/config.toml | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 config/example/config.toml diff --git a/config/example/config.toml b/config/example/config.toml new file mode 100644 index 000000000..4f4cfacf4 --- /dev/null +++ b/config/example/config.toml @@ -0,0 +1,79 @@ +# The port that the Relayer API service will listen on +# +# default: 9955 +# env: WEBB_PORT +port = 9955 + +# Controls what features are enabled in the relayer system +[features] +# Enables the Governance Relayer Feature +# default: false +# env: WEBB_FEATURES_GOVERNANCE_RELAY +# See: https://docs.webb.tools/docs/relayer/overview/#data-proposing-and-signature-relaying +governance-relay = false +# Enables the Data Query Feature (Oracle) +# default: false +# env: WEBB_FEATURES_DATA_QUERY +# See: https://docs.webb.tools/docs/relayer/overview/#data-querying +data-query = true +# Enables the Private Transaction Relayer Feature +# default: false +# env: WEBB_FEATURES_PRIVATE_TX_RELAY +# See: https://docs.webb.tools/docs/relayer/overview/#private-transaction-relaying +private-tx-relay = true + +## The Next Section is where we define the networks and the contracts that the relayer will be interacting with. + +# The following block defines an EVM network (in this case, Goerli) that the relayer will connect to. +[evm.goerli] +name = "goerli" +# Http(s) Endpoint for quick Req/Res +# env: WEBB_EVM_GOERLI_HTTP_ENDPOINT +http-endpoint = "https://rpc.ankr.com/eth_goerli" +# Websocket Endpoint for long living connections +# env: WEBB_EVM_GOERLI_WS_ENDPOINT +ws-endpoint = "wss://rpc.ankr.com/eth_goerli" +# chain specific id from evm opcode +# env: WEBB_EVM_GOERLI_CHAIN_ID +chain-id = 5 +# Value to indicate that the relayer should enable services for this chain +# default: true +# env: WEBB_EVM_GOERLI_ENABLED +enabled = true +# The number of block confirmations that the relayer should wait before processing a block +# default: 0 +# env: WEBB_EVM_GOERLI_BLOCK_CONFIRMATIONS +block-confirmations = 2 +# The Private Key of this account on this network +# the format is more dynamic here: +# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded +# private key. +# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 +# +# 2. if it starts with '$' then it would be considered as an Enviroment variable +# of a hex-encoded private key. +# Example: $GOERLI_PRIVATE_KEY +# +# 3. if it doesn't contains special characters and has 12 or 24 words in it +# then we should process it as a mnemonic string: 'word two three four ...' +# +# env: WEBB_EVM_GOERLI_PRIVATE_KEY +# Note: This value is optional if you are using the relayer as a data-query service only. +private-key = "$PRIVATE_KEY" + +# Block which represents the configuration for a supported contract on the network +[[evm.goerli.contracts]] +# The contract can be one of these values +# - VAnchor (Variable Anchor) +# - SignatureBridge +contract = "VAnchor" +# The address of the contract +address = "0x9678647b9fcb0039652a16dba688bd067d6e5077" +# The deployed block number of the contract. When a relayer does not have information for +# this contract in its store, it will start to sync and query for relevant historical data +# starting at this block number +deployed-at = 8648487 +# Configuration for the events watcher of this contract. The events-watcher can be switched on/off +# and the polling interval specifies the period of time (in ms) that the events-watcher thread +# will wait before issuing another query for new events. +events-watcher = { enabled = true, polling-interval = 15000 } From e733c0aacd3d79af4c8d09367dc5a6bfb36462c2 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Tue, 14 Mar 2023 14:57:10 +0200 Subject: [PATCH 02/27] Add env file example --- config/example/.env.example | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 config/example/.env.example diff --git a/config/example/.env.example b/config/example/.env.example new file mode 100644 index 000000000..bf63d6bd3 --- /dev/null +++ b/config/example/.env.example @@ -0,0 +1,2 @@ +# Private Key that will be used cross different chains +PRIVATE_KEY="0xYOUR_PRIVATE_KEY" From dc97fafc96cae62f3fc5faf37276ae8215ab9415 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Tue, 14 Mar 2023 18:22:41 +0200 Subject: [PATCH 03/27] Start working on config index --- config/README.md | 144 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 config/README.md diff --git a/config/README.md b/config/README.md new file mode 100644 index 000000000..9428c3025 --- /dev/null +++ b/config/README.md @@ -0,0 +1,144 @@ +## Relayer Configration files + +This directory contains the example configuration files for the relayer. The relayer is configured using a set of TOML file(s) which can +be thought of as a set of blueprints for the relayer. In the following section we will describe the different configuration entries and +how to use them. + +### Index + +- [Global Configuration](#global-configuration) + - [port](#global-configuration-port) + - [features](#global-configuration-features) + - [governance-relay](#global-configuration-features-governance-relay) + - [data-query](#global-configuration-features-data-query) + - [private-tx-relay](#global-configuration-features-private-tx-relay) +- [EVM Chain Configuration](#evm-chain-configuration) + - [name](#evm-chain-configuration-name) + - [chain-id](#evm-chain-configuration-chain-id) + - [http-endpoint](#evm-chain-configuration-http-endpoint) + - [ws-endpoint](#evm-chain-configuration-ws-endpoint) + - [private-key](#evm-chain-configuration-private-key) + - [block-confirmations](#evm-chain-configuration-block-confirmations) + - [enabled](#evm-chain-configuration-enabled) + - [explorer](#evm-chain-configuration-explorer) + - [beneficiary](#evm-chain-configuration-beneficiary) + - [tx-queue](#evm-chain-configuration-tx-queue) + - [contracts](#evm-chain-configuration-contracts) + - [contract](#evm-chain-configuration-contracts-contract) + - [address](#evm-chain-configuration-contracts-address) + - [deployed-at](#evm-chain-configuration-contracts-deployed-at) + - [events-watcher](#evm-chain-configuration-contracts-events-watcher) + - [enabled](#evm-chain-configuration-contracts-events-watcher-enabled) + - [enabled-data-query](#evm-chain-configuration-contracts-events-watcher-enabled-data-query) + - [polling-interval](#evm-chain-configuration-contracts-events-watcher-polling-interval) + - [max-blocks-per-step](#evm-chain-configuration-contracts-events-watcher-max-blocks-per-step) + - [sync-blocks-from](#evm-chain-configuration-contracts-events-watcher-sync-blocks-from) + - [print-progress-interval](#evm-chain-configuration-contracts-events-watcher-print-progress-interval) + - [proposal-signing-backend](#evm-chain-configuration-contracts-proposal-signing-backend) + - [type](#evm-chain-configuration-contracts-proposal-signing-backend-type) + - [node](#evm-chain-configuration-contracts-proposal-signing-backend-node) + - [private-key](#evm-chain-configuration-contracts-proposal-signing-backend-private-key) + - [linked-anchors](#evm-chain-configuration-contracts-linked-anchors) + - [type](#evm-chain-configuration-contracts-linked-anchors-type) + - [resource-id](#evm-chain-configuration-contracts-linked-anchors-resource-id) + - [chain-id](#evm-chain-configuration-contracts-linked-anchors-chain-id) + - [address](#evm-chain-configuration-contracts-linked-anchors-address) + - [pallet](#evm-chain-configuration-contracts-linked-anchors-pallet) + - [tree-id](#evm-chain-configuration-contracts-linked-anchors-tree-id) + +### Global Configuration + +The global configuration file is used to configure the relayer. It is usually located at a file called `main.toml` in the `config` directory. + +#### Global Configuration: port + +The port on which the relayer will listen for incoming connections. + +- Type: `number` +- Required: `false` +- Default: `9955` +- env: `WEBB_PORT` +- Example: + +```toml +port = 9955 +``` + +#### Global Configuration: features + +The features section is used to enable or disable the relayer features. + +- Type: `table` +- Required: `false` +- Default: `{ governance-relay = true, data-query = true, private-tx-relay = true }` +- env: `WEBB_FEATURES_GOVERNANCE_RELAY`, `WEBB_FEATURES_DATA_QUERY`, `WEBB_FEATURES_PRIVATE_TX_RELAY` +- Example: + +```toml +[features] +governance-relay = true +data-query = true +private-tx-relay = true +``` + +##### Global Configuration: features: governance-relay + +Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to relay proposals and votes on them +between the chains. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_FEATURES_GOVERNANCE_RELAY` +- Example: + +```toml +[features] +governance-relay = true +``` + +##### Global Configuration: features: data-query + +Enable or disable the data-query feature. Enabling this feature will allow the relayer to work as a data query oracle. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_FEATURES_DATA_QUERY` +- Example: + +```toml +[features] +data-query = true +``` + +##### Global Configuration: features: private-tx-relay + +Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to relay private transactions, to preserve the privacy of the transactions. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_FEATURES_PRIVATE_TX_RELAY` +- Example: + +```toml +[features] +private-tx-relay = true +``` + +### EVM Chain Configuration + +The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. + +#### EVM Chain Configuration: name + +The name of the chain. This name will be used to identify the chain in the relayer. + +- Type: `string` +- Required: `true` +- Example: + +```toml +name = "ethereum" +``` From 7f3af4053795d32d0118a0a63492e9d38fdf1650 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 13:54:50 +0200 Subject: [PATCH 04/27] fix naming and links --- config/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/README.md b/config/README.md index 9428c3025..931da5feb 100644 --- a/config/README.md +++ b/config/README.md @@ -50,7 +50,7 @@ how to use them. The global configuration file is used to configure the relayer. It is usually located at a file called `main.toml` in the `config` directory. -#### Global Configuration: port +#### [port](#global-configuration-port) The port on which the relayer will listen for incoming connections. @@ -64,7 +64,7 @@ The port on which the relayer will listen for incoming connections. port = 9955 ``` -#### Global Configuration: features +#### [features](#global-configuration-features) The features section is used to enable or disable the relayer features. @@ -81,7 +81,7 @@ data-query = true private-tx-relay = true ``` -##### Global Configuration: features: governance-relay +##### [governance-relay](#global-configuration-features-governance-relay) Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to relay proposals and votes on them between the chains. @@ -97,7 +97,7 @@ between the chains. governance-relay = true ``` -##### Global Configuration: features: data-query +##### [data-query](#global-configuration-features-data-query) Enable or disable the data-query feature. Enabling this feature will allow the relayer to work as a data query oracle. @@ -112,7 +112,7 @@ Enable or disable the data-query feature. Enabling this feature will allow the r data-query = true ``` -##### Global Configuration: features: private-tx-relay +##### [private-tx-relay](#global-configuration-features-private-tx-relay) Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to relay private transactions, to preserve the privacy of the transactions. @@ -131,7 +131,7 @@ private-tx-relay = true The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. -#### EVM Chain Configuration: name +#### [name](#evm-chain-configuration-name) The name of the chain. This name will be used to identify the chain in the relayer. From 64d164640f87c096e7a8d5292c9174bcf839dc74 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 14:09:31 +0200 Subject: [PATCH 05/27] fix naming and links --- config/README.md | 86 ++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/config/README.md b/config/README.md index 931da5feb..e8ad469fb 100644 --- a/config/README.md +++ b/config/README.md @@ -7,50 +7,50 @@ how to use them. ### Index - [Global Configuration](#global-configuration) - - [port](#global-configuration-port) - - [features](#global-configuration-features) - - [governance-relay](#global-configuration-features-governance-relay) - - [data-query](#global-configuration-features-data-query) - - [private-tx-relay](#global-configuration-features-private-tx-relay) + - [port](#port) + - [features](#features) + - [governance-relay](#governance-relay) + - [data-query](#data-query) + - [private-tx-relay](#private-tx-relay) - [EVM Chain Configuration](#evm-chain-configuration) - - [name](#evm-chain-configuration-name) - - [chain-id](#evm-chain-configuration-chain-id) - - [http-endpoint](#evm-chain-configuration-http-endpoint) - - [ws-endpoint](#evm-chain-configuration-ws-endpoint) - - [private-key](#evm-chain-configuration-private-key) - - [block-confirmations](#evm-chain-configuration-block-confirmations) - - [enabled](#evm-chain-configuration-enabled) - - [explorer](#evm-chain-configuration-explorer) - - [beneficiary](#evm-chain-configuration-beneficiary) - - [tx-queue](#evm-chain-configuration-tx-queue) - - [contracts](#evm-chain-configuration-contracts) - - [contract](#evm-chain-configuration-contracts-contract) - - [address](#evm-chain-configuration-contracts-address) - - [deployed-at](#evm-chain-configuration-contracts-deployed-at) - - [events-watcher](#evm-chain-configuration-contracts-events-watcher) - - [enabled](#evm-chain-configuration-contracts-events-watcher-enabled) - - [enabled-data-query](#evm-chain-configuration-contracts-events-watcher-enabled-data-query) - - [polling-interval](#evm-chain-configuration-contracts-events-watcher-polling-interval) - - [max-blocks-per-step](#evm-chain-configuration-contracts-events-watcher-max-blocks-per-step) - - [sync-blocks-from](#evm-chain-configuration-contracts-events-watcher-sync-blocks-from) - - [print-progress-interval](#evm-chain-configuration-contracts-events-watcher-print-progress-interval) - - [proposal-signing-backend](#evm-chain-configuration-contracts-proposal-signing-backend) - - [type](#evm-chain-configuration-contracts-proposal-signing-backend-type) - - [node](#evm-chain-configuration-contracts-proposal-signing-backend-node) - - [private-key](#evm-chain-configuration-contracts-proposal-signing-backend-private-key) - - [linked-anchors](#evm-chain-configuration-contracts-linked-anchors) - - [type](#evm-chain-configuration-contracts-linked-anchors-type) - - [resource-id](#evm-chain-configuration-contracts-linked-anchors-resource-id) - - [chain-id](#evm-chain-configuration-contracts-linked-anchors-chain-id) - - [address](#evm-chain-configuration-contracts-linked-anchors-address) - - [pallet](#evm-chain-configuration-contracts-linked-anchors-pallet) - - [tree-id](#evm-chain-configuration-contracts-linked-anchors-tree-id) + - [name](#name) + - [chain-id](#chain-id) + - [http-endpoint](#http-endpoint) + - [ws-endpoint](#ws-endpoint) + - [private-key](#private-key) + - [block-confirmations](#block-confirmations) + - [enabled](#enabled) + - [explorer](#explorer) + - [beneficiary](#beneficiary) + - [tx-queue](#tx-queue) + - [contracts](#contracts) + - [contract](#contract) + - [address](#address) + - [deployed-at](#deployed-at) + - [events-watcher](#events-watcher) + - [enabled](#enabled-1) + - [enable-data-query](#enable-data-query) + - [polling-interval](#polling-interval) + - [max-blocks-per-step](#max-blocks-per-step) + - [sync-blocks-from](#sync-blocks-from) + - [print-progress-interval](#print-progress-interval) + - [proposal-signing-backend](#proposal-signing-backend) + - [type](#type) + - [node](#node) + - [private-key](#private-key-1) + - [linked-anchors](#linked-anchors) + - [type](#type-1) + - [resource-id](#resource-id) + - [chain-id](#chain-id-1) + - [address](#address-1) + - [pallet](#pallet) + - [tree-id](#tree-id) ### Global Configuration The global configuration file is used to configure the relayer. It is usually located at a file called `main.toml` in the `config` directory. -#### [port](#global-configuration-port) +#### port The port on which the relayer will listen for incoming connections. @@ -64,7 +64,7 @@ The port on which the relayer will listen for incoming connections. port = 9955 ``` -#### [features](#global-configuration-features) +#### features The features section is used to enable or disable the relayer features. @@ -81,7 +81,7 @@ data-query = true private-tx-relay = true ``` -##### [governance-relay](#global-configuration-features-governance-relay) +##### governance-relay Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to relay proposals and votes on them between the chains. @@ -97,7 +97,7 @@ between the chains. governance-relay = true ``` -##### [data-query](#global-configuration-features-data-query) +##### data-query Enable or disable the data-query feature. Enabling this feature will allow the relayer to work as a data query oracle. @@ -112,7 +112,7 @@ Enable or disable the data-query feature. Enabling this feature will allow the r data-query = true ``` -##### [private-tx-relay](#global-configuration-features-private-tx-relay) +##### private-tx-relay Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to relay private transactions, to preserve the privacy of the transactions. @@ -131,7 +131,7 @@ private-tx-relay = true The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. -#### [name](#evm-chain-configuration-name) +#### name The name of the chain. This name will be used to identify the chain in the relayer. From 45bcf990787290a9d611479f6eb08094d7812261 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 14:37:35 +0200 Subject: [PATCH 06/27] add common configrations for evm based chains --- config/README.md | 162 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) diff --git a/config/README.md b/config/README.md index e8ad469fb..122ec7998 100644 --- a/config/README.md +++ b/config/README.md @@ -23,6 +23,7 @@ how to use them. - [explorer](#explorer) - [beneficiary](#beneficiary) - [tx-queue](#tx-queue) + - [max-sleep-interval](#max-sleep-interval) - [contracts](#contracts) - [contract](#contract) - [address](#address) @@ -131,14 +132,175 @@ private-tx-relay = true The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. +The value of this configration is a table, and the name of the table is the name of the chain, for example: + +```toml +[evm.ethereum] +chain-id = 1 +name = "ethereum" +# ... +``` + +So, in general it is `[evm.]`, where `` is the name of the chain. The following sections describe the different configuration entries and how to use them. + #### name The name of the chain. This name will be used to identify the chain in the relayer. - Type: `string` - Required: `true` +- env: `WEBB_EVM__NAME` - Example: ```toml name = "ethereum" ``` + +#### chain-id + +The chain id of the chain. This id will be used to identify the chain in the relayer. + +- Type: `number` +- Required: `true` +- env: `WEBB_EVM__CHAIN_ID` +- Example: + +```toml +chain-id = 1 +``` + +#### http-endpoint + +The HTTP(s) RPC endpoint for this chain, used for watching events, and sending transactions. + +- Type: `string` +- Required: `true` +- env: `WEBB_EVM__HTTP_ENDPOINT` +- Example: + +```toml +http-endpoint = "https://mainnet.infura.io/v3/" +``` + +#### ws-endpoint + +The WebSocket RPC endpoint for this chain, used for watching events, and sending transactions. + +- Type: `string` +- Required: `true` +- env: `WEBB_EVM__WS_ENDPOINT` +- Example: + +```toml +ws-endpoint = "wss://mainnet.infura.io/ws/v3/" +``` + +#### private-key + +The Private Key of this account on this network, used for signing transactions. +the format is more dynamic here: + +1.if it starts with '0x' then this would be raw (64 bytes) hex encoded private key. +Example: `0x8917174396171783496173419137618235192359106130478137647163400318` + +2.if it starts with '$' then it would be considered as an Enviroment variable of a hex-encoded private key. + Example: `$MAINNET_PRIVATE_KEY` + +3.if it starts with '> ' then it would be considered as a command that the relayer would execute +and the output of this command would be the hex encoded private key. +Example: `> ./getKey.sh mainnet-privatekey` + +4.if it doesn't contains special characters and has 12 or 24 words in it +then we should process it as a mnemonic string: 'word two three four ...' + +- Type: `string` +- Required: + - `true` if `features.governance-relay` is `true` + - `true` if `features.private-tx-relay` is `true` + - `false` otherwise +- env: `WEBB_EVM__PRIVATE_KEY` +- Example: + +```toml +private-key = "0x8917174396171783496173419137618235192359106130478137647163400318" +``` + +> **Warning** +> The private key should be kept secret, and should not be hard-coded in the configuration file. Instead, it should be loaded from an environment variable, or a file. + +#### block-confirmations + +The number of block confirmations to wait before processing an event. + +- Type: `number` +- Required: `false` +- Default: `0` +- env: `WEBB_EVM__BLOCK_CONFIRMATIONS` +- Example: + +```toml +block-confirmations = 5 +``` + +#### enabled + +Enable or disable this chain. If this is set to `false`, then the relayer will not consider this chain while loading the configuration files. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_EVM__ENABLED` +- Example: + +```toml +enabled = true +``` + +#### explorer + +The block explorer URL for this chain. This is used to generate links to the transactions, useful for debugging. + +- Type: `string` +- Required: `false` +- Default: `null` +- env: `WEBB_EVM__EXPLORER` +- Example: + +```toml +explorer = "https://etherscan.io" +``` + +#### beneficiary + +The address of the beneficiary account on this chain. This is used to receive the fees from relaying transactions. +It is optional, and if not provided, the relayer will use the account address of the proivided [private-key](#private-key) for this chain. + +- Type: `string` +- Required: `false` +- Default: `null` +- env: `WEBB_EVM__BENEFICIARY` +- Example: + +```toml +beneficiary = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" +``` + +#### Tx Queue + +The tx queue is used to store the transactions that are waiting to be sent to the chain. The relayer uses a database to store the transactions, and the configuration for the database is stored in the `tx-queue` section of the configuration file. + +##### max-sleep-interval + +The maximum time to sleep between sending transactions. This to control the rate at which the relayer sends transactions to the chain. + +- Type: `number` +- Required: `false` +- Default: `10000ms` +- env: `WEBB_EVM__TX_QUEUE_MAX_SLEEP_INTERVAL` +- Example: + +```toml +tx-queue = { max-sleep-interval = 5000 } +``` + +#### Contracts From 179f24bd3b24c5f17a930adebbf123e4ab88d1af Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 15:47:16 +0200 Subject: [PATCH 07/27] finish up the evm config section --- config/README.md | 475 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 445 insertions(+), 30 deletions(-) diff --git a/config/README.md b/config/README.md index 122ec7998..970717a9f 100644 --- a/config/README.md +++ b/config/README.md @@ -1,8 +1,8 @@ ## Relayer Configration files -This directory contains the example configuration files for the relayer. The relayer is configured using a set of TOML file(s) which can -be thought of as a set of blueprints for the relayer. In the following section we will describe the different configuration entries and -how to use them. +This directory contains the example configuration files for the relayer. The relayer is configured +using a set of TOML file(s) which can be thought of as a set of blueprints for the relayer. In the +following section we will describe the different configuration entries and how to use them. ### Index @@ -49,7 +49,8 @@ how to use them. ### Global Configuration -The global configuration file is used to configure the relayer. It is usually located at a file called `main.toml` in the `config` directory. +The global configuration file is used to configure the relayer. It is usually located at a file +called `main.toml` in the `config` directory. #### port @@ -72,7 +73,8 @@ The features section is used to enable or disable the relayer features. - Type: `table` - Required: `false` - Default: `{ governance-relay = true, data-query = true, private-tx-relay = true }` -- env: `WEBB_FEATURES_GOVERNANCE_RELAY`, `WEBB_FEATURES_DATA_QUERY`, `WEBB_FEATURES_PRIVATE_TX_RELAY` +- env: `WEBB_FEATURES_GOVERNANCE_RELAY`, `WEBB_FEATURES_DATA_QUERY`, + `WEBB_FEATURES_PRIVATE_TX_RELAY` - Example: ```toml @@ -84,8 +86,8 @@ private-tx-relay = true ##### governance-relay -Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to relay proposals and votes on them -between the chains. +Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to +relay proposals and votes on them between the chains. - Type: `bool` - Required: `false` @@ -100,7 +102,8 @@ governance-relay = true ##### data-query -Enable or disable the data-query feature. Enabling this feature will allow the relayer to work as a data query oracle. +Enable or disable the data-query feature. Enabling this feature will allow the relayer to work as a +data query oracle. - Type: `bool` - Required: `false` @@ -115,7 +118,8 @@ data-query = true ##### private-tx-relay -Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to relay private transactions, to preserve the privacy of the transactions. +Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to +relay private transactions, to preserve the privacy of the transactions. - Type: `bool` - Required: `false` @@ -130,9 +134,11 @@ private-tx-relay = true ### EVM Chain Configuration -The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. +The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. +It is usually located at a file called `evm/.toml` in the `config` directory. -The value of this configration is a table, and the name of the table is the name of the chain, for example: +The value of this configration is a table, and the name of the table is the name of the chain, for +example: ```toml [evm.ethereum] @@ -141,7 +147,8 @@ name = "ethereum" # ... ``` -So, in general it is `[evm.]`, where `` is the name of the chain. The following sections describe the different configuration entries and how to use them. +So, in general it is `[evm.]`, where `` is the name of the chain. The +following sections describe the different configuration entries and how to use them. #### name @@ -197,21 +204,22 @@ ws-endpoint = "wss://mainnet.infura.io/ws/v3/" #### private-key -The Private Key of this account on this network, used for signing transactions. -the format is more dynamic here: +The Private Key of this account on this network, used for signing transactions. the format is more +dynamic here: -1.if it starts with '0x' then this would be raw (64 bytes) hex encoded private key. -Example: `0x8917174396171783496173419137618235192359106130478137647163400318` +1.if it starts with '0x' then this would be raw (64 bytes) hex encoded private key. Example: +`0x8917174396171783496173419137618235192359106130478137647163400318` -2.if it starts with '$' then it would be considered as an Enviroment variable of a hex-encoded private key. +2.if it starts with +'$' then it would be considered as an Enviroment variable of a hex-encoded private key. Example: `$MAINNET_PRIVATE_KEY` -3.if it starts with '> ' then it would be considered as a command that the relayer would execute -and the output of this command would be the hex encoded private key. -Example: `> ./getKey.sh mainnet-privatekey` +3.if it starts with '> ' then it would be considered as a command that the relayer would execute and +the output of this command would be the hex encoded private key. Example: +`> ./getKey.sh mainnet-privatekey` -4.if it doesn't contains special characters and has 12 or 24 words in it -then we should process it as a mnemonic string: 'word two three four ...' +4.if it doesn't contains special characters and has 12 or 24 words in it then we should process it +as a mnemonic string: 'word two three four ...' - Type: `string` - Required: @@ -225,8 +233,8 @@ then we should process it as a mnemonic string: 'word two three four ...' private-key = "0x8917174396171783496173419137618235192359106130478137647163400318" ``` -> **Warning** -> The private key should be kept secret, and should not be hard-coded in the configuration file. Instead, it should be loaded from an environment variable, or a file. +> **Warning** The private key should be kept secret, and should not be hard-coded in the +> configuration file. Instead, it should be loaded from an environment variable, or a file. #### block-confirmations @@ -244,7 +252,8 @@ block-confirmations = 5 #### enabled -Enable or disable this chain. If this is set to `false`, then the relayer will not consider this chain while loading the configuration files. +Enable or disable this chain. If this is set to `false`, then the relayer will not consider this +chain while loading the configuration files. - Type: `bool` - Required: `false` @@ -258,7 +267,8 @@ enabled = true #### explorer -The block explorer URL for this chain. This is used to generate links to the transactions, useful for debugging. +The block explorer URL for this chain. This is used to generate links to the transactions, useful +for debugging. - Type: `string` - Required: `false` @@ -272,8 +282,9 @@ explorer = "https://etherscan.io" #### beneficiary -The address of the beneficiary account on this chain. This is used to receive the fees from relaying transactions. -It is optional, and if not provided, the relayer will use the account address of the proivided [private-key](#private-key) for this chain. +The address of the beneficiary account on this chain. This is used to receive the fees from relaying +transactions. It is optional, and if not provided, the relayer will use the account address of the +proivided [private-key](#private-key) for this chain. - Type: `string` - Required: `false` @@ -287,11 +298,14 @@ beneficiary = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" #### Tx Queue -The tx queue is used to store the transactions that are waiting to be sent to the chain. The relayer uses a database to store the transactions, and the configuration for the database is stored in the `tx-queue` section of the configuration file. +The tx queue is used to store the transactions that are waiting to be sent to the chain. The relayer +uses a database to store the transactions, and the configuration for the database is stored in the +`tx-queue` section of the configuration file. ##### max-sleep-interval -The maximum time to sleep between sending transactions. This to control the rate at which the relayer sends transactions to the chain. +The maximum time to sleep between sending transactions. This to control the rate at which the +relayer sends transactions to the chain. - Type: `number` - Required: `false` @@ -304,3 +318,404 @@ tx-queue = { max-sleep-interval = 5000 } ``` #### Contracts + +The contracts section is used to configure the contracts that the relayer will use to interact with +the chain. The contracts are identified by their address and type, and the configuration for each +contract is stored in a list, each has a different type and address. + +Here is an example of the configuration for the contracts: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" +deployed-at = 3123412 +# ... + +[[evm.ethereum.contracts]] +type = "SignatureBridge" +address = "0xd8dA6BF26964aF9D7eEd9e03E03517D3faA9d045" +deployed-at = 3123413 +# ... +``` + +##### type + +The type of the contract. This is used to identify the contract, and the relayer will use this to +determine which contract to use for a specific operation. Each contract type has its own +configuration, and different internally service that will handle the contract operations. + +- Type: `enum` +- Possible values: + - `VAnchor` + - `OpenVAnchor` + - `SignatureBridge` +- Required: `true` +- env: `WEBB_EVM__CONTRACTS__TYPE` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +``` + +##### address + +The address of the contract on the configured chain. + +- Type: `string` +- Required: `true` +- env: `WEBB_EVM__CONTRACTS__ADDRESS` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" +``` + +##### deployed-at + +The block number at which the contract was deployed. This is used to determine the block number to +start scanning for events from. + +- Type: `number` +- Required: `true` +- env: `WEBB_EVM__CONTRACTS__DEPLOYED_AT` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +deployed-at = 3123412 +``` + +##### Events Watcher + +The events watcher is used to watch for events emitted by the contracts. The relayer uses this +configration values to determine how the relayer will poll the events from that contract. + +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { enabled = true, poll-interval = 12000 } +``` + +###### enabled + +Enable or disable the events watcher for this contract. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_ENABLED` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { enabled = true } +``` + +###### enable-data-query + +Enable or disable the data query for this contract. This is used to query the contract's events, +like the leaves for example. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_ENABLE_DATA_QUERY` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { enable-data-query = true } +``` + +###### poll-interval + +The interval at which the relayer will poll for events from the contract. + +- Type: `number` +- Required: `false` +- Default: `7000ms` +- env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_POLL_INTERVAL` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { poll-interval = 12000 } +``` + +##### max-blocks-per-step + +The maximum number of blocks to scan for events in a single step. This is used to control the rate +at which the relayer scans for events from that contract. which also controls the speed at which the +relayer will sync the chain. + +- Type: `number` +- Required: `false` +- Default: `100` +- env: `WEBB_EVM__CONTRACTS__MAX_BLOCKS_PER_STEP` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { max-blocks-per-step = 500 } +``` + +##### sync-blocks-from + +The block number to start scanning for events from. This similar to the [deployed-at](#deployed-at) +configuration value, but this is used to override the value of the [deployed-at](#deployed-at) +configuration value However, this is only used when the relayer is syncing the chain for the first +time, and the relayer will use the [deployed-at](#deployed-at) configuration value as the default +value here. + +- Type: `number` +- Required: `false` +- Default: `null` (_will use the value of the [deployed-at](#deployed-at) configuration value_) +- env: `WEBB_EVM__CONTRACTS__SYNC_BLOCKS_FROM` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { sync-blocks-from = 3123412 } +``` + +##### print-progress-interval + +The interval at which the relayer will print the progress of the syncing process. This is used to +show the user the progress of the syncing process which could be useful for debugging purposes. + +- Type: `number` +- Required: `false` +- Default: `30000ms` +- env: `WEBB_EVM__CONTRACTS__PRINT_PROGRESS_INTERVAL` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +events-watcher = { print-progress-interval = 60000 } +``` + +##### Proposal Signing Backend + +A Proposal Signing backend is used for signing proposals that the relayer will submit to be signed +and later executed on the target chain. Currently, there are two types of proposal signing backends, +the Moked one, and the DKG based one. + +###### type + +The type of the proposal signing backend to use. + +- Type: `string` +- Required: `true` +- Possible values: + - `Mocked` + - `Dkg` +- env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_TYPE` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +proposal-signing-backend = { type = "Mocked", private-key = "0x..." } +``` + +Let's take a look at each one of them. + +###### Mocked Proposal Signing Backend + +The mocked proposal signing backend is used for testing purposes, and it is mostly used for our +local and integration tests. This backend will sign the proposals with a mocked keypair; hence +should not be used in production environment. + +- Avilable configuration values: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +proposal-signing-backend = { type = "Mocked", private-key = "0x..." } +``` + +###### private-key + +The private key to use for signing the proposals. Only used by the mocked proposal signing backend. + +- Type: `string` +- Required: + - `true` if the [type](#type) is `Mocked` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_PRIVATE_KEY` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +proposal-signing-backend = { type = "Mocked", private-key = "0x..." } +``` + +###### Dkg Proposal Signing Backend + +The DKG proposal signing backend is used for signing the proposals using the DKG configured node. + +- Avilable configuration values: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +proposal-signing-backend = { type = "Dkg", node = "1080" } +``` + +###### node + +The node's chain-id to use for signing the proposals. Only used by the DKG proposal signing backend. + +- Type: `string` +- Required: + - `true` if the [type](#type) is `Dkg` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_NODE` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +proposal-signing-backend = { type = "Dkg", node = "1080" } +``` + +##### Linked Anchors + +The Linked Anchors configuration is used to define the linked anchors for this VAnchor contract. +which is only available when the [type](#type) is `VAnchor`. This configration value is a list of +Linked Anchors, that are defined in a human-readable format (or raw format), nonetheless, the +relayer will convert them to a raw format before using them. + +- Avilable configuration values: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Evm", chain-id = 1, address = "0x..." }, + { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, + { type = "Raw", resource-id = "0x..." }, +] +``` + +###### type + +The type of the linked anchor definition. + +- Type: `string` +- Required: `true` +- Possible values: + - `Evm` + - `Substrate` + - `Raw` +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__TYPE` + +###### chain-id + +The chain-id of the linked anchor definition. Only used by the `Evm` and `Substrate` types. + +- Type: `number` +- Required: + - `true` if the [type](#type) is `Evm` or `Substrate` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__CHAIN_ID` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Evm", chain-id = 1, address = "0x..." }, + { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, +] +``` + +###### address + +The address of the linked anchor definition. Only used by the `Evm` type. + +- Type: `string` +- Required: + - `true` if the [type](#type) is `Evm` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__ADDRESS` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Evm", chain-id = 1, address = "0x..." }, +] +``` + +###### pallet + +The pallet of the linked anchor definition. Only used by the `Substrate` type. + +- Type: `number` +- Required: + - `true` if the [type](#type) is `Substrate` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__PALLET` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, +] +``` + +###### tree-id + +The tree-id of the linked anchor definition. Only used by the `Substrate` type. + +- Type: `number` +- Required: + - `true` if the [type](#type) is `Substrate` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__TREE_ID` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, +] +``` + +###### resource-id + +The resource-id of the linked anchor definition. Only used by the `Raw` type. + +- Type: `string` +- Required: + - `true` if the [type](#type) is `Raw` + - `false` otherwise +- env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__RESOURCE_ID` +- Example: + +```toml +[[evm.ethereum.contracts]] +type = "VAnchor" +linked-anchors = [ + { type = "Raw", resource-id = "0x..." }, +] +``` From 5615ce11d02ea1b9ad8da0b73b8a716cb5c32f68 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 18:58:04 +0200 Subject: [PATCH 08/27] add substrate config --- config/README.md | 403 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) diff --git a/config/README.md b/config/README.md index 970717a9f..64e626faf 100644 --- a/config/README.md +++ b/config/README.md @@ -46,6 +46,38 @@ following section we will describe the different configuration entries and how t - [address](#address-1) - [pallet](#pallet) - [tree-id](#tree-id) +- [Substrate Node Configuration](#substrate-node-configuration) + - [name](#name-1) + - [chain-id](#chain-id-2) + - [http-endpoint](#http-endpoint-1) + - [ws-endpoint](#ws-endpoint-1) + - [enabled](#enabled-2) + - [explorer](#explorer-1) + - [suri](#suri) + - [beneficiary](#beneficiary-1) + - [runtime](#runtime) + - [tx-queue](#tx-queue-1) + - [max-sleep-interval](#max-sleep-interval-1) + - [pallets](#pallets) + - [pallet](#pallet-1) + - [events-watcher](#events-watcher-1) + - [enabled](#enabled-3) + - [polling-interval](#polling-interval-1) + - [max-blocks-per-step](#max-blocks-per-step-1) + - [sync-blocks-from](#sync-blocks-from-1) + - [print-progress-interval](#print-progress-interval-1) + - [enable-data-query](#enable-data-query-1) + - [proposal-signing-backend](#proposal-signing-backend-1) + - [type](#type) + - [node](#node) + - [private-key](#private-key-1) + - [linked-anchors](#linked-anchors) + - [type](#type-1) + - [resource-id](#resource-id) + - [chain-id](#chain-id-2) + - [address](#address-1) + - [pallet](#pallet-1) + - [tree-id](#tree-id) ### Global Configuration @@ -600,6 +632,8 @@ which is only available when the [type](#type) is `VAnchor`. This configration v Linked Anchors, that are defined in a human-readable format (or raw format), nonetheless, the relayer will convert them to a raw format before using them. +- Required: `false` +- Default: `null` (defaults to an empty list) - Avilable configuration values: ```toml @@ -719,3 +753,372 @@ linked-anchors = [ { type = "Raw", resource-id = "0x..." }, ] ``` + +### Substrate Node Configuration + +The Substrate Node configuration file is used to configure the relayer to work with a specific +Substrate Node. It is usually located at a file called `substrate/.toml` in the `config` +directory. + +The value of this configration is a table, and the name of the table is the name of the node, for +example: + +```toml +[substrate.tangle] +chain-id = 1080 +name = "tangle" +# ... +``` + +So, in general it is `[substrate.]`, where `` is the name of the network. The +following sections describe the different configuration entries and how to use them. + +#### name + +The name of the Substrate node. + +- Type: `string` +- Required: `true` +- env: `WEBB_SUBSTRATE__NAME` +- Example: + +```toml +[substrate.tangle] +name = "tangle" +``` + +#### chain-id + +The chain-id of the Substrate node. + +- Type: `number` +- Required: `true` +- env: `WEBB_SUBSTRATE__CHAIN_ID` +- Example: + +```toml +[substrate.tangle] +chain-id = 1080 +``` + +#### http-endpoint + +The RPC endpoint of the Substrate node. + +- Type: `string` +- Required: `true` +- env: `WEBB_SUBSTRATE__HTTP_ENDPOINT` +- Example: + +```toml +[substrate.tangle] +http-endpoint = "http://localhost:9933" +``` + +#### ws-endpoint + +The RPC WebSocket endpoint of the Substrate node. + +- Type: `string` +- Required: `true` +- env: `WEBB_SUBSTRATE__WS_ENDPOINT` +- Example: + +```toml +[substrate.tangle] +ws-endpoint = "ws://localhost:9944" +``` + +#### runtime + +The runtime of the running substrate node. These are predifined in the relayer, with each having +different types of Options. + +- Type: `string` +- Required: `true` +- env: `WEBB_SUBSTRATE__RUNTIME` +- Possible values: + - `DKG` (that is, `dkg-substrate`) + - `WebbProtocol` (also known as `protocol-substrate`) +- Example: + +```toml +[substrate.tangle] +runtime = "WebbProtocol" +``` + +#### enabled + +Whether the Substrate node is enabled or not. If it is not enabled, the relayer will not try to add +it to the list of available nodes. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_SUBSTRATE__ENABLED` +- Example: + +```toml +[substrate.tangle] +enabled = true +``` + +#### explorer + +The explorer of the Substrate Network. This is used to display clickable links to the explorer in +the logs. + +- Type: `string` +- Required: `false` +- Default: `null` +- env: `WEBB_SUBSTRATE__EXPLORER` +- Example: + +```toml +[substrate.tangle] +explorer = "https://tangle-explorer.webb.tools" +``` + +#### suri + +SURI stands for "secret URI". It is a mnemonic phrase that can be used to generate a private key. +This is used to sign extrinsics. we will refer to this as the "s" for now, The value is a string +(`s`) that we will try to interpret the string in order to generate a key Pair. in the case that the +pair can be expressed as a direct derivation from a seed (some cases, such as Sr25519 derivations +with path components, cannot). + +This takes a helper function to do the key generation from a phrase, password and junction iterator. + +- If `s` begins with a `$` character it is interpreted as an environment variable. +- If `s` is a possibly `0x` prefixed 64-digit hex string, then it will be interpreted directly as a + `MiniSecretKey` (aka "seed" in `subkey`). +- If `s` is a valid BIP-39 key phrase of 12, 15, 18, 21 or 24 words, then the key will be derived + from it. In this case: + - the phrase may be followed by one or more items delimited by `/` characters. + - the path may be followed by `///`, in which case everything after the `///` is treated as a + password. +- If `s` begins with a `/` character it is prefixed with the Substrate public `DEV_PHRASE` and + interpreted as above. + +In this case they are interpreted as HDKD junctions; purely numeric items are interpreted as +integers, non-numeric items as strings. Junctions prefixed with `/` are interpreted as soft +junctions, and with `//` as hard junctions. + +There is no correspondence mapping between SURI strings and the keys they represent. Two different +non-identical strings can actually lead to the same secret being derived. Notably, integer junction +indices may be legally prefixed with arbitrary number of zeros. Similarly an empty password (ending +the SURI with `///`) is perfectly valid and will generally be equivalent to no password at all. + +The value of this string could also start with `$` to indicate that it is an environment variable, +in which case the value of the environment variable will be used. + +> **Warning**: This is a sensitive value, and should be kept secret. It is recommended to use an +> environment variable to store the value of this string. + +- Type: `string` +- Required: `true` +- env: `WEBB_SUBSTRATE__SURI` +- Example: + +```toml +[substrate.tangle] +suri = "$TANGLE_SURI" +``` + +#### beneficiary + +The beneficiary is the address that will receive the fees from the transactions. This is optional, +and will default to the address derived from the `suri` if not provided. + +- Type: `string` +- Required: `false` +- Default: `null` +- env: `WEBB_SUBSTRATE__BENEFICIARY` +- Example: + +```toml +[substrate.tangle] +beneficiary = "5FZ2Wfjy5rZ7g5j7Y9Zwv5Z4Z3Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9Z9" +``` + +#### Tx Queue + +The transaction queue is a queue of transactions that are waiting to be sent to the Substrate node. + +##### max-sleep-interval + +The maximum sleep interval between sending transactions to the Substrate node. + +- Type: `number` +- Required: `false` +- Default: `10000ms` +- env: `WEBB_SUBSTRATE__TRANSACTION_QUEUE_MAX_SLEEP_INTERVAL` +- Example: + +```toml +[substrate.tangle] +tx-queue = { max-sleep-interval = 10000 } +``` + +#### Pallets + +The pallets are the different pallets that are used by the relayer. Each will define its own +configration which will eventually be used by the relayer to start a different service for each +pallet. + +There are currently 5 different pallets that are supported by the relayer: + +- `DKG` +- `DkgProposals` +- `DkgProposalHandler` +- `SignatureBridge` +- `VAnchorBn254` + +- Type: `table` +- Required: `false` +- Default: `null` (empty table) +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" + +[[substrate.tangle.pallets]] +pallet = "DkgProposals" +# ... +``` + +##### pallet + +The type of the pallet. This is used to determine which pallet to use. + +- Type: `string` +- Required: `true` +- Possible values: + - `DKG` + - `DkgProposals` + - `DkgProposalHandler` + - `SignatureBridge` + - `VAnchorBn254` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +``` + +##### events-watcher + +The events watcher is used to watch for events emitted by the pallet. + +- Type: `table` +- Required: `false` +- Default: `null` (empty table) +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true } +``` + +###### enabled + +Whether the events watcher is enabled or not. If it is not enabled, the relayer will not try to +watch events emitted by the pallet. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_ENABLED` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true } +``` + +##### enable-data-query + +Whether the data query is enabled or not. If it is not enabled, the relayer will not try to query +the data from the pallet. + +- Type: `bool` +- Required: `false` +- Default: `true` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_ENABLE_DATA_QUERY` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true, enable-data-query = true } +``` + +##### polling-interval + +The polling interval is the interval at which the relayer will poll the Substrate node for new +blocks. + +- Type: `number` +- Required: `false` +- Default: `6000ms` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_POLLING_INTERVAL` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true, polling-interval = 6000 } +``` + +##### max-blocks-per-step + +The maximum number of blocks to process per step. + +- Type: `number` +- Required: `false` +- Default: `100` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_MAX_BLOCKS_PER_STEP` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true, max-blocks-per-step = 100 } +``` + +##### sync-blocks-from + +The block number from which to start syncing events from. This is useful if you want to start the +relayer from a specific block instead of block zero. + +- Type: `number` +- Required: `false` +- Default: `0` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_SYNC_BLOCKS_FROM` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true, sync-blocks-from = 42069 } +``` + +##### print-progress-interval + +The interval at which the relayer will print the progress of the syncing process. Useful for +debugging. + +- Type: `number` +- Required: `false` +- Default: `12000ms` +- env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_PRINT_PROGRESS_INTERVAL` +- Example: + +```toml +[[substrate.tangle.pallets]] +pallet = "DKG" +events-watcher = { enabled = true, print-progress-interval = 12000 } +``` From d611ed36b47fd090d8211ded2f209d2e25d991e9 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 19:02:14 +0200 Subject: [PATCH 09/27] fixing contract ref --- config/README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/config/README.md b/config/README.md index 64e626faf..e1c657791 100644 --- a/config/README.md +++ b/config/README.md @@ -359,19 +359,19 @@ Here is an example of the configuration for the contracts: ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" deployed-at = 3123412 # ... [[evm.ethereum.contracts]] -type = "SignatureBridge" +contract = "SignatureBridge" address = "0xd8dA6BF26964aF9D7eEd9e03E03517D3faA9d045" deployed-at = 3123413 # ... ``` -##### type +##### contract The type of the contract. This is used to identify the contract, and the relayer will use this to determine which contract to use for a specific operation. Each contract type has its own @@ -388,7 +388,7 @@ configuration, and different internally service that will handle the contract op ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" ``` ##### address @@ -402,7 +402,7 @@ The address of the contract on the configured chain. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" ``` @@ -418,7 +418,7 @@ start scanning for events from. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" deployed-at = 3123412 ``` @@ -431,7 +431,7 @@ configration values to determine how the relayer will poll the events from that ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enabled = true, poll-interval = 12000 } ``` @@ -447,7 +447,7 @@ Enable or disable the events watcher for this contract. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enabled = true } ``` @@ -464,7 +464,7 @@ like the leaves for example. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enable-data-query = true } ``` @@ -480,7 +480,7 @@ The interval at which the relayer will poll for events from the contract. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { poll-interval = 12000 } ``` @@ -498,7 +498,7 @@ relayer will sync the chain. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { max-blocks-per-step = 500 } ``` @@ -518,7 +518,7 @@ value here. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { sync-blocks-from = 3123412 } ``` @@ -535,7 +535,7 @@ show the user the progress of the syncing process which could be useful for debu ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { print-progress-interval = 60000 } ``` @@ -559,7 +559,7 @@ The type of the proposal signing backend to use. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -575,7 +575,7 @@ should not be used in production environment. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -592,7 +592,7 @@ The private key to use for signing the proposals. Only used by the mocked propos ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -604,7 +604,7 @@ The DKG proposal signing backend is used for signing the proposals using the DKG ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Dkg", node = "1080" } ``` @@ -621,7 +621,7 @@ The node's chain-id to use for signing the proposals. Only used by the DKG propo ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Dkg", node = "1080" } ``` @@ -638,7 +638,7 @@ relayer will convert them to a raw format before using them. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" linked-anchors = [ { type = "Evm", chain-id = 1, address = "0x..." }, { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, From d45e75accc3d0eb85b8c1b4597199caa48d93e69 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Wed, 15 Mar 2023 19:02:14 +0200 Subject: [PATCH 10/27] fixing contract ref --- config/README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config/README.md b/config/README.md index 64e626faf..68ae51a94 100644 --- a/config/README.md +++ b/config/README.md @@ -359,19 +359,19 @@ Here is an example of the configuration for the contracts: ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" deployed-at = 3123412 # ... [[evm.ethereum.contracts]] -type = "SignatureBridge" +contract = "SignatureBridge" address = "0xd8dA6BF26964aF9D7eEd9e03E03517D3faA9d045" deployed-at = 3123413 # ... ``` -##### type +##### contract The type of the contract. This is used to identify the contract, and the relayer will use this to determine which contract to use for a specific operation. Each contract type has its own @@ -383,12 +383,12 @@ configuration, and different internally service that will handle the contract op - `OpenVAnchor` - `SignatureBridge` - Required: `true` -- env: `WEBB_EVM__CONTRACTS__TYPE` +- env: `WEBB_EVM__CONTRACTS__CONTRACT` - Example: ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" ``` ##### address @@ -402,7 +402,7 @@ The address of the contract on the configured chain. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" ``` @@ -418,7 +418,7 @@ start scanning for events from. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" deployed-at = 3123412 ``` @@ -431,7 +431,7 @@ configration values to determine how the relayer will poll the events from that ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enabled = true, poll-interval = 12000 } ``` @@ -447,7 +447,7 @@ Enable or disable the events watcher for this contract. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enabled = true } ``` @@ -464,7 +464,7 @@ like the leaves for example. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { enable-data-query = true } ``` @@ -480,7 +480,7 @@ The interval at which the relayer will poll for events from the contract. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { poll-interval = 12000 } ``` @@ -498,7 +498,7 @@ relayer will sync the chain. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { max-blocks-per-step = 500 } ``` @@ -518,7 +518,7 @@ value here. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { sync-blocks-from = 3123412 } ``` @@ -535,7 +535,7 @@ show the user the progress of the syncing process which could be useful for debu ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" events-watcher = { print-progress-interval = 60000 } ``` @@ -559,7 +559,7 @@ The type of the proposal signing backend to use. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -575,7 +575,7 @@ should not be used in production environment. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -592,7 +592,7 @@ The private key to use for signing the proposals. Only used by the mocked propos ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Mocked", private-key = "0x..." } ``` @@ -604,7 +604,7 @@ The DKG proposal signing backend is used for signing the proposals using the DKG ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Dkg", node = "1080" } ``` @@ -621,7 +621,7 @@ The node's chain-id to use for signing the proposals. Only used by the DKG propo ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" proposal-signing-backend = { type = "Dkg", node = "1080" } ``` @@ -638,7 +638,7 @@ relayer will convert them to a raw format before using them. ```toml [[evm.ethereum.contracts]] -type = "VAnchor" +contract = "VAnchor" linked-anchors = [ { type = "Evm", chain-id = 1, address = "0x..." }, { type = "Substrate", chain-id = 1080, pallet = 42, tree-id = 4 }, From ca0b4db0db90e09864967d664468dce736977421 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 16:09:09 +0200 Subject: [PATCH 11/27] add docs to each development configs --- config/development/README.md | 57 ++++++++++++++ .../.env.example | 1 - config/development/evm-blanknet/README.md | 0 config/development/evm-blanknet/athena.toml | 3 +- config/development/evm-blanknet/demeter.toml | 1 - config/development/evm-blanknet/hermes.toml | 3 +- .../development/evm-local-tangle/.env.example | 22 ++++-- .../development/evm-local-tangle/athena.toml | 76 +------------------ .../development/evm-local-tangle/demeter.toml | 69 +---------------- .../development/evm-local-tangle/hermes.toml | 74 +----------------- config/development/evm-local-tangle/main.toml | 10 --- .../development/evm-local-tangle/tangle.toml | 1 + config/development/evm-localdkg/.env.example | 17 ----- config/development/evm-localdkg/athena.toml | 68 ----------------- config/development/evm-localdkg/demeter.toml | 66 ---------------- config/development/evm-localdkg/dkg.toml | 15 ---- config/development/evm-localdkg/hermes.toml | 66 ---------------- config/development/evm-localdkg/main.toml | 5 -- config/development/evm-localnet/athena.toml | 69 ----------------- config/development/evm-localnet/demeter.toml | 67 ---------------- config/development/evm-localnet/hermes.toml | 67 ---------------- config/development/evm-localnet/main.toml | 5 -- .../substrate.toml | 11 +-- config/example/README.md | 3 + .../eggnet-mixer/substrate.toml | 10 --- 25 files changed, 87 insertions(+), 699 deletions(-) create mode 100644 config/development/README.md rename config/development/{evm-localnet => evm-blanknet}/.env.example (99%) create mode 100644 config/development/evm-blanknet/README.md mode change 100644 => 120000 config/development/evm-local-tangle/athena.toml mode change 100644 => 120000 config/development/evm-local-tangle/demeter.toml mode change 100644 => 120000 config/development/evm-local-tangle/hermes.toml delete mode 100644 config/development/evm-local-tangle/main.toml delete mode 100644 config/development/evm-localdkg/.env.example delete mode 100644 config/development/evm-localdkg/athena.toml delete mode 100644 config/development/evm-localdkg/demeter.toml delete mode 100644 config/development/evm-localdkg/dkg.toml delete mode 100644 config/development/evm-localdkg/hermes.toml delete mode 100644 config/development/evm-localdkg/main.toml delete mode 100644 config/development/evm-localnet/athena.toml delete mode 100644 config/development/evm-localnet/demeter.toml delete mode 100644 config/development/evm-localnet/hermes.toml delete mode 100644 config/development/evm-localnet/main.toml rename config/development/{local-substrate => substrate-local}/substrate.toml (67%) create mode 100644 config/example/README.md delete mode 100644 config/exclusive-strategies/eggnet-mixer/substrate.toml diff --git a/config/development/README.md b/config/development/README.md new file mode 100644 index 000000000..e1d0923d5 --- /dev/null +++ b/config/development/README.md @@ -0,0 +1,57 @@ +## Development Configuration + +This directory contains configuration for the development environment. + +## EVM Blanknet + +The EVM Blanknet is a private Ethereum network that is used for development and testing. It is configured in the `evm-blanknet` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deplpyed contracts and the deployed Anchors will be linked to each other. This will use the Mocked Signing Backend for signing proposals. + +## EVM Local <> Tangle + +The EVM Local <> Tangle is a private Ethereum network that is used for development and testing. It is configured in the `evm-local-tangle` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deplpyed contracts and the deployed Anchors will be linked to each other. in addition to that, there is a configured Tangle network that will be used for signing proposals. + +## Substrate Local + +The Substrate Local is a private Substrate network that is used for development and testing. It is configured in the `substrate-local` directory. This configration will try to connect to a local running Substrate node that uses the Webb Protocol (protocol-substrate) Runtime; for easier testing, you could also use the tangle node for that. + +### Running the Development Environment + +To run the development environment, you need to have the following installed: + +- [Node.js](https://nodejs.org/en/download/) +- [Rust](https://www.rustup.rs/) + +Then, you can run the following commands: + +```bash +cp config/development//.env.example .env +``` + +Compile the relayer crates and Relayer CLI: + +```bash +cargo build -p webb-relayer --features cli +``` + +You will also need the following scripts: + +- [LocalEvmVBridge.ts](https://github.com/webb-tools/protocol-solidity/blob/a56f5cd325e7f6b59d2eeae8597836dfae012da5/scripts/evm/deployments/LocalEvmVBridge.ts) +- [Local Standalone Tangle Network\*](https://github.com/webb-tools/tangle/tree/main/scripts#run-a-standalone-tangle-network) + +* Note: The Tangle Network is only Required for the EVM Local <> Tangle configuration and is not required for the EVM Blanknet configuration. + +After that, you can run the relayer: + +```bash +./target/debug/webb-relayer -vvv --tmp --config config/development/ +``` + +## Production Configuration + +This Repository does not contain any production ready configration, but they are all examples and for demonstration purposes only. + +However, you can take a look at the following configrations: + +1. [exclusive-startegies](../exclusive-strategies/) - These are a set of configrations that are used for the exclusive strategies of different roles that you can use the relayer for. +2. [full-support](../full-support/) - Shows you how you can combine the different strategies to support all the roles that you can use the relayer for. +3. [example](../example/) - This is a very simple and minimal configuration for starting a Private Transaction Relayer over the Gorli Testnet. diff --git a/config/development/evm-localnet/.env.example b/config/development/evm-blanknet/.env.example similarity index 99% rename from config/development/evm-localnet/.env.example rename to config/development/evm-blanknet/.env.example index 53763beb9..2b62d3343 100644 --- a/config/development/evm-localnet/.env.example +++ b/config/development/evm-blanknet/.env.example @@ -8,5 +8,4 @@ DEMETER_WS_URL=ws://localhost:5003 HERMES_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 ATHENA_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 DEMETER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 - GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 diff --git a/config/development/evm-blanknet/README.md b/config/development/evm-blanknet/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/config/development/evm-blanknet/athena.toml b/config/development/evm-blanknet/athena.toml index 0c715ab7b..8ebe05577 100644 --- a/config/development/evm-blanknet/athena.toml +++ b/config/development/evm-blanknet/athena.toml @@ -51,7 +51,7 @@ events-watcher = { enabled = true, polling-interval = 1000, print-progress-inter # These fields are used to determine the generation of AnchorUpdate proposals linked-anchors = [ { type = "Evm", chain = "hermes", chain-id = 5001, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, + { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, ] # Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. @@ -59,7 +59,6 @@ linked-anchors = [ # the signed proposals to the configured SignatureBridge of the relevant chains. proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -# proposal-signing-backend = { type = "DKGNode", node = "5" } [[evm.athena.contracts]] contract = "SignatureBridge" diff --git a/config/development/evm-blanknet/demeter.toml b/config/development/evm-blanknet/demeter.toml index 2fbade435..d2aab9d8b 100644 --- a/config/development/evm-blanknet/demeter.toml +++ b/config/development/evm-blanknet/demeter.toml @@ -57,7 +57,6 @@ linked-anchors = [ # the signed proposals to the configured SignatureBridge of the relevant chains. proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -# proposal-signing-backend = { type = "DKGNode", node = "5" } [[evm.demeter.contracts]] contract = "SignatureBridge" diff --git a/config/development/evm-blanknet/hermes.toml b/config/development/evm-blanknet/hermes.toml index 6e84e23be..73d269118 100644 --- a/config/development/evm-blanknet/hermes.toml +++ b/config/development/evm-blanknet/hermes.toml @@ -50,14 +50,13 @@ events-watcher = { enabled = true, polling-interval = 1000, print-progress-inter # These fields are used to determine the generation of AnchorUpdate proposals linked-anchors = [ { type = "Evm", chain = "athena", chain-id = 5002, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, + { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, ] # Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. # When the type is "Mocked", the supplied private-key will sign any proposed updates and submit # the signed proposals to the configured SignatureBridge of the relevant chains. proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -#proposal-signing-backend = { type = "DKGNode", node = "5" } [[evm.hermes.contracts]] contract = "SignatureBridge" diff --git a/config/development/evm-local-tangle/.env.example b/config/development/evm-local-tangle/.env.example index 54f86e742..19c57e9e5 100644 --- a/config/development/evm-local-tangle/.env.example +++ b/config/development/evm-local-tangle/.env.example @@ -5,13 +5,21 @@ ATHENA_WS_URL=ws://localhost:5002 DEMETER_HTTP_URL=http://localhost:5003 DEMETER_WS_URL=ws://localhost:5003 -HERMES_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -ATHENA_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -DEMETER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 +PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 + +HERMES_PRIVATE_KEY=${PRIVATE_KEY} +ATHENA_PRIVATE_KEY=${PRIVATE_KEY} +DEMETER_PRIVATE_KEY=${PRIVATE_KEY} GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -WEBB_SUBSTRATE_LOCALDKG_ENABLED=true -LOCAL_DKG_HTTP_URL=http://localhost:9933 -LOCAL_DKG_WS_URL=ws://localhost:9944 -LOCAL_DKG_SURI=//Alice +# Configure the chains to use the tangle network as a signing backend + +WEBB_EVM_HERMES_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" +WEBB_EVM_HERMES_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" + +WEBB_EVM_ATHENA_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" +WEBB_EVM_ATHENA_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" + +WEBB_EVM_DEMETER_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" +WEBB_EVM_DEMETER_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" diff --git a/config/development/evm-local-tangle/athena.toml b/config/development/evm-local-tangle/athena.toml deleted file mode 100644 index 1c3c487b8..000000000 --- a/config/development/evm-local-tangle/athena.toml +++ /dev/null @@ -1,75 +0,0 @@ -# Block which represents properties for a network -[evm.athena] -# The name that the chain is indexed on, for linkable anchors -name = "athena" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$ATHENA_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$ATHENA_WS_URL" -# chain specific id from evm opcode -chain-id = 5002 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$ATHENA_PRIVATE_KEY" - -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.athena.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } -# Configuration related to withdraw (for private transaction relaying) -# - withdraw-gasLimit: Value which specifies the maximum amount of gas which will be used when -# submitting a withdraw transaction -# - withdraw-fee-percentage: Value which specifies the fees that this relayer will collect upon -# submitting a withdraw transaction -withdraw-config = { withdraw-fee-percentage = 0, withdraw-gaslimit = "0x350000" } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm",chain = "hermes", chain-id = 5001, address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, -] - -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -# proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "1080" } - -[[evm.athena.contracts]] -contract = "SignatureBridge" -address = "0x51a240271AB8AB9f9a21C82d9a85396b704E164d" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } diff --git a/config/development/evm-local-tangle/athena.toml b/config/development/evm-local-tangle/athena.toml new file mode 120000 index 000000000..67e55e23f --- /dev/null +++ b/config/development/evm-local-tangle/athena.toml @@ -0,0 +1 @@ +../evm-blanknet/athena.toml \ No newline at end of file diff --git a/config/development/evm-local-tangle/demeter.toml b/config/development/evm-local-tangle/demeter.toml deleted file mode 100644 index a3cde8871..000000000 --- a/config/development/evm-local-tangle/demeter.toml +++ /dev/null @@ -1,68 +0,0 @@ -# Block which represents properties for a network -[evm.demeter] -# The name that the chain is indexed on, for linkable anchors -name = "demeter" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$DEMETER_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$DEMETER_WS_URL" -# chain specific id from evm opcode -chain-id = 5003 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$DEMETER_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.demeter.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } -withdraw-config = { withdraw-fee-percentage = 0, withdraw-gaslimit = "0x350000" } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "hermes", chain-id = 5001, address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { type = "Evm", chain = "athena", chain-id = 5002, address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3"}, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -# proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "1080" } - -[[evm.demeter.contracts]] -contract = "SignatureBridge" -address = "0x2946259E0334f33A064106302415aD3391BeD384" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } diff --git a/config/development/evm-local-tangle/demeter.toml b/config/development/evm-local-tangle/demeter.toml new file mode 120000 index 000000000..661c9260d --- /dev/null +++ b/config/development/evm-local-tangle/demeter.toml @@ -0,0 +1 @@ +../evm-blanknet/demeter.toml \ No newline at end of file diff --git a/config/development/evm-local-tangle/hermes.toml b/config/development/evm-local-tangle/hermes.toml deleted file mode 100644 index cc69a8cf2..000000000 --- a/config/development/evm-local-tangle/hermes.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.hermes] -# The name that the chain is indexed on, for linkable anchors -name = "hermes" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$HERMES_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$HERMES_WS_URL" -# chain specific id from evm opcode -chain-id = 5001 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$HERMES_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.hermes.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xc705034ded85e817b9E56C977E61A2098362898B" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } -# Configuration related to withdraw (for private transaction relaying) -# - withdraw-gasLimit: Value which specifies the maximum amount of gas which will be used when -# submitting a withdraw transaction -# - withdraw-fee-percentage: Value which specifies the fees that this relayer will collect upon -# submitting a withdraw transaction -withdraw-config = { withdraw-fee-percentage = 0, withdraw-gaslimit = "0x350000" } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "athena", chain-id = 5002, address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -#proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "1080" } - -[[evm.hermes.contracts]] -contract = "SignatureBridge" -address = "0xDe09E74d4888Bc4e65F589e8c13Bce9F71DdF4c7" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 30000 } diff --git a/config/development/evm-local-tangle/hermes.toml b/config/development/evm-local-tangle/hermes.toml new file mode 120000 index 000000000..9144ec864 --- /dev/null +++ b/config/development/evm-local-tangle/hermes.toml @@ -0,0 +1 @@ +../evm-blanknet/hermes.toml \ No newline at end of file diff --git a/config/development/evm-local-tangle/main.toml b/config/development/evm-local-tangle/main.toml deleted file mode 100644 index 01bdd9f03..000000000 --- a/config/development/evm-local-tangle/main.toml +++ /dev/null @@ -1,10 +0,0 @@ -port = 9955 - -[experimental] -smart-anchor-updates = false -smart-anchor-updates-retries = 3 - -[features] -governance-relay = true -data-query = true -private-tx-relay = true \ No newline at end of file diff --git a/config/development/evm-local-tangle/tangle.toml b/config/development/evm-local-tangle/tangle.toml index 06b40860d..a3f71e392 100644 --- a/config/development/evm-local-tangle/tangle.toml +++ b/config/development/evm-local-tangle/tangle.toml @@ -10,6 +10,7 @@ suri = "//Bob" [[substrate.tangle.pallets]] pallet = "DKG" events-watcher = { enabled = true, polling-interval = 3000, print-progress-interval = 30000 } + [[substrate.tangle.pallets]] pallet = "DKGProposalHandler" events-watcher = { enabled = true, polling-interval = 3000, print-progress-interval = 30000 } diff --git a/config/development/evm-localdkg/.env.example b/config/development/evm-localdkg/.env.example deleted file mode 100644 index 54f86e742..000000000 --- a/config/development/evm-localdkg/.env.example +++ /dev/null @@ -1,17 +0,0 @@ -HERMES_HTTP_URL=http://localhost:5001 -HERMES_WS_URL=ws://localhost:5001 -ATHENA_HTTP_URL=http://localhost:5002 -ATHENA_WS_URL=ws://localhost:5002 -DEMETER_HTTP_URL=http://localhost:5003 -DEMETER_WS_URL=ws://localhost:5003 - -HERMES_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -ATHENA_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -DEMETER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 - -GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 - -WEBB_SUBSTRATE_LOCALDKG_ENABLED=true -LOCAL_DKG_HTTP_URL=http://localhost:9933 -LOCAL_DKG_WS_URL=ws://localhost:9944 -LOCAL_DKG_SURI=//Alice diff --git a/config/development/evm-localdkg/athena.toml b/config/development/evm-localdkg/athena.toml deleted file mode 100644 index 9ee4ca4cf..000000000 --- a/config/development/evm-localdkg/athena.toml +++ /dev/null @@ -1,68 +0,0 @@ -# Block which represents properties for a network -[evm.athena] -# The name that the chain is indexed on, for linkable anchors -name = "athena" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$ATHENA_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$ATHENA_WS_URL" -# chain specific id from evm opcode -chain-id = 5002 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$ATHENA_PRIVATE_KEY" - -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.athena.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "hermes", chain-id = "5001", address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { chain = "demeter", chain-id = "5003", address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, -] - -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -# proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.athena.contracts]] -contract = "SignatureBridge" -address = "0x51a240271AB8AB9f9a21C82d9a85396b704E164d" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } diff --git a/config/development/evm-localdkg/demeter.toml b/config/development/evm-localdkg/demeter.toml deleted file mode 100644 index 9f48dfc8e..000000000 --- a/config/development/evm-localdkg/demeter.toml +++ /dev/null @@ -1,66 +0,0 @@ -# Block which represents properties for a network -[evm.demeter] -# The name that the chain is indexed on, for linkable anchors -name = "demeter" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$DEMETER_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$DEMETER_WS_URL" -# chain specific id from evm opcode -chain-id = 5003 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$DEMETER_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.demeter.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 0 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "hermes", chain-id = "5001", address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { chain = "athena", chain-id = "5002", address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3"}, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -# proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.demeter.contracts]] -contract = "SignatureBridge" -address = "0x2946259E0334f33A064106302415aD3391BeD384" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 0 } diff --git a/config/development/evm-localdkg/dkg.toml b/config/development/evm-localdkg/dkg.toml deleted file mode 100644 index 55fdc05cf..000000000 --- a/config/development/evm-localdkg/dkg.toml +++ /dev/null @@ -1,15 +0,0 @@ -[substrate.localdkg] -name = "localdkg" -http-endpoint = "$LOCAL_DKG_HTTP_URL" -ws-endpoint = "$LOCAL_DKG_WS_URL" -chain-id = 5 -runtime = "DKG" -suri = "$LOCAL_DKG_SURI" - -[[substrate.localdkg.pallets]] -pallet = "DKGProposalHandler" -events-watcher = { enabled = true, polling-interval = 6000, print-progress-interval = 60000 } - -[[substrate.localdkg.pallets]] -pallet = "DKG" -events-watcher = { enabled = true, polling-interval = 6000, print-progress-interval = 60000 } diff --git a/config/development/evm-localdkg/hermes.toml b/config/development/evm-localdkg/hermes.toml deleted file mode 100644 index 68c54d811..000000000 --- a/config/development/evm-localdkg/hermes.toml +++ /dev/null @@ -1,66 +0,0 @@ -# Block which represents properties for a network -[evm.hermes] -# The name that the chain is indexed on, for linkable anchors -name = "hermes" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$HERMES_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$HERMES_WS_URL" -# chain specific id from evm opcode -chain-id = 5001 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$HERMES_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.hermes.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xc705034ded85e817b9E56C977E61A2098362898B" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "athena", chain-id = "5002", address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" }, - { chain = "demeter", chain-id = "5003", address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e"}, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -#proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.hermes.contracts]] -contract = "SignatureBridge" -address = "0xDe09E74d4888Bc4e65F589e8c13Bce9F71DdF4c7" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } diff --git a/config/development/evm-localdkg/main.toml b/config/development/evm-localdkg/main.toml deleted file mode 100644 index 1e2e1792b..000000000 --- a/config/development/evm-localdkg/main.toml +++ /dev/null @@ -1,5 +0,0 @@ -port = 9955 - -[experimental] -smart-anchor-updates = false -smart-anchor-updates-retries = 3 diff --git a/config/development/evm-localnet/athena.toml b/config/development/evm-localnet/athena.toml deleted file mode 100644 index 18a1c97e7..000000000 --- a/config/development/evm-localnet/athena.toml +++ /dev/null @@ -1,69 +0,0 @@ -# Block which represents properties for a network -[evm.athena] -# The name that the chain is indexed on, for linkable anchors -name = "athena" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$ATHENA_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$ATHENA_WS_URL" -# chain specific id from evm opcode -chain-id = 5002 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$ATHENA_PRIVATE_KEY" - -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.athena.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "hermes", chain-id = 5001, address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, -] - -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -# proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.athena.contracts]] -contract = "SignatureBridge" -address = "0x51a240271AB8AB9f9a21C82d9a85396b704E164d" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } diff --git a/config/development/evm-localnet/demeter.toml b/config/development/evm-localnet/demeter.toml deleted file mode 100644 index 65af0024c..000000000 --- a/config/development/evm-localnet/demeter.toml +++ /dev/null @@ -1,67 +0,0 @@ -# Block which represents properties for a network -[evm.demeter] -# The name that the chain is indexed on, for linkable anchors -name = "demeter" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$DEMETER_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$DEMETER_WS_URL" -# chain specific id from evm opcode -chain-id = 5003 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$DEMETER_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.demeter.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 0 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "hermes", chain-id = 5001, address = "0xc705034ded85e817b9E56C977E61A2098362898B" }, - { type = "Evm", chain = "athena", chain-id = 5002, address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" }, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -# proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.demeter.contracts]] -contract = "SignatureBridge" -address = "0x2946259E0334f33A064106302415aD3391BeD384" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 0 } diff --git a/config/development/evm-localnet/hermes.toml b/config/development/evm-localnet/hermes.toml deleted file mode 100644 index 308bb24e3..000000000 --- a/config/development/evm-localnet/hermes.toml +++ /dev/null @@ -1,67 +0,0 @@ -# Block which represents properties for a network -[evm.hermes] -# The name that the chain is indexed on, for linkable anchors -name = "hermes" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$HERMES_HTTP_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$HERMES_WS_URL" -# chain specific id from evm opcode -chain-id = 5001 -block-confirmations = 0 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$HERMES_PRIVATE_KEY" -tx-queue = { max-sleep-interval = 1500 } -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.hermes.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xc705034ded85e817b9E56C977E61A2098362898B" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 1 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "athena", chain-id = 5002, address = "0x91eB86019FD8D7c5a9E31143D422850A13F670A3" }, - { type = "Evm", chain = "demeter", chain-id = 5003, address = "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" }, -] -# Proposal signing backend can have a value of "Mocked" or the name of the DKG configuration. -# When the type is "Mocked", the supplied private-key will sign any proposed updates and submit -# the signed proposals to the configured SignatureBridge of the relevant chains. - -proposal-signing-backend = { type = "Mocked", private-key = "$GOVERNOR_PRIVATE_KEY" } -#proposal-signing-backend = { type = "DKGNode", node = "5" } - -[[evm.hermes.contracts]] -contract = "SignatureBridge" -address = "0xDe09E74d4888Bc4e65F589e8c13Bce9F71DdF4c7" -deployed-at = 1 -events-watcher = { enabled = true, polling-interval = 1000, print-progress-interval = 60000 } diff --git a/config/development/evm-localnet/main.toml b/config/development/evm-localnet/main.toml deleted file mode 100644 index 1e2e1792b..000000000 --- a/config/development/evm-localnet/main.toml +++ /dev/null @@ -1,5 +0,0 @@ -port = 9955 - -[experimental] -smart-anchor-updates = false -smart-anchor-updates-retries = 3 diff --git a/config/development/local-substrate/substrate.toml b/config/development/substrate-local/substrate.toml similarity index 67% rename from config/development/local-substrate/substrate.toml rename to config/development/substrate-local/substrate.toml index e8cdd40ee..be4329003 100644 --- a/config/development/local-substrate/substrate.toml +++ b/config/development/substrate-local/substrate.toml @@ -1,12 +1,13 @@ port = 9955 -[substrate.localnode] -name="localnode" -enabled=true +[substrate.local] +name = "local" +enabled = true http-endpoint = "http://localhost:9933" ws-endpoint = "ws://localhost:9944" runtime = "WebbProtocol" suri = "//Alice//stash" -[[substrate.localnode.pallets]] + +[[substrate.local.pallets]] pallet = "VAnchorBn254" -events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 0 } +events-watcher = { enabled = true, polling-interval = 10000, print-progress-interval = 6000 } diff --git a/config/example/README.md b/config/example/README.md new file mode 100644 index 000000000..0c639755a --- /dev/null +++ b/config/example/README.md @@ -0,0 +1,3 @@ +# Configration Examples + +This directory contains a very simple and minimal configuration for starting a Private Transaction Relayer over the Gorli Testnet. This configuration is used for testing and for demonstration purposes. diff --git a/config/exclusive-strategies/eggnet-mixer/substrate.toml b/config/exclusive-strategies/eggnet-mixer/substrate.toml deleted file mode 100644 index c3f824e74..000000000 --- a/config/exclusive-strategies/eggnet-mixer/substrate.toml +++ /dev/null @@ -1,10 +0,0 @@ -port = 9955 - -[substrate.webbeggnet] -enabled=true -chain-id=1080 -http-endpoint = "https://standalone.webb.tools" -ws-endpoint = "wss://standalone.webb.tools" -runtime = "WebbProtocol" -suri = "//Alice" -pallets = [] \ No newline at end of file From de2f7418730cb58a129e4af71da1ffebb020d025 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 16:31:47 +0200 Subject: [PATCH 12/27] remove unused envs --- .env.example | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 41f1616b3..f6f9f5ab2 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1 @@ -WEBB_EVM_RINKEBY_ENABLED=true -WEBB_EVM_HARMONYMAINNET0_ENABLED=true - -RINKEBY_PRIVATE_KEY=<0X_PREFIXED_PRIVATE_KEY> -HARMONYMAINNET0_PRIVATE_KEY=<0X_PREFIXED_PRIVATE_KEY> - -#add an optional beneficiary to receive rewards for relaying -WEBB_EVM_RINKEBY_BENEFICIARY=<0X_PREFIXED_ADDRESS> -WEBB_EVM_HARMONYMAINNET0_BENEFICIARY=<0X_PREFIXED_ADDRESS> - -ETH1_INFURA_API_KEY= \ No newline at end of file +ETH1_INFURA_API_KEY= From 3c8ed70621c60ffd7b1e77882ec453e413e70246 Mon Sep 17 00:00:00 2001 From: shekohex Date: Thu, 16 Mar 2023 16:58:33 +0200 Subject: [PATCH 13/27] Delete README.md --- config/development/evm-blanknet/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 config/development/evm-blanknet/README.md diff --git a/config/development/evm-blanknet/README.md b/config/development/evm-blanknet/README.md deleted file mode 100644 index e69de29bb..000000000 From 0e5c22e7c0afd01a2b08205bd56d27a9b0748a07 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 18:57:29 +0200 Subject: [PATCH 14/27] remove old and unused config files --- .../testnet-evm-bridge/.env.example | 27 ------- .../testnet-evm-bridge/arbitrum_test.toml | 60 --------------- .../testnet-evm-bridge/goerli.toml | 60 --------------- .../testnet-evm-bridge/main.toml | 8 -- .../testnet-evm-bridge/moonbase.toml | 60 --------------- .../testnet-evm-bridge/optimism_test.toml | 60 --------------- .../testnet-evm-bridge/polygon_test.toml | 60 --------------- .../testnet-evm-bridge/rinkeby.toml | 60 --------------- .../testnet-evm-bridge/ropsten.toml | 60 --------------- config/full-support/dkg-backend/.env.example | 23 ------ config/full-support/dkg-backend/goerli.toml | 44 ----------- config/full-support/dkg-backend/main.toml | 8 -- config/full-support/dkg-backend/moonbase.toml | 45 ------------ config/full-support/dkg-backend/mumbai.toml | 45 ------------ .../dkg-backend/optimism_test.toml | 49 ------------- config/full-support/dkg-backend/sepolia.toml | 45 ------------ .../full-support/dkg-backend/substrate.toml | 14 ---- .../full-support/mocked-backend/.env.example | 21 ------ .../full-support/mocked-backend/goerli.toml | 73 ------------------- config/full-support/mocked-backend/main.toml | 8 -- .../full-support/mocked-backend/moonbase.toml | 73 ------------------- .../full-support/mocked-backend/mumbai.toml | 73 ------------------- .../mocked-backend/optimism_test.toml | 73 ------------------- .../full-support/mocked-backend/sepolia.toml | 73 ------------------- .../testnet-evm-bridge/.env.example | 21 ------ .../testnet-evm-bridge/goerli.toml | 73 ------------------- .../testnet-evm-bridge/main.toml | 8 -- .../testnet-evm-bridge/moonbase.toml | 73 ------------------- .../testnet-evm-bridge/mumbai.toml | 73 ------------------- .../testnet-evm-bridge/optimism_test.toml | 73 ------------------- .../testnet-evm-bridge/sepolia.toml | 73 ------------------- 31 files changed, 1516 deletions(-) delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/.env.example delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/arbitrum_test.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/goerli.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/main.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/moonbase.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/optimism_test.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/polygon_test.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/rinkeby.toml delete mode 100644 config/exclusive-strategies/testnet-evm-bridge/ropsten.toml delete mode 100644 config/full-support/dkg-backend/.env.example delete mode 100644 config/full-support/dkg-backend/goerli.toml delete mode 100644 config/full-support/dkg-backend/main.toml delete mode 100644 config/full-support/dkg-backend/moonbase.toml delete mode 100644 config/full-support/dkg-backend/mumbai.toml delete mode 100644 config/full-support/dkg-backend/optimism_test.toml delete mode 100644 config/full-support/dkg-backend/sepolia.toml delete mode 100644 config/full-support/dkg-backend/substrate.toml delete mode 100644 config/full-support/mocked-backend/.env.example delete mode 100644 config/full-support/mocked-backend/goerli.toml delete mode 100644 config/full-support/mocked-backend/main.toml delete mode 100644 config/full-support/mocked-backend/moonbase.toml delete mode 100644 config/full-support/mocked-backend/mumbai.toml delete mode 100644 config/full-support/mocked-backend/optimism_test.toml delete mode 100644 config/full-support/mocked-backend/sepolia.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/.env.example delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/goerli.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/main.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/moonbase.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/mumbai.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/optimism_test.toml delete mode 100644 config/mocked-bridge-deployments/testnet-evm-bridge/sepolia.toml diff --git a/config/exclusive-strategies/testnet-evm-bridge/.env.example b/config/exclusive-strategies/testnet-evm-bridge/.env.example deleted file mode 100644 index 4225339ee..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/.env.example +++ /dev/null @@ -1,27 +0,0 @@ -ARBITRUM_TESTNET_HTTPS_URL= -ARBITRUM_TESTNET_WSS_URL= -ARBITRUM_TESTNET_PRIVATE_KEY= - -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -MOONBASE_HTTPS_URL= -MOONBASE_WSS_URL= -MOONBASE_PRIVATE_KEY= - -OPTIMISM_TESTNET_HTTPS_URL= -OPTIMISM_TESTNET_WSS_URL= -OPTIMISM_TESTNET_PRIVATE_KEY= - -POLYGON_TESTNET_HTTPS_URL= -POLYGON_TESTNET_WSS_URL= -POLYGON_TESTNET_PRIVATE_KEY= - -RINKEBY_HTTPS_URL= -RINKEBY_WSS_URL= -RINKEBY_PRIVATE_KEY= - -ROPSTEN_HTTPS_URL= -ROPSTEN_WSS_URL= -ROPSTEN_PRIVATE_KEY= diff --git a/config/exclusive-strategies/testnet-evm-bridge/arbitrum_test.toml b/config/exclusive-strategies/testnet-evm-bridge/arbitrum_test.toml deleted file mode 100644 index c506df090..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/arbitrum_test.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.arbitrumtestnet] -name = "arbitrumtestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$ARBITRUM_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$ARBITRUM_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://rinkeby-explorer.arbitrum.io/#/" -# chain specific id from evm opcode -chain-id = 421613 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $ARBITRUM_TESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh arbitrumtestnet-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$ARBITRUM_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.arbitrumtestnet.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 171869 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" }, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] diff --git a/config/exclusive-strategies/testnet-evm-bridge/goerli.toml b/config/exclusive-strategies/testnet-evm-bridge/goerli.toml deleted file mode 100644 index 0805daad0..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/goerli.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.goerli] -name = "goerli" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$GOERLI_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$GOERLI_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://goerli.etherscan.io" -# chain specific id from evm opcode -chain-id = 5 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $GOERLI_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh goerli-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$GOERLI_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.goerli.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 7471990 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf"}, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] \ No newline at end of file diff --git a/config/exclusive-strategies/testnet-evm-bridge/main.toml b/config/exclusive-strategies/testnet-evm-bridge/main.toml deleted file mode 100644 index 35864c7a8..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/main.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Webb Relayer Network Port -# default: 9955 -port = 9955 - -[features] -governance-relay = false -data-query = true -private-tx-relay = true \ No newline at end of file diff --git a/config/exclusive-strategies/testnet-evm-bridge/moonbase.toml b/config/exclusive-strategies/testnet-evm-bridge/moonbase.toml deleted file mode 100644 index d2691539e..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/moonbase.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.moonbase] -name = "moonbase" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MOONBASE_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MOONBASE_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://moonbase.moonscan.io/" -# chain specific id from evm opcode -chain-id = 1287 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $MOONBASE_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh moonbase-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$MOONBASE_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.moonbase.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 2723239 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07"} -] diff --git a/config/exclusive-strategies/testnet-evm-bridge/optimism_test.toml b/config/exclusive-strategies/testnet-evm-bridge/optimism_test.toml deleted file mode 100644 index 9a8216ae0..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/optimism_test.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.optimismtestnet] -name = "optimismtestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$OPTIMISM_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$OPTIMISM_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://blockscout.com/optimism/goerli/" -# chain specific id from evm opcode -chain-id = 420 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $OPTIMISM_TESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh optimismtestnet-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$OPTIMISM_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.optimismtestnet.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 640396 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] diff --git a/config/exclusive-strategies/testnet-evm-bridge/polygon_test.toml b/config/exclusive-strategies/testnet-evm-bridge/polygon_test.toml deleted file mode 100644 index 1696df554..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/polygon_test.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.polygontestnet] -name = "polygontestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$POLYGON_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$POLYGON_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://mumbai.polygonscan.com/" -# chain specific id from evm opcode -chain-id = 80001 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $POLYGONTESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh polygontestnet-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$POLYGON_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.polygontestnet.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 27776591 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" }, - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] diff --git a/config/exclusive-strategies/testnet-evm-bridge/rinkeby.toml b/config/exclusive-strategies/testnet-evm-bridge/rinkeby.toml deleted file mode 100644 index 997478f1d..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/rinkeby.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.rinkeby] -name = "rinkeby" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$RINKEBY_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$RINKEBY_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://rinkeby.etherscan.io" -# chain specific id from evm opcode -chain-id = 4 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $RINKEBY_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh rinkeby-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$RINKEBY_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.rinkeby.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 11266630 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "ropsten", chain-id = "3", address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" }, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] diff --git a/config/exclusive-strategies/testnet-evm-bridge/ropsten.toml b/config/exclusive-strategies/testnet-evm-bridge/ropsten.toml deleted file mode 100644 index 001356983..000000000 --- a/config/exclusive-strategies/testnet-evm-bridge/ropsten.toml +++ /dev/null @@ -1,60 +0,0 @@ -# Block which represents properties for a network -[evm.ropsten] -name = "ropsten" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$ROPSTEN_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$ROPSTEN_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://ropsten.etherscan.io" -# chain specific id from evm opcode -chain-id = 3 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $ROPSTEN_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh ropsten-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$ROPSTEN_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.ropsten.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x35295fbb71273b84f66e70b8e341d408150dcaf9" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 12864534 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { chain = "arbitrumtestnet", chain-id = "421613", address = "0x91a9a1e76fa609f6ba8fcd718a60b030678765ad" }, - { chain = "rinkeby", chain-id = "4", address = "0x7ae23a95881bf8ab86174e89bd79199f398d19bf" }, - { chain = "goerli", chain-id = "5", address = "0x4e22da303c403daaf4653d3d9d63ef009bae89a6" }, - { chain = "polygontestnet", chain-id = "80001", address = "0xe6b075ecc4ccbc6e66569b1a2984cc47e88ee246" }, - { chain = "optimismtestnet", chain-id = "420", address = "0x12f2c4a1469b035e4459539e38ae68bc4dd5ba07" }, - { chain = "moonbase", chain-id = "1287", address = "0xc6b43568f0c39e3a68b597a3bb54a7b9e4308bf3"} -] diff --git a/config/full-support/dkg-backend/.env.example b/config/full-support/dkg-backend/.env.example deleted file mode 100644 index ea4e9262a..000000000 --- a/config/full-support/dkg-backend/.env.example +++ /dev/null @@ -1,23 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -MOONBASE_HTTPS_URL= -MOONBASE_WSS_URL= -MOONBASE_PRIVATE_KEY= - -OPTIMISM_TESTNET_HTTPS_URL= -OPTIMISM_TESTNET_WSS_URL= -OPTIMISM_TESTNET_PRIVATE_KEY= - -MUMBAI_TESTNET_HTTPS_URL= -MUMBAI_TESTNET_WSS_URL= -MUMBAI_TESTNET_PRIVATE_KEY= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= -SEPOLIA_PRIVATE_KEY= - -MOCKED_BACKEND_KEY= - -TANGLE_WEBB_RELAYER_SURI= \ No newline at end of file diff --git a/config/full-support/dkg-backend/goerli.toml b/config/full-support/dkg-backend/goerli.toml deleted file mode 100644 index 527bd8e2d..000000000 --- a/config/full-support/dkg-backend/goerli.toml +++ /dev/null @@ -1,44 +0,0 @@ -# Block which represents properties for a network -[evm.goerli] -name = "goerli" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$GOERLI_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$GOERLI_WSS_URL" - -explorer = "https://goerli.etherscan.io" -# chain specific id from evm opcode -chain-id = 5 - -block-confirmations = 2 - -private-key = "$GOERLI_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.goerli.contracts]] -contract = "VAnchor" -# The address of the contract -address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" - -deployed-at = 8188267 - -events-watcher = { enabled = true, polling-interval = 15000 } - -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -# proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "tangle" } - -[[evm.goerli.contracts]] -contract = "SignatureBridge" -address = "0x773cf4c29a6f2239b9d6ef821d17ab1d705390b9" - -deployed-at = 8188232 - -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/dkg-backend/main.toml b/config/full-support/dkg-backend/main.toml deleted file mode 100644 index ed9dd37fb..000000000 --- a/config/full-support/dkg-backend/main.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Webb Relayer Network Port -# default: 9955 -port = 9955 - -[features] -governance-relay = true -data-query = true -private-tx-relay = true \ No newline at end of file diff --git a/config/full-support/dkg-backend/moonbase.toml b/config/full-support/dkg-backend/moonbase.toml deleted file mode 100644 index e0eb84717..000000000 --- a/config/full-support/dkg-backend/moonbase.toml +++ /dev/null @@ -1,45 +0,0 @@ -# Block which represents properties for a network -[evm.moonbase] -name = "moonbase" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MOONBASE_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MOONBASE_WSS_URL" - -explorer = "https://moonbase.moonscan.io/" -# chain specific id from evm opcode -chain-id = 1287 - -block-confirmations = 2 - -private-key = "$MOONBASE_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.moonbase.contracts]] - -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" - -deployed-at = 3418157 - -events-watcher = { enabled = true, polling-interval = 15000 } - -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f"} -] -# proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "tangle" } - -[[evm.moonbase.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" - -deployed-at = 3418117 - -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/dkg-backend/mumbai.toml b/config/full-support/dkg-backend/mumbai.toml deleted file mode 100644 index 0a3ca738d..000000000 --- a/config/full-support/dkg-backend/mumbai.toml +++ /dev/null @@ -1,45 +0,0 @@ -# Block which represents properties for a network -[evm.mumbai] -name = "mumbai" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MUMBAI_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MUMBAI_TESTNET_WSS_URL" - -explorer = "https://mumbai.polygonscan.com/" -# chain specific id from evm opcode -chain-id = 80001 - -block-confirmations = 2 - -private-key = "$MUMBAI_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.mumbai.contracts]] - -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" - -deployed-at = 30098018 - -events-watcher = { enabled = true, polling-interval = 15000 } - -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -# proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "tangle" } - -[[evm.mumbai.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" - -deployed-at = 30097933 - -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/dkg-backend/optimism_test.toml b/config/full-support/dkg-backend/optimism_test.toml deleted file mode 100644 index a99836b49..000000000 --- a/config/full-support/dkg-backend/optimism_test.toml +++ /dev/null @@ -1,49 +0,0 @@ -# Block which represents properties for a network -[evm.optimismtestnet] -name = "optimismtestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$OPTIMISM_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$OPTIMISM_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://blockscout.com/optimism/goerli/" -# chain specific id from evm opcode -chain-id = 420 - -block-confirmations = 2 - -private-key = "$OPTIMISM_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.optimismtestnet.contracts]] - -contract = "VAnchor" -# The address of the contract -address = "0x9d36b94f245857ec7280415140800dde7642addb" - -deployed-at = 3706371 - -events-watcher = { enabled = true, polling-interval = 15000 } - -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" } -] -# proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "tangle" } - -[[evm.optimismtestnet.contracts]] -contract = "SignatureBridge" -address = "0x7e627d29de9a9a6aa6e58163d5fdfd6fddfaa268" - -deployed-at = 3706273 - -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/dkg-backend/sepolia.toml b/config/full-support/dkg-backend/sepolia.toml deleted file mode 100644 index b7a05f6c7..000000000 --- a/config/full-support/dkg-backend/sepolia.toml +++ /dev/null @@ -1,45 +0,0 @@ -# Block which represents properties for a network -[evm.sepolia] -name = "sepolia" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$SEPOLIA_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$SEPOLIA_WSS_URL" - -explorer = "https://sepolia.etherscan.io" -# chain specific id from evm opcode -chain-id = 11155111 - -block-confirmations = 2 - -private-key = "$SEPOLIA_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.sepolia.contracts]] - -contract = "VAnchor" -# The address of the contract -address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" - -deployed-at = 2545802 - -events-watcher = { enabled = true, polling-interval = 15000 } - -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -# proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } -proposal-signing-backend = { type = "DKGNode", node = "tangle" } - -[[evm.sepolia.contracts]] -contract = "SignatureBridge" -address = "0xc99aea79d36227ff5760372f56d37f683954bc2a" - -deployed-at = 2478538 - -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/dkg-backend/substrate.toml b/config/full-support/dkg-backend/substrate.toml deleted file mode 100644 index 8cebdc951..000000000 --- a/config/full-support/dkg-backend/substrate.toml +++ /dev/null @@ -1,14 +0,0 @@ -[substrate.tangle] -name = "tangle" -enabled = true -http-endpoint = "http://tangle_parachain:9933" -ws-endpoint = "ws://tangle_parachain:9944" -runtime = "DKG" -suri = "$TANGLE_WEBB_RELAYER_SURI" -chain-id = "1080" -[[substrate.tangle.pallets]] -pallet = "DKG" -events-watcher = { enabled = false, polling-interval = 12000, print-progress-interval = 60000 } -[[substrate.tangle.pallets]] -pallet = "DKGProposalHandler" -events-watcher = { enabled = false, polling-interval = 12000, print-progress-interval = 60000 } \ No newline at end of file diff --git a/config/full-support/mocked-backend/.env.example b/config/full-support/mocked-backend/.env.example deleted file mode 100644 index 899115598..000000000 --- a/config/full-support/mocked-backend/.env.example +++ /dev/null @@ -1,21 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -MOONBASE_HTTPS_URL= -MOONBASE_WSS_URL= -MOONBASE_PRIVATE_KEY= - -OPTIMISM_TESTNET_HTTPS_URL= -OPTIMISM_TESTNET_WSS_URL= -OPTIMISM_TESTNET_PRIVATE_KEY= - -MUMBAI_TESTNET_HTTPS_URL= -MUMBAI_TESTNET_WSS_URL= -MUMBAI_TESTNET_PRIVATE_KEY= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= -SEPOLIA_PRIVATE_KEY= - -MOCKED_BACKEND_KEY= \ No newline at end of file diff --git a/config/full-support/mocked-backend/goerli.toml b/config/full-support/mocked-backend/goerli.toml deleted file mode 100644 index 031570ba5..000000000 --- a/config/full-support/mocked-backend/goerli.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.goerli] -name = "goerli" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$GOERLI_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$GOERLI_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://goerli.etherscan.io" -# chain specific id from evm opcode -chain-id = 5 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $GOERLI_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh goerli-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$GOERLI_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.goerli.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 8188267 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.goerli.contracts]] -contract = "SignatureBridge" -address = "0x773cf4c29a6f2239b9d6ef821d17ab1d705390b9" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 8188232 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/mocked-backend/main.toml b/config/full-support/mocked-backend/main.toml deleted file mode 100644 index ed9dd37fb..000000000 --- a/config/full-support/mocked-backend/main.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Webb Relayer Network Port -# default: 9955 -port = 9955 - -[features] -governance-relay = true -data-query = true -private-tx-relay = true \ No newline at end of file diff --git a/config/full-support/mocked-backend/moonbase.toml b/config/full-support/mocked-backend/moonbase.toml deleted file mode 100644 index f58bc07e5..000000000 --- a/config/full-support/mocked-backend/moonbase.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.moonbase] -name = "moonbase" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MOONBASE_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MOONBASE_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://moonbase.moonscan.io/" -# chain specific id from evm opcode -chain-id = 1287 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $MOONBASE_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh moonbase-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$MOONBASE_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.moonbase.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3418157 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.moonbase.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3418117 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/mocked-backend/mumbai.toml b/config/full-support/mocked-backend/mumbai.toml deleted file mode 100644 index 31737dec7..000000000 --- a/config/full-support/mocked-backend/mumbai.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.mumbai] -name = "mumbai" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MUMBAI_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MUMBAI_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://mumbai.polygonscan.com/" -# chain specific id from evm opcode -chain-id = 80001 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $POLYGONTESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh mumbai-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$MUMBAI_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.mumbai.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 30098018 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.mumbai.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 30097933 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/mocked-backend/optimism_test.toml b/config/full-support/mocked-backend/optimism_test.toml deleted file mode 100644 index e40edb947..000000000 --- a/config/full-support/mocked-backend/optimism_test.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.optimismtestnet] -name = "optimismtestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$OPTIMISM_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$OPTIMISM_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://blockscout.com/optimism/goerli/" -# chain specific id from evm opcode -chain-id = 420 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $OPTIMISM_TESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh optimismtestnet-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$OPTIMISM_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.optimismtestnet.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x9d36b94f245857ec7280415140800dde7642addb" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3706371 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.optimismtestnet.contracts]] -contract = "SignatureBridge" -address = "0x7e627d29de9a9a6aa6e58163d5fdfd6fddfaa268" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3706273 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/full-support/mocked-backend/sepolia.toml b/config/full-support/mocked-backend/sepolia.toml deleted file mode 100644 index 478f58109..000000000 --- a/config/full-support/mocked-backend/sepolia.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.sepolia] -name = "sepolia" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$SEPOLIA_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$SEPOLIA_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://sepolia.etherscan.io" -# chain specific id from evm opcode -chain-id = 11155111 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $SEPOLIA_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh ropsten-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$SEPOLIA_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.sepolia.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 2545802 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.sepolia.contracts]] -contract = "SignatureBridge" -address = "0xc99aea79d36227ff5760372f56d37f683954bc2a" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 2478538 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/.env.example b/config/mocked-bridge-deployments/testnet-evm-bridge/.env.example deleted file mode 100644 index 899115598..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/.env.example +++ /dev/null @@ -1,21 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -MOONBASE_HTTPS_URL= -MOONBASE_WSS_URL= -MOONBASE_PRIVATE_KEY= - -OPTIMISM_TESTNET_HTTPS_URL= -OPTIMISM_TESTNET_WSS_URL= -OPTIMISM_TESTNET_PRIVATE_KEY= - -MUMBAI_TESTNET_HTTPS_URL= -MUMBAI_TESTNET_WSS_URL= -MUMBAI_TESTNET_PRIVATE_KEY= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= -SEPOLIA_PRIVATE_KEY= - -MOCKED_BACKEND_KEY= \ No newline at end of file diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/goerli.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/goerli.toml deleted file mode 100644 index 031570ba5..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/goerli.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.goerli] -name = "goerli" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$GOERLI_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$GOERLI_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://goerli.etherscan.io" -# chain specific id from evm opcode -chain-id = 5 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $GOERLI_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh goerli-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$GOERLI_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.goerli.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 8188267 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.goerli.contracts]] -contract = "SignatureBridge" -address = "0x773cf4c29a6f2239b9d6ef821d17ab1d705390b9" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 8188232 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/main.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/main.toml deleted file mode 100644 index ed9dd37fb..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/main.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Webb Relayer Network Port -# default: 9955 -port = 9955 - -[features] -governance-relay = true -data-query = true -private-tx-relay = true \ No newline at end of file diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/moonbase.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/moonbase.toml deleted file mode 100644 index f58bc07e5..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/moonbase.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.moonbase] -name = "moonbase" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MOONBASE_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MOONBASE_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://moonbase.moonscan.io/" -# chain specific id from evm opcode -chain-id = 1287 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $MOONBASE_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh moonbase-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$MOONBASE_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.moonbase.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3418157 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.moonbase.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3418117 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/mumbai.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/mumbai.toml deleted file mode 100644 index 31737dec7..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/mumbai.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.mumbai] -name = "mumbai" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$MUMBAI_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$MUMBAI_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://mumbai.polygonscan.com/" -# chain specific id from evm opcode -chain-id = 80001 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $POLYGONTESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh mumbai-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$MUMBAI_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.mumbai.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 30098018 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.mumbai.contracts]] -contract = "SignatureBridge" -address = "0x206b293e2bc9e81d6af554a4302529d58eef7de7" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 30097933 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/optimism_test.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/optimism_test.toml deleted file mode 100644 index e40edb947..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/optimism_test.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.optimismtestnet] -name = "optimismtestnet" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$OPTIMISM_TESTNET_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$OPTIMISM_TESTNET_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://blockscout.com/optimism/goerli/" -# chain specific id from evm opcode -chain-id = 420 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $OPTIMISM_TESTNET_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh optimismtestnet-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$OPTIMISM_TESTNET_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.optimismtestnet.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0x9d36b94f245857ec7280415140800dde7642addb" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3706371 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "sepolia", chain-id = 11155111, address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.optimismtestnet.contracts]] -contract = "SignatureBridge" -address = "0x7e627d29de9a9a6aa6e58163d5fdfd6fddfaa268" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 3706273 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } diff --git a/config/mocked-bridge-deployments/testnet-evm-bridge/sepolia.toml b/config/mocked-bridge-deployments/testnet-evm-bridge/sepolia.toml deleted file mode 100644 index 478f58109..000000000 --- a/config/mocked-bridge-deployments/testnet-evm-bridge/sepolia.toml +++ /dev/null @@ -1,73 +0,0 @@ -# Block which represents properties for a network -[evm.sepolia] -name = "sepolia" -# Http(s) Endpoint for quick Req/Res -http-endpoint = "$SEPOLIA_HTTPS_URL" -# Websocket Endpoint for long living connections -ws-endpoint = "$SEPOLIA_WSS_URL" -# Block Explorer -# Optinal, and used for generating clickable links -# for transactions that happen on this chain. -explorer = "https://sepolia.etherscan.io" -# chain specific id from evm opcode -chain-id = 11155111 - -block-confirmations = 2 -# The Private Key of this account on this network -# the format is more dynamic here: -# 1. if it starts with '0x' then this would be raw (64 bytes) hex encoded -# private key. -# Example: 0x8917174396171783496173419137618235192359106130478137647163400318 -# -# 2. if it starts with '$' then it would be considered as an Enviroment variable -# of a hex-encoded private key. -# Example: $SEPOLIA_PRIVATE_KEY -# -# 3. if it starts with '> ' then it would be considered as a command that -# the relayer would execute and the output of this command would be the -# hex encoded private key. -# Example: > ./getKey.sh ropsten-privatekey -# -# 4. if it doesn't contains special characters and has 12 or 24 words in it -# then we should process it as a mnemonic string: 'word two three four ...' -private-key = "$SEPOLIA_PRIVATE_KEY" -# Value to indicate that the relayer should enable services for this chain -enabled = true - -# Block which represents the configuration for a supported contract on the network -[[evm.sepolia.contracts]] -# The contract can be one of these values -# - VAnchor (Variable Anchor) -# - SignatureBridge -contract = "VAnchor" -# The address of the contract -address = "0xb2d1d8d651c53a00e13ea0a363aab575a6886391" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 2545802 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 15000 } -# Entries for this anchor contract's connected edges. -# These fields are used to determine the generation of AnchorUpdate proposals -linked-anchors = [ - { type = "Evm", chain = "goerli", chain-id = 5, address = "0x3a4233bf223622f6571b8543498a62b9e2a3b31f" }, - { type = "Evm", chain = "optimismtestnet", chain-id = 420, address = "0x9d36b94f245857ec7280415140800dde7642addb" }, - { type = "Evm", chain = "mumbai", chain-id = 80001, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026" }, - { type = "Evm", chain = "moonbase", chain-id = 1287, address = "0xda27349ee55e7c91e1b521ece4c3dcc390383026"} -] -proposal-signing-backend = { type = "Mocked", private-key = "$MOCKED_BACKEND_KEY" } - -[[evm.sepolia.contracts]] -contract = "SignatureBridge" -address = "0xc99aea79d36227ff5760372f56d37f683954bc2a" -# The deployed block number of the contract. When a relayer does not have information for -# this contract in its store, it will start to sync and query for relevant historical data -# starting at this block number -deployed-at = 2478538 -# Configuration for the events watcher of this contract. The events-watcher can be switched on/off -# and the polling interval specifies the period of time (in ms) that the events-watcher thread -# will wait before issuing another query for new events. -events-watcher = { enabled = true, polling-interval = 45000, print-progress-interval = 0 } From 96e59f1d417c067824a8058b9ca13b3b5e45dcb0 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 18:59:22 +0200 Subject: [PATCH 15/27] fix block header relay config --- config/block-header-relay/.env.example | 11 +++++++++++ .../eth2-networks/ethereum-mainnet.toml | 6 ++++-- config/block-header-relay/eth2-networks/goerli.toml | 5 +++-- config/block-header-relay/eth2-networks/main.toml | 8 ++++++++ config/block-header-relay/eth2-networks/sepolia.toml | 5 +++-- 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 config/block-header-relay/.env.example create mode 100644 config/block-header-relay/eth2-networks/main.toml diff --git a/config/block-header-relay/.env.example b/config/block-header-relay/.env.example new file mode 100644 index 000000000..c88fb37f3 --- /dev/null +++ b/config/block-header-relay/.env.example @@ -0,0 +1,11 @@ +GOERLI_HTTP_URL=https://example.com +GOERLI_WS_URL=wss://example.com +GOERLI_LIGHT_CLIENT_RPC_URL=https://example.com + +SEPOLIA_HTTP_URL=https://example.com +SEPOLIA_WS_URL=wss://example.com +SEPOLIA_LIGHT_CLIENT_RPC_URL=https://example.com + +ETHEREUM_MAINNET_HTTP_URL=https://example.com +ETHEREUM_MAINNET_WS_URL=ws://example.com +ETHEREUM_MAINNET_LIGHT_CLIENT_RPC_URL=https://example.com diff --git a/config/block-header-relay/eth2-networks/ethereum-mainnet.toml b/config/block-header-relay/eth2-networks/ethereum-mainnet.toml index 38a37c079..88f33110d 100644 --- a/config/block-header-relay/eth2-networks/ethereum-mainnet.toml +++ b/config/block-header-relay/eth2-networks/ethereum-mainnet.toml @@ -1,5 +1,5 @@ [evm.mainnet] -enabled=false +enabled = false # The name that the chain is indexed on, for linkable anchors name = "ethereum-mainnet" # Http(s) Endpoint for quick Req/Res @@ -9,6 +9,8 @@ ws-endpoint = "$ETHEREUM_MAINNET_WS_URL" # chain specific id from evm opcode chain-id = 1 +block-confirmations = 10 + [evm.mainnet.block-poller] # The starting block to listen at. start-block = 15697112 @@ -19,4 +21,4 @@ max-blocks-per-step = 1 # The print progress interval. print-progress-interval = 60_000 # Light client RPC url -light-client-rpc-url = "$ETHEREUM_MAINNET_LIGHT_CLIENT_RPC_URL" \ No newline at end of file +light-client-rpc-url = "$ETHEREUM_MAINNET_LIGHT_CLIENT_RPC_URL" diff --git a/config/block-header-relay/eth2-networks/goerli.toml b/config/block-header-relay/eth2-networks/goerli.toml index ef7101764..67916266e 100644 --- a/config/block-header-relay/eth2-networks/goerli.toml +++ b/config/block-header-relay/eth2-networks/goerli.toml @@ -1,5 +1,5 @@ [evm.goerli] -enabled=true +enabled = true # The name that the chain is indexed on, for linkable anchors name = "goerli-testnet" # Http(s) Endpoint for quick Req/Res @@ -8,6 +8,7 @@ http-endpoint = "$GOERLI_HTTP_URL" ws-endpoint = "$GOERLI_WS_URL" # chain specific id from evm opcode chain-id = 5002 +block-confirmations = 10 [evm.goerli.block-poller] # The starting block to listen at. @@ -19,4 +20,4 @@ max-blocks-per-step = 1 # The print progress interval. print-progress-interval = 60_000 # Light client RPC url -light-client-rpc-url = "$GOERLI_LIGHT_CLIENT_RPC_URL" \ No newline at end of file +light-client-rpc-url = "$GOERLI_LIGHT_CLIENT_RPC_URL" diff --git a/config/block-header-relay/eth2-networks/main.toml b/config/block-header-relay/eth2-networks/main.toml new file mode 100644 index 000000000..c1383c114 --- /dev/null +++ b/config/block-header-relay/eth2-networks/main.toml @@ -0,0 +1,8 @@ +# Webb Relayer Network Port +# default: 9955 +port = 9955 + +[features] +governance-relay = false +data-query = true +private-tx-relay = false diff --git a/config/block-header-relay/eth2-networks/sepolia.toml b/config/block-header-relay/eth2-networks/sepolia.toml index c166597d7..56b5d8322 100644 --- a/config/block-header-relay/eth2-networks/sepolia.toml +++ b/config/block-header-relay/eth2-networks/sepolia.toml @@ -1,5 +1,5 @@ [evm.sepolia] -enabled=true +enabled = true # The name that the chain is indexed on, for linkable anchors name = "sepolia-testnet" # Http(s) Endpoint for quick Req/Res @@ -8,6 +8,7 @@ http-endpoint = "$SEPOLIA_HTTP_URL" ws-endpoint = "$SEPOLIA_WS_URL" # chain specific id from evm opcode chain-id = 11155111 +block-confirmations = 10 [evm.sepolia.block-poller] # The starting block to listen at. @@ -19,4 +20,4 @@ max-blocks-per-step = 1 # The print progress interval. print-progress-interval = 60_000 # Light client RPC url -light-client-rpc-url = "$GOERLI_LIGHT_CLIENT_RPC_URL" \ No newline at end of file +light-client-rpc-url = "$GOERLI_LIGHT_CLIENT_RPC_URL" From 5631457f56bd4f9b23616f15850746a2b2978425 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 18:59:42 +0200 Subject: [PATCH 16/27] update env in the examples with correct values --- config/example/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/example/.env.example b/config/example/.env.example index bf63d6bd3..57c99677d 100644 --- a/config/example/.env.example +++ b/config/example/.env.example @@ -1,2 +1,2 @@ # Private Key that will be used cross different chains -PRIVATE_KEY="0xYOUR_PRIVATE_KEY" +PRIVATE_KEY="0x0000000000000000000000000000000000000000000000000000000000000000" From 4264e26164215cc7fb6e6aed3c1a122ec4b101b6 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 19:00:02 +0200 Subject: [PATCH 17/27] move example env to the top directory --- config/exclusive-strategies/.env.example | 19 +++++++++++++++++++ .../data-querying/.env.example | 5 ----- .../private-tx-relaying/.env.example | 7 ------- .../signature-relaying/.env.example | 13 ------------- 4 files changed, 19 insertions(+), 25 deletions(-) create mode 100644 config/exclusive-strategies/.env.example delete mode 100644 config/exclusive-strategies/data-querying/.env.example delete mode 100644 config/exclusive-strategies/private-tx-relaying/.env.example delete mode 100644 config/exclusive-strategies/signature-relaying/.env.example diff --git a/config/exclusive-strategies/.env.example b/config/exclusive-strategies/.env.example new file mode 100644 index 000000000..695268806 --- /dev/null +++ b/config/exclusive-strategies/.env.example @@ -0,0 +1,19 @@ +EXAMPLE_HTTPS_URL=https://example.com +EXAMPLE_WSS_URL=wss://example.com +EXAMPLE_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 + +GOERLI_HTTPS_URL=${EXAMPLE_HTTPS_URL} +GOERLI_WSS_URL=${EXAMPLE_WSS_URL} +GOERLI_PRIVATE_KEY=${EXAMPLE_PRIVATE_KEY} + +SEPOLIA_HTTPS_URL=${EXAMPLE_HTTPS_URL} +SEPOLIA_WSS_URL=${EXAMPLE_WSS_URL} +SEPOLIA_PRIVATE_KEY=${EXAMPLE_PRIVATE_KEY} + +OPTIMISM_TESTNET_HTTPS_URL=${EXAMPLE_HTTPS_URL} +OPTIMISM_TESTNET_WSS_URL=${EXAMPLE_WSS_URL} +OPTIMISM_TESTNET_PRIVATE_KEY=${EXAMPLE_PRIVATE_KEY} + + + +MOCKED_BACKEND_KEY=${EXAMPLE_PRIVATE_KEY} diff --git a/config/exclusive-strategies/data-querying/.env.example b/config/exclusive-strategies/data-querying/.env.example deleted file mode 100644 index feb41f6b6..000000000 --- a/config/exclusive-strategies/data-querying/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= diff --git a/config/exclusive-strategies/private-tx-relaying/.env.example b/config/exclusive-strategies/private-tx-relaying/.env.example deleted file mode 100644 index bfe032d99..000000000 --- a/config/exclusive-strategies/private-tx-relaying/.env.example +++ /dev/null @@ -1,7 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= -SEPOLIA_PRIVATE_KEY= \ No newline at end of file diff --git a/config/exclusive-strategies/signature-relaying/.env.example b/config/exclusive-strategies/signature-relaying/.env.example deleted file mode 100644 index 3b97c029f..000000000 --- a/config/exclusive-strategies/signature-relaying/.env.example +++ /dev/null @@ -1,13 +0,0 @@ -GOERLI_HTTPS_URL= -GOERLI_WSS_URL= -GOERLI_PRIVATE_KEY= - -SEPOLIA_HTTPS_URL= -SEPOLIA_WSS_URL= -SEPOLIA_PRIVATE_KEY= - -OPTIMISM_TESTNET_HTTPS_URL= -OPTIMISM_TESTNET_WSS_URL= -OPTIMISM_TESTNET_PRIVATE_KEY= - -MOCKED_BACKEND_KEY= \ No newline at end of file From 653304507ddd98ed46d7edd7f9cbd5af34c70a1b Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 19:00:21 +0200 Subject: [PATCH 18/27] Update development configs --- config/development/.env.example | 7 +++ config/development/evm-blanknet/.env.example | 11 ---- config/development/evm-blanknet/athena.toml | 4 +- config/development/evm-blanknet/demeter.toml | 4 +- config/development/evm-blanknet/hermes.toml | 4 +- .../development/evm-local-tangle/.env.example | 25 --------- .../development/evm-local-tangle/athena.json | 55 +++++++++++++++++++ .../development/evm-local-tangle/athena.toml | 1 - .../development/evm-local-tangle/demeter.json | 55 +++++++++++++++++++ .../development/evm-local-tangle/demeter.toml | 1 - .../development/evm-local-tangle/hermes.json | 55 +++++++++++++++++++ .../development/evm-local-tangle/hermes.toml | 1 - .../substrate-local/substrate.toml | 1 + 13 files changed, 179 insertions(+), 45 deletions(-) create mode 100644 config/development/.env.example delete mode 100644 config/development/evm-blanknet/.env.example delete mode 100644 config/development/evm-local-tangle/.env.example create mode 100644 config/development/evm-local-tangle/athena.json delete mode 120000 config/development/evm-local-tangle/athena.toml create mode 100644 config/development/evm-local-tangle/demeter.json delete mode 120000 config/development/evm-local-tangle/demeter.toml create mode 100644 config/development/evm-local-tangle/hermes.json delete mode 120000 config/development/evm-local-tangle/hermes.toml diff --git a/config/development/.env.example b/config/development/.env.example new file mode 100644 index 000000000..08db790de --- /dev/null +++ b/config/development/.env.example @@ -0,0 +1,7 @@ + +PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 +HERMES_PRIVATE_KEY=${PRIVATE_KEY} +ATHENA_PRIVATE_KEY=${PRIVATE_KEY} +DEMETER_PRIVATE_KEY=${PRIVATE_KEY} + +GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 diff --git a/config/development/evm-blanknet/.env.example b/config/development/evm-blanknet/.env.example deleted file mode 100644 index 2b62d3343..000000000 --- a/config/development/evm-blanknet/.env.example +++ /dev/null @@ -1,11 +0,0 @@ -HERMES_HTTP_URL=http://localhost:5001 -HERMES_WS_URL=ws://localhost:5001 -ATHENA_HTTP_URL=http://localhost:5002 -ATHENA_WS_URL=ws://localhost:5002 -DEMETER_HTTP_URL=http://localhost:5003 -DEMETER_WS_URL=ws://localhost:5003 - -HERMES_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -ATHENA_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -DEMETER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 -GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 diff --git a/config/development/evm-blanknet/athena.toml b/config/development/evm-blanknet/athena.toml index 8ebe05577..b47443198 100644 --- a/config/development/evm-blanknet/athena.toml +++ b/config/development/evm-blanknet/athena.toml @@ -3,9 +3,9 @@ # The name that the chain is indexed on, for linkable anchors name = "athena" # Http(s) Endpoint for quick Req/Res -http-endpoint = "$ATHENA_HTTP_URL" +http-endpoint = "http://localhost:5002" # Websocket Endpoint for long living connections -ws-endpoint = "$ATHENA_WS_URL" +ws-endpoint = "ws://localhost:5002" # chain specific id from evm opcode chain-id = 5002 # The Private Key of this account on this network diff --git a/config/development/evm-blanknet/demeter.toml b/config/development/evm-blanknet/demeter.toml index d2aab9d8b..683a09116 100644 --- a/config/development/evm-blanknet/demeter.toml +++ b/config/development/evm-blanknet/demeter.toml @@ -3,9 +3,9 @@ # The name that the chain is indexed on, for linkable anchors name = "demeter" # Http(s) Endpoint for quick Req/Res -http-endpoint = "$DEMETER_HTTP_URL" +http-endpoint = "http://localhost:5003" # Websocket Endpoint for long living connections -ws-endpoint = "$DEMETER_WS_URL" +ws-endpoint = "ws://localhost:5003" # chain specific id from evm opcode chain-id = 5003 # The Private Key of this account on this network diff --git a/config/development/evm-blanknet/hermes.toml b/config/development/evm-blanknet/hermes.toml index 73d269118..a8836c198 100644 --- a/config/development/evm-blanknet/hermes.toml +++ b/config/development/evm-blanknet/hermes.toml @@ -3,9 +3,9 @@ # The name that the chain is indexed on, for linkable anchors name = "hermes" # Http(s) Endpoint for quick Req/Res -http-endpoint = "$HERMES_HTTP_URL" +http-endpoint = "http://localhost:5001" # Websocket Endpoint for long living connections -ws-endpoint = "$HERMES_WS_URL" +ws-endpoint = "ws://localhost:5001" # chain specific id from evm opcode chain-id = 5001 # The Private Key of this account on this network diff --git a/config/development/evm-local-tangle/.env.example b/config/development/evm-local-tangle/.env.example deleted file mode 100644 index 19c57e9e5..000000000 --- a/config/development/evm-local-tangle/.env.example +++ /dev/null @@ -1,25 +0,0 @@ -HERMES_HTTP_URL=http://localhost:5001 -HERMES_WS_URL=ws://localhost:5001 -ATHENA_HTTP_URL=http://localhost:5002 -ATHENA_WS_URL=ws://localhost:5002 -DEMETER_HTTP_URL=http://localhost:5003 -DEMETER_WS_URL=ws://localhost:5003 - -PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 - -HERMES_PRIVATE_KEY=${PRIVATE_KEY} -ATHENA_PRIVATE_KEY=${PRIVATE_KEY} -DEMETER_PRIVATE_KEY=${PRIVATE_KEY} - -GOVERNOR_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000001 - -# Configure the chains to use the tangle network as a signing backend - -WEBB_EVM_HERMES_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" -WEBB_EVM_HERMES_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" - -WEBB_EVM_ATHENA_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" -WEBB_EVM_ATHENA_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" - -WEBB_EVM_DEMETER_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_TYPE="DKGNode" -WEBB_EVM_DEMETER_CONTRACTS_0_PROPOSAL_SIGNING_BACKEND_NODE="1080" diff --git a/config/development/evm-local-tangle/athena.json b/config/development/evm-local-tangle/athena.json new file mode 100644 index 000000000..5fba17710 --- /dev/null +++ b/config/development/evm-local-tangle/athena.json @@ -0,0 +1,55 @@ +{ + "evm": { + "athena": { + "name": "athena", + "http-endpoint": "http://localhost:5002", + "ws-endpoint": "ws://localhost:5002", + "chain-id": 5002, + "private-key": "$ATHENA_PRIVATE_KEY", + "tx-queue": { + "max-sleep-interval": 1500 + }, + "enabled": true, + "contracts": [ + { + "contract": "VAnchor", + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 1000, + "print-progress-interval": 60000 + }, + "linked-anchors": [ + { + "type": "Evm", + "chain": "hermes", + "chain-id": 5001, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + }, + { + "type": "Evm", + "chain": "demeter", + "chain-id": 5003, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + } + ], + "proposal-signing-backend": { + "type": "DKGNode", + "node": "1080" + } + }, + { + "contract": "SignatureBridge", + "address": "0xf2e246bb76df876cef8b38ae84130f4f55de395b", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 1000, + "print-progress-interval": 60000 + } + } + ] + } + } +} diff --git a/config/development/evm-local-tangle/athena.toml b/config/development/evm-local-tangle/athena.toml deleted file mode 120000 index 67e55e23f..000000000 --- a/config/development/evm-local-tangle/athena.toml +++ /dev/null @@ -1 +0,0 @@ -../evm-blanknet/athena.toml \ No newline at end of file diff --git a/config/development/evm-local-tangle/demeter.json b/config/development/evm-local-tangle/demeter.json new file mode 100644 index 000000000..95747a12d --- /dev/null +++ b/config/development/evm-local-tangle/demeter.json @@ -0,0 +1,55 @@ +{ + "evm": { + "demeter": { + "name": "demeter", + "http-endpoint": "http://localhost:5003", + "ws-endpoint": "ws://localhost:5003", + "chain-id": 5003, + "private-key": "$DEMETER_PRIVATE_KEY", + "tx-queue": { + "max-sleep-interval": 1500 + }, + "enabled": true, + "contracts": [ + { + "contract": "VAnchor", + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 10000, + "print-progress-interval": 0 + }, + "linked-anchors": [ + { + "type": "Evm", + "chain": "hermes", + "chain-id": 5001, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + }, + { + "type": "Evm", + "chain": "athena", + "chain-id": 5002, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + } + ], + "proposal-signing-backend": { + "type": "DKGNode", + "node": "1080" + } + }, + { + "contract": "SignatureBridge", + "address": "0xf2e246bb76df876cef8b38ae84130f4f55de395b", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 10000, + "print-progress-interval": 0 + } + } + ] + } + } +} diff --git a/config/development/evm-local-tangle/demeter.toml b/config/development/evm-local-tangle/demeter.toml deleted file mode 120000 index 661c9260d..000000000 --- a/config/development/evm-local-tangle/demeter.toml +++ /dev/null @@ -1 +0,0 @@ -../evm-blanknet/demeter.toml \ No newline at end of file diff --git a/config/development/evm-local-tangle/hermes.json b/config/development/evm-local-tangle/hermes.json new file mode 100644 index 000000000..812a53a28 --- /dev/null +++ b/config/development/evm-local-tangle/hermes.json @@ -0,0 +1,55 @@ +{ + "evm": { + "hermes": { + "name": "hermes", + "http-endpoint": "http://localhost:5001", + "ws-endpoint": "ws://localhost:5001", + "chain-id": 5001, + "private-key": "$HERMES_PRIVATE_KEY", + "tx-queue": { + "max-sleep-interval": 1500 + }, + "enabled": true, + "contracts": [ + { + "contract": "VAnchor", + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 1000, + "print-progress-interval": 60000 + }, + "linked-anchors": [ + { + "type": "Evm", + "chain": "athena", + "chain-id": 5002, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + }, + { + "type": "Evm", + "chain": "demeter", + "chain-id": 5003, + "address": "0x6595b34ED0a270B10a586FC1EA22030A95386f1e" + } + ], + "proposal-signing-backend": { + "type": "DKGNode", + "node": "1080" + } + }, + { + "contract": "SignatureBridge", + "address": "0xf2e246bb76df876cef8b38ae84130f4f55de395b", + "deployed-at": 1, + "events-watcher": { + "enabled": true, + "polling-interval": 1000, + "print-progress-interval": 60000 + } + } + ] + } + } +} diff --git a/config/development/evm-local-tangle/hermes.toml b/config/development/evm-local-tangle/hermes.toml deleted file mode 120000 index 9144ec864..000000000 --- a/config/development/evm-local-tangle/hermes.toml +++ /dev/null @@ -1 +0,0 @@ -../evm-blanknet/hermes.toml \ No newline at end of file diff --git a/config/development/substrate-local/substrate.toml b/config/development/substrate-local/substrate.toml index be4329003..a84564ff5 100644 --- a/config/development/substrate-local/substrate.toml +++ b/config/development/substrate-local/substrate.toml @@ -2,6 +2,7 @@ port = 9955 [substrate.local] name = "local" +chain-id = 1080 enabled = true http-endpoint = "http://localhost:9933" ws-endpoint = "ws://localhost:9944" From 1d301d14b2f69773a64baead5cf3d0a39f126b94 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 19:00:53 +0200 Subject: [PATCH 19/27] add default value for block confirmations to be zero --- crates/relayer-config/src/evm/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/relayer-config/src/evm/mod.rs b/crates/relayer-config/src/evm/mod.rs index 64ff35a65..d4b1bf3f7 100644 --- a/crates/relayer-config/src/evm/mod.rs +++ b/crates/relayer-config/src/evm/mod.rs @@ -25,7 +25,7 @@ pub struct EvmChainConfig { #[serde(skip_serializing)] pub ws_endpoint: RpcUrl, /// Block confirmations - #[serde(skip_serializing)] + #[serde(skip_serializing, default)] pub block_confirmations: u32, /// Block Explorer for this chain. /// From 596cfd406a0c1fe6aee16900534b91404dce1f28 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 19:01:20 +0200 Subject: [PATCH 20/27] add test to check config files that are correct and always up to date --- Cargo.lock | 1 + crates/relayer-config/Cargo.toml | 12 +++----- crates/relayer-config/src/lib.rs | 51 ++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 433a978ec..e352b59c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8196,6 +8196,7 @@ dependencies = [ "anyhow", "config", "directories-next", + "dotenv", "eth2_to_substrate_relay", "ethereum-types 0.14.1", "glob", diff --git a/crates/relayer-config/Cargo.toml b/crates/relayer-config/Cargo.toml index b4ee2e992..89392c88a 100644 --- a/crates/relayer-config/Cargo.toml +++ b/crates/relayer-config/Cargo.toml @@ -34,16 +34,12 @@ structopt = { version = "^0.3", features = ["paw"], optional = true } directories-next = { version = "^2.0", optional = true } tracing-subscriber = { version = "0.3.16", features = ["parking_lot", "env-filter"], optional = true } +[dev-dependencies] +dotenv = { workspace = true } + [features] default = ["evm-runtime", "substrate-runtime", "cli"] -cli = [ - "evm-runtime", - "substrate-runtime", - "anyhow", - "tracing-subscriber", - "structopt", - "directories-next" -] +cli = ["evm-runtime", "substrate-runtime", "anyhow", "tracing-subscriber", "structopt", "directories-next"] evm-runtime = ["webb/evm-runtime", "webb-proposals/evm"] substrate-runtime = ["webb/substrate-runtime", "webb-proposals/substrate"] integration-tests = ["tracing-subscriber/json"] diff --git a/crates/relayer-config/src/lib.rs b/crates/relayer-config/src/lib.rs index 89cf7606e..fe231ccc7 100644 --- a/crates/relayer-config/src/lib.rs +++ b/crates/relayer-config/src/lib.rs @@ -190,3 +190,54 @@ impl Default for TxQueueConfig { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn all_config_files_are_correct() { + // This test is to make sure that all the config files are correct. + // This walks all the directories inside the root of the config directory + // and tries to parse the config file(s) inside it. + + let git_root = std::process::Command::new("git") + .args(["rev-parse", "--show-toplevel"]) + .output() + .expect("Failed to get git root") + .stdout; + let git_root = std::str::from_utf8(&git_root) + .expect("Failed to parse git root") + .trim(); + let config_dir = std::path::Path::new(git_root).join("config"); + let config_dirs = + glob::glob(config_dir.join("**").join("**").to_str().unwrap()) + .expect("Failed to read config directory") + .filter_map(|p| p.ok()) + .filter(|p| p.is_dir()) + .collect::>(); + assert!( + !config_dirs.is_empty(), + "No config directories found in the config directory" + ); + let cwd = + std::env::current_dir().expect("Failed to get current directory"); + // For each config directory, we try to parse the config file(s) inside it. + for config_subdir in config_dirs { + std::env::set_current_dir(&config_subdir) + .expect("Failed to set current directory"); + // Load the example dot env file. + let _ = dotenv::from_filename(".env.example"); + if let Err(e) = utils::load(&config_subdir) { + panic!("Failed to parse config file in directory: {config_subdir:?} with error: {e}"); + } + + dotenv::vars().for_each(|(k, _)| { + std::env::remove_var(k); + }); + + std::env::set_current_dir(&cwd) + .expect("Failed to set current directory"); + } + } +} From 37103dd9e2122e21b04a2e7560e82d32d97ecebd Mon Sep 17 00:00:00 2001 From: shekohex Date: Thu, 16 Mar 2023 19:02:24 +0200 Subject: [PATCH 21/27] Update config/README.md Co-authored-by: Dustin Brickwood --- config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/README.md b/config/README.md index 68ae51a94..142892cb2 100644 --- a/config/README.md +++ b/config/README.md @@ -119,7 +119,7 @@ private-tx-relay = true ##### governance-relay Enable or disable the governance-relay feature. Enabling this feature will allow the relayer to -relay proposals and votes on them between the chains. +relay proposals and vote on them between the chains. - Type: `bool` - Required: `false` From 85ab268d6642819b1f254025cea2ac1eb341dd9b Mon Sep 17 00:00:00 2001 From: shekohex Date: Thu, 16 Mar 2023 19:03:14 +0200 Subject: [PATCH 22/27] Apply suggestions from code review Co-authored-by: Dustin Brickwood --- config/development/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/development/README.md b/config/development/README.md index e1d0923d5..0760cdac2 100644 --- a/config/development/README.md +++ b/config/development/README.md @@ -8,7 +8,7 @@ The EVM Blanknet is a private Ethereum network that is used for development and ## EVM Local <> Tangle -The EVM Local <> Tangle is a private Ethereum network that is used for development and testing. It is configured in the `evm-local-tangle` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deplpyed contracts and the deployed Anchors will be linked to each other. in addition to that, there is a configured Tangle network that will be used for signing proposals. +The EVM Local <> Tangle is a private Ethereum network that is used for development and testing. It is configured in the `evm-local-tangle` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deployed contracts and the deployed Anchors will be linked to each other. in addition to that, there is a configured Tangle network that will be used for signing proposals. ## Substrate Local From babf036af7ed6537474b85d3e0a177b36bf99127 Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Thu, 16 Mar 2023 19:08:41 +0200 Subject: [PATCH 23/27] fix small typos --- config/development/README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/config/development/README.md b/config/development/README.md index e1d0923d5..0bab10e19 100644 --- a/config/development/README.md +++ b/config/development/README.md @@ -27,15 +27,9 @@ Then, you can run the following commands: cp config/development//.env.example .env ``` -Compile the relayer crates and Relayer CLI: +You will also need to follow these steps: -```bash -cargo build -p webb-relayer --features cli -``` - -You will also need the following scripts: - -- [LocalEvmVBridge.ts](https://github.com/webb-tools/protocol-solidity/blob/a56f5cd325e7f6b59d2eeae8597836dfae012da5/scripts/evm/deployments/LocalEvmVBridge.ts) +- [Running Local Bridge](https://github.com/webb-tools/webb-dapp/tree/develop/apps/bridge-dapp#run-local-webb-relayer-and-local-network-alongside-hubble-bridge) - [Local Standalone Tangle Network\*](https://github.com/webb-tools/tangle/tree/main/scripts#run-a-standalone-tangle-network) * Note: The Tangle Network is only Required for the EVM Local <> Tangle configuration and is not required for the EVM Blanknet configuration. @@ -43,7 +37,7 @@ You will also need the following scripts: After that, you can run the relayer: ```bash -./target/debug/webb-relayer -vvv --tmp --config config/development/ +cargo run --bin webb-relayer -- -vvv --tmp --config config/development/ ``` ## Production Configuration @@ -52,6 +46,5 @@ This Repository does not contain any production ready configration, but they are However, you can take a look at the following configrations: -1. [exclusive-startegies](../exclusive-strategies/) - These are a set of configrations that are used for the exclusive strategies of different roles that you can use the relayer for. -2. [full-support](../full-support/) - Shows you how you can combine the different strategies to support all the roles that you can use the relayer for. -3. [example](../example/) - This is a very simple and minimal configuration for starting a Private Transaction Relayer over the Gorli Testnet. +1. [exclusive-startegies](../exclusive-strategies/) - These are a set of configurations that are used for the exclusive strategies of different roles that you can use the relayer for. +2. [example](../example/) - This is a very simple and minimal configuration for starting a Private Transaction Relayer over the Gorli Testnet. From eef23ec025447690737f52ff2f58406b841ac316 Mon Sep 17 00:00:00 2001 From: shekohex Date: Thu, 16 Mar 2023 19:12:28 +0200 Subject: [PATCH 24/27] Apply suggestions from code review Co-authored-by: Dustin Brickwood --- config/README.md | 76 +++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 49 deletions(-) diff --git a/config/README.md b/config/README.md index 142892cb2..061813df3 100644 --- a/config/README.md +++ b/config/README.md @@ -150,8 +150,7 @@ data-query = true ##### private-tx-relay -Enable or disable the private-tx-relay feature. Enabling this feature will allow the relayer to -relay private transactions, to preserve the privacy of the transactions. +Enable or disable the private-tx-relay feature. When enabled, the relayer will be able to relay private transactions. - Type: `bool` - Required: `false` @@ -236,22 +235,15 @@ ws-endpoint = "wss://mainnet.infura.io/ws/v3/" #### private-key -The Private Key of this account on this network, used for signing transactions. the format is more -dynamic here: +The private key configuration specifies the private key of the account on the EVM chain used for signing transactions. The format of the private key depends on its value: -1.if it starts with '0x' then this would be raw (64 bytes) hex encoded private key. Example: -`0x8917174396171783496173419137618235192359106130478137647163400318` +If the private key starts with `0x`, it is considered a raw (64 bytes) hex-encoded private key. Example: `0x8917174396171783496173419137618235192359106130478137647163400318`. -2.if it starts with -'$' then it would be considered as an Enviroment variable of a hex-encoded private key. - Example: `$MAINNET_PRIVATE_KEY` +If the private key starts with `$`, it is considered an environment variable containing a hex-encoded private key. Example: `$MAINNET_PRIVATE_KEY`. -3.if it starts with '> ' then it would be considered as a command that the relayer would execute and -the output of this command would be the hex encoded private key. Example: -`> ./getKey.sh mainnet-privatekey` +If the private key starts with '> ', it is considered a command that the relayer will execute to obtain the hex-encoded private key. Example: > `./getKey.sh mainnet-privatekey`. -4.if it doesn't contains special characters and has 12 or 24 words in it then we should process it -as a mnemonic string: 'word two three four ...' +If the private key doesn't contain special characters and has 12 or 24 words, it is considered a mnemonic string. The words should be separated by spaces, and the string should not be enclosed in quotes or any other characters. - Type: `string` - Required: @@ -316,7 +308,7 @@ explorer = "https://etherscan.io" The address of the beneficiary account on this chain. This is used to receive the fees from relaying transactions. It is optional, and if not provided, the relayer will use the account address of the -proivided [private-key](#private-key) for this chain. +provided [private-key](#private-key) for this chain. - Type: `string` - Required: `false` @@ -336,8 +328,7 @@ uses a database to store the transactions, and the configuration for the databas ##### max-sleep-interval -The maximum time to sleep between sending transactions. This to control the rate at which the -relayer sends transactions to the chain. +The maximum time to sleep between sending transactions. This controls the rate at which the relayer sends transactions to the chain. - Type: `number` - Required: `false` @@ -375,7 +366,7 @@ deployed-at = 3123413 The type of the contract. This is used to identify the contract, and the relayer will use this to determine which contract to use for a specific operation. Each contract type has its own -configuration, and different internally service that will handle the contract operations. +configuration, and different internal service that will handle the contract operations. - Type: `enum` - Possible values: @@ -408,8 +399,7 @@ address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" ##### deployed-at -The block number at which the contract was deployed. This is used to determine the block number to -start scanning for events from. +The block number at which the contract was deployed. This is used to determine the starting block number for scanning events. - Type: `number` - Required: `true` @@ -453,8 +443,7 @@ events-watcher = { enabled = true } ###### enable-data-query -Enable or disable the data query for this contract. This is used to query the contract's events, -like the leaves for example. +Enable or disable the data query for this contract. When enabled, it allows the relayer to query the contract's events, such as the leaves. - Type: `bool` - Required: `false` @@ -486,9 +475,7 @@ events-watcher = { poll-interval = 12000 } ##### max-blocks-per-step -The maximum number of blocks to scan for events in a single step. This is used to control the rate -at which the relayer scans for events from that contract. which also controls the speed at which the -relayer will sync the chain. +The maximum number of blocks to scan for events in a single step. This controls the rate at which the relayer scans for events from the contract, and also affects the speed at which the relayer synchronizes with the chain. - Type: `number` - Required: `false` @@ -504,11 +491,7 @@ events-watcher = { max-blocks-per-step = 500 } ##### sync-blocks-from -The block number to start scanning for events from. This similar to the [deployed-at](#deployed-at) -configuration value, but this is used to override the value of the [deployed-at](#deployed-at) -configuration value However, this is only used when the relayer is syncing the chain for the first -time, and the relayer will use the [deployed-at](#deployed-at) configuration value as the default -value here. +The block number to start scanning for events from. This value can override the [deployed-block](#deployed-at) configuration value but is only used during the initial synchronization of the chain. If not specified, the relayer uses the [deployed-block](#deployed-at) configuration value as the default starting block number. - Type: `number` - Required: `false` @@ -543,7 +526,7 @@ events-watcher = { print-progress-interval = 60000 } A Proposal Signing backend is used for signing proposals that the relayer will submit to be signed and later executed on the target chain. Currently, there are two types of proposal signing backends, -the Moked one, and the DKG based one. +the Mocked one, and the DKG based one. ###### type @@ -571,7 +554,7 @@ The mocked proposal signing backend is used for testing purposes, and it is most local and integration tests. This backend will sign the proposals with a mocked keypair; hence should not be used in production environment. -- Avilable configuration values: +- Available configuration values: ```toml [[evm.ethereum.contracts]] @@ -600,7 +583,7 @@ proposal-signing-backend = { type = "Mocked", private-key = "0x..." } The DKG proposal signing backend is used for signing the proposals using the DKG configured node. -- Avilable configuration values: +- Available configuration values: ```toml [[evm.ethereum.contracts]] @@ -627,14 +610,13 @@ proposal-signing-backend = { type = "Dkg", node = "1080" } ##### Linked Anchors -The Linked Anchors configuration is used to define the linked anchors for this VAnchor contract. -which is only available when the [type](#type) is `VAnchor`. This configration value is a list of -Linked Anchors, that are defined in a human-readable format (or raw format), nonetheless, the -relayer will convert them to a raw format before using them. +The Linked Anchors configuration is used to define the linked anchors for the VAnchor contract. This configuration is only available when the [type](#type) is set to `VAnchor`. + +The configuration value is a list of Linked Anchors, defined in a human-readable format. However, the relayer will convert them to a raw format before using them. - Required: `false` - Default: `null` (defaults to an empty list) -- Avilable configuration values: +- Available configuration values: ```toml [[evm.ethereum.contracts]] @@ -756,12 +738,9 @@ linked-anchors = [ ### Substrate Node Configuration -The Substrate Node configuration file is used to configure the relayer to work with a specific -Substrate Node. It is usually located at a file called `substrate/.toml` in the `config` -directory. +The Substrate Node configuration file is used to specify the configuration settings required for the relayer to work with a specific Substrate Node. The file is typically located in the `config` directory and named `substrate/.toml`. -The value of this configration is a table, and the name of the table is the name of the node, for -example: +The configuration value is a table, and its name corresponds to the name of the node. For example: ```toml [substrate.tangle] @@ -770,8 +749,7 @@ name = "tangle" # ... ``` -So, in general it is `[substrate.]`, where `` is the name of the network. The -following sections describe the different configuration entries and how to use them. +In general, the configuration table for a node is identified as `[substrate.]`, where `` is the name of the network. The following sections outline the different configuration entries and how to use them. #### name @@ -831,7 +809,7 @@ ws-endpoint = "ws://localhost:9944" #### runtime -The runtime of the running substrate node. These are predifined in the relayer, with each having +The runtime of the running substrate node. These are predefined in the relayer, with each having different types of Options. - Type: `string` @@ -882,10 +860,10 @@ explorer = "https://tangle-explorer.webb.tools" #### suri SURI stands for "secret URI". It is a mnemonic phrase that can be used to generate a private key. -This is used to sign extrinsics. we will refer to this as the "s" for now, The value is a string -(`s`) that we will try to interpret the string in order to generate a key Pair. in the case that the +This is used to sign extrinsics. We will refer to this as the "s" for now. The value is a string +(`s`) that we will try to interpret the string in order to generate a key pair. In the case that the pair can be expressed as a direct derivation from a seed (some cases, such as Sr25519 derivations -with path components, cannot). +with path components cannot). This takes a helper function to do the key generation from a phrase, password and junction iterator. From f814965a36d93f19854d64d2b01fc44dec8bb78a Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Fri, 17 Mar 2023 13:32:32 +0200 Subject: [PATCH 25/27] update the way we render example --- config/README.md | 206 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 139 insertions(+), 67 deletions(-) diff --git a/config/README.md b/config/README.md index 061813df3..f0046a077 100644 --- a/config/README.md +++ b/config/README.md @@ -92,7 +92,8 @@ The port on which the relayer will listen for incoming connections. - Required: `false` - Default: `9955` - env: `WEBB_PORT` -- Example: + +Example: ```toml port = 9955 @@ -107,7 +108,8 @@ The features section is used to enable or disable the relayer features. - Default: `{ governance-relay = true, data-query = true, private-tx-relay = true }` - env: `WEBB_FEATURES_GOVERNANCE_RELAY`, `WEBB_FEATURES_DATA_QUERY`, `WEBB_FEATURES_PRIVATE_TX_RELAY` -- Example: + +Example: ```toml [features] @@ -125,7 +127,8 @@ relay proposals and vote on them between the chains. - Required: `false` - Default: `true` - env: `WEBB_FEATURES_GOVERNANCE_RELAY` -- Example: + +Example: ```toml [features] @@ -141,7 +144,8 @@ data query oracle. - Required: `false` - Default: `true` - env: `WEBB_FEATURES_DATA_QUERY` -- Example: + +Example: ```toml [features] @@ -150,13 +154,15 @@ data-query = true ##### private-tx-relay -Enable or disable the private-tx-relay feature. When enabled, the relayer will be able to relay private transactions. +Enable or disable the private-tx-relay feature. When enabled, the relayer will be able to relay +private transactions. - Type: `bool` - Required: `false` - Default: `true` - env: `WEBB_FEATURES_PRIVATE_TX_RELAY` -- Example: + +Example: ```toml [features] @@ -188,7 +194,8 @@ The name of the chain. This name will be used to identify the chain in the relay - Type: `string` - Required: `true` - env: `WEBB_EVM__NAME` -- Example: + +Example: ```toml name = "ethereum" @@ -201,7 +208,8 @@ The chain id of the chain. This id will be used to identify the chain in the rel - Type: `number` - Required: `true` - env: `WEBB_EVM__CHAIN_ID` -- Example: + +Example: ```toml chain-id = 1 @@ -214,7 +222,8 @@ The HTTP(s) RPC endpoint for this chain, used for watching events, and sending t - Type: `string` - Required: `true` - env: `WEBB_EVM__HTTP_ENDPOINT` -- Example: + +Example: ```toml http-endpoint = "https://mainnet.infura.io/v3/" @@ -227,7 +236,8 @@ The WebSocket RPC endpoint for this chain, used for watching events, and sending - Type: `string` - Required: `true` - env: `WEBB_EVM__WS_ENDPOINT` -- Example: + +Example: ```toml ws-endpoint = "wss://mainnet.infura.io/ws/v3/" @@ -235,15 +245,21 @@ ws-endpoint = "wss://mainnet.infura.io/ws/v3/" #### private-key -The private key configuration specifies the private key of the account on the EVM chain used for signing transactions. The format of the private key depends on its value: +The private key configuration specifies the private key of the account on the EVM chain used for +signing transactions. The format of the private key depends on its value: -If the private key starts with `0x`, it is considered a raw (64 bytes) hex-encoded private key. Example: `0x8917174396171783496173419137618235192359106130478137647163400318`. +If the private key starts with `0x`, it is considered a raw (64 bytes) hex-encoded private key. +Example: `0x8917174396171783496173419137618235192359106130478137647163400318`. -If the private key starts with `$`, it is considered an environment variable containing a hex-encoded private key. Example: `$MAINNET_PRIVATE_KEY`. +If the private key starts with `$`, it is considered an environment variable containing a +hex-encoded private key. Example: `$MAINNET_PRIVATE_KEY`. -If the private key starts with '> ', it is considered a command that the relayer will execute to obtain the hex-encoded private key. Example: > `./getKey.sh mainnet-privatekey`. +If the private key starts with '> ', it is considered a command that the relayer will execute to +obtain the hex-encoded private key. Example: > `./getKey.sh mainnet-privatekey`. -If the private key doesn't contain special characters and has 12 or 24 words, it is considered a mnemonic string. The words should be separated by spaces, and the string should not be enclosed in quotes or any other characters. +If the private key doesn't contain special characters and has 12 or 24 words, it is considered a +mnemonic string. The words should be separated by spaces, and the string should not be enclosed in +quotes or any other characters. - Type: `string` - Required: @@ -251,7 +267,8 @@ If the private key doesn't contain special characters and has 12 or 24 words, it - `true` if `features.private-tx-relay` is `true` - `false` otherwise - env: `WEBB_EVM__PRIVATE_KEY` -- Example: + +Example: ```toml private-key = "0x8917174396171783496173419137618235192359106130478137647163400318" @@ -268,7 +285,8 @@ The number of block confirmations to wait before processing an event. - Required: `false` - Default: `0` - env: `WEBB_EVM__BLOCK_CONFIRMATIONS` -- Example: + +Example: ```toml block-confirmations = 5 @@ -283,7 +301,8 @@ chain while loading the configuration files. - Required: `false` - Default: `true` - env: `WEBB_EVM__ENABLED` -- Example: + +Example: ```toml enabled = true @@ -298,7 +317,8 @@ for debugging. - Required: `false` - Default: `null` - env: `WEBB_EVM__EXPLORER` -- Example: + +Example: ```toml explorer = "https://etherscan.io" @@ -314,7 +334,8 @@ provided [private-key](#private-key) for this chain. - Required: `false` - Default: `null` - env: `WEBB_EVM__BENEFICIARY` -- Example: + +Example: ```toml beneficiary = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" @@ -328,13 +349,15 @@ uses a database to store the transactions, and the configuration for the databas ##### max-sleep-interval -The maximum time to sleep between sending transactions. This controls the rate at which the relayer sends transactions to the chain. +The maximum time to sleep between sending transactions. This controls the rate at which the relayer +sends transactions to the chain. - Type: `number` - Required: `false` - Default: `10000ms` - env: `WEBB_EVM__TX_QUEUE_MAX_SLEEP_INTERVAL` -- Example: + +Example: ```toml tx-queue = { max-sleep-interval = 5000 } @@ -375,7 +398,8 @@ configuration, and different internal service that will handle the contract oper - `SignatureBridge` - Required: `true` - env: `WEBB_EVM__CONTRACTS__CONTRACT` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -389,7 +413,8 @@ The address of the contract on the configured chain. - Type: `string` - Required: `true` - env: `WEBB_EVM__CONTRACTS__ADDRESS` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -399,12 +424,14 @@ address = "0x8eB24319393716668D768dCEC29356ae9CfFe285" ##### deployed-at -The block number at which the contract was deployed. This is used to determine the starting block number for scanning events. +The block number at which the contract was deployed. This is used to determine the starting block +number for scanning events. - Type: `number` - Required: `true` - env: `WEBB_EVM__CONTRACTS__DEPLOYED_AT` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -417,7 +444,7 @@ deployed-at = 3123412 The events watcher is used to watch for events emitted by the contracts. The relayer uses this configration values to determine how the relayer will poll the events from that contract. -- Example: +Example: ```toml [[evm.ethereum.contracts]] @@ -433,7 +460,8 @@ Enable or disable the events watcher for this contract. - Required: `false` - Default: `true` - env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_ENABLED` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -443,13 +471,15 @@ events-watcher = { enabled = true } ###### enable-data-query -Enable or disable the data query for this contract. When enabled, it allows the relayer to query the contract's events, such as the leaves. +Enable or disable the data query for this contract. When enabled, it allows the relayer to query the +contract's events, such as the leaves. - Type: `bool` - Required: `false` - Default: `true` - env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_ENABLE_DATA_QUERY` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -465,7 +495,8 @@ The interval at which the relayer will poll for events from the contract. - Required: `false` - Default: `7000ms` - env: `WEBB_EVM__CONTRACTS__EVENTS_WATCHER_POLL_INTERVAL` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -475,13 +506,16 @@ events-watcher = { poll-interval = 12000 } ##### max-blocks-per-step -The maximum number of blocks to scan for events in a single step. This controls the rate at which the relayer scans for events from the contract, and also affects the speed at which the relayer synchronizes with the chain. +The maximum number of blocks to scan for events in a single step. This controls the rate at which +the relayer scans for events from the contract, and also affects the speed at which the relayer +synchronizes with the chain. - Type: `number` - Required: `false` - Default: `100` - env: `WEBB_EVM__CONTRACTS__MAX_BLOCKS_PER_STEP` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -491,13 +525,17 @@ events-watcher = { max-blocks-per-step = 500 } ##### sync-blocks-from -The block number to start scanning for events from. This value can override the [deployed-block](#deployed-at) configuration value but is only used during the initial synchronization of the chain. If not specified, the relayer uses the [deployed-block](#deployed-at) configuration value as the default starting block number. +The block number to start scanning for events from. This value can override the +[deployed-block](#deployed-at) configuration value but is only used during the initial +synchronization of the chain. If not specified, the relayer uses the [deployed-block](#deployed-at) +configuration value as the default starting block number. - Type: `number` - Required: `false` - Default: `null` (_will use the value of the [deployed-at](#deployed-at) configuration value_) - env: `WEBB_EVM__CONTRACTS__SYNC_BLOCKS_FROM` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -514,7 +552,8 @@ show the user the progress of the syncing process which could be useful for debu - Required: `false` - Default: `30000ms` - env: `WEBB_EVM__CONTRACTS__PRINT_PROGRESS_INTERVAL` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -538,7 +577,8 @@ The type of the proposal signing backend to use. - `Mocked` - `Dkg` - env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_TYPE` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -571,7 +611,8 @@ The private key to use for signing the proposals. Only used by the mocked propos - `true` if the [type](#type) is `Mocked` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_PRIVATE_KEY` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -600,7 +641,8 @@ The node's chain-id to use for signing the proposals. Only used by the DKG propo - `true` if the [type](#type) is `Dkg` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__PROPOSAL_SIGNING_BACKEND_NODE` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -610,9 +652,11 @@ proposal-signing-backend = { type = "Dkg", node = "1080" } ##### Linked Anchors -The Linked Anchors configuration is used to define the linked anchors for the VAnchor contract. This configuration is only available when the [type](#type) is set to `VAnchor`. +The Linked Anchors configuration is used to define the linked anchors for the VAnchor contract. This +configuration is only available when the [type](#type) is set to `VAnchor`. -The configuration value is a list of Linked Anchors, defined in a human-readable format. However, the relayer will convert them to a raw format before using them. +The configuration value is a list of Linked Anchors, defined in a human-readable format. However, +the relayer will convert them to a raw format before using them. - Required: `false` - Default: `null` (defaults to an empty list) @@ -649,7 +693,8 @@ The chain-id of the linked anchor definition. Only used by the `Evm` and `Substr - `true` if the [type](#type) is `Evm` or `Substrate` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__CHAIN_ID` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -669,7 +714,8 @@ The address of the linked anchor definition. Only used by the `Evm` type. - `true` if the [type](#type) is `Evm` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__ADDRESS` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -688,7 +734,8 @@ The pallet of the linked anchor definition. Only used by the `Substrate` type. - `true` if the [type](#type) is `Substrate` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__PALLET` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -707,7 +754,8 @@ The tree-id of the linked anchor definition. Only used by the `Substrate` type. - `true` if the [type](#type) is `Substrate` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__TREE_ID` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -726,7 +774,8 @@ The resource-id of the linked anchor definition. Only used by the `Raw` type. - `true` if the [type](#type) is `Raw` - `false` otherwise - env: `WEBB_EVM__CONTRACTS__LINKED_ANCHORS__RESOURCE_ID` -- Example: + +Example: ```toml [[evm.ethereum.contracts]] @@ -738,7 +787,9 @@ linked-anchors = [ ### Substrate Node Configuration -The Substrate Node configuration file is used to specify the configuration settings required for the relayer to work with a specific Substrate Node. The file is typically located in the `config` directory and named `substrate/.toml`. +The Substrate Node configuration file is used to specify the configuration settings required for the +relayer to work with a specific Substrate Node. The file is typically located in the `config` +directory and named `substrate/.toml`. The configuration value is a table, and its name corresponds to the name of the node. For example: @@ -749,7 +800,9 @@ name = "tangle" # ... ``` -In general, the configuration table for a node is identified as `[substrate.]`, where `` is the name of the network. The following sections outline the different configuration entries and how to use them. +In general, the configuration table for a node is identified as `[substrate.]`, where +`` is the name of the network. The following sections outline the different configuration +entries and how to use them. #### name @@ -758,7 +811,8 @@ The name of the Substrate node. - Type: `string` - Required: `true` - env: `WEBB_SUBSTRATE__NAME` -- Example: + +Example: ```toml [substrate.tangle] @@ -772,7 +826,8 @@ The chain-id of the Substrate node. - Type: `number` - Required: `true` - env: `WEBB_SUBSTRATE__CHAIN_ID` -- Example: + +Example: ```toml [substrate.tangle] @@ -786,7 +841,8 @@ The RPC endpoint of the Substrate node. - Type: `string` - Required: `true` - env: `WEBB_SUBSTRATE__HTTP_ENDPOINT` -- Example: + +Example: ```toml [substrate.tangle] @@ -800,7 +856,8 @@ The RPC WebSocket endpoint of the Substrate node. - Type: `string` - Required: `true` - env: `WEBB_SUBSTRATE__WS_ENDPOINT` -- Example: + +Example: ```toml [substrate.tangle] @@ -818,7 +875,8 @@ different types of Options. - Possible values: - `DKG` (that is, `dkg-substrate`) - `WebbProtocol` (also known as `protocol-substrate`) -- Example: + +Example: ```toml [substrate.tangle] @@ -834,7 +892,8 @@ it to the list of available nodes. - Required: `false` - Default: `true` - env: `WEBB_SUBSTRATE__ENABLED` -- Example: + +Example: ```toml [substrate.tangle] @@ -850,7 +909,8 @@ the logs. - Required: `false` - Default: `null` - env: `WEBB_SUBSTRATE__EXPLORER` -- Example: + +Example: ```toml [substrate.tangle] @@ -896,7 +956,8 @@ in which case the value of the environment variable will be used. - Type: `string` - Required: `true` - env: `WEBB_SUBSTRATE__SURI` -- Example: + +Example: ```toml [substrate.tangle] @@ -912,7 +973,8 @@ and will default to the address derived from the `suri` if not provided. - Required: `false` - Default: `null` - env: `WEBB_SUBSTRATE__BENEFICIARY` -- Example: + +Example: ```toml [substrate.tangle] @@ -931,7 +993,8 @@ The maximum sleep interval between sending transactions to the Substrate node. - Required: `false` - Default: `10000ms` - env: `WEBB_SUBSTRATE__TRANSACTION_QUEUE_MAX_SLEEP_INTERVAL` -- Example: + +Example: ```toml [substrate.tangle] @@ -955,7 +1018,8 @@ There are currently 5 different pallets that are supported by the relayer: - Type: `table` - Required: `false` - Default: `null` (empty table) -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -978,7 +1042,8 @@ The type of the pallet. This is used to determine which pallet to use. - `DkgProposalHandler` - `SignatureBridge` - `VAnchorBn254` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -992,7 +1057,8 @@ The events watcher is used to watch for events emitted by the pallet. - Type: `table` - Required: `false` - Default: `null` (empty table) -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1009,7 +1075,8 @@ watch events emitted by the pallet. - Required: `false` - Default: `true` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_ENABLED` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1026,7 +1093,8 @@ the data from the pallet. - Required: `false` - Default: `true` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_ENABLE_DATA_QUERY` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1043,7 +1111,8 @@ blocks. - Required: `false` - Default: `6000ms` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_POLLING_INTERVAL` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1059,7 +1128,8 @@ The maximum number of blocks to process per step. - Required: `false` - Default: `100` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_MAX_BLOCKS_PER_STEP` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1076,7 +1146,8 @@ relayer from a specific block instead of block zero. - Required: `false` - Default: `0` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_SYNC_BLOCKS_FROM` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] @@ -1093,7 +1164,8 @@ debugging. - Required: `false` - Default: `12000ms` - env: `WEBB_SUBSTRATE__PALLET__EVENTS_WATCHER_PRINT_PROGRESS_INTERVAL` -- Example: + +Example: ```toml [[substrate.tangle.pallets]] From a72990107c05952ee1cbd63a666dd0985a8cfd9a Mon Sep 17 00:00:00 2001 From: Shady Khalifa Date: Fri, 17 Mar 2023 13:49:21 +0200 Subject: [PATCH 26/27] fix typos --- config/README.md | 6 +++--- config/development/README.md | 30 ++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/config/README.md b/config/README.md index f0046a077..5c3e2c5e3 100644 --- a/config/README.md +++ b/config/README.md @@ -174,7 +174,7 @@ private-tx-relay = true The EVM chain configuration file is used to configure the relayer to work with a specific EVM chain. It is usually located at a file called `evm/.toml` in the `config` directory. -The value of this configration is a table, and the name of the table is the name of the chain, for +The value of this configuration is a table, and the name of the table is the name of the chain, for example: ```toml @@ -442,7 +442,7 @@ deployed-at = 3123412 ##### Events Watcher The events watcher is used to watch for events emitted by the contracts. The relayer uses this -configration values to determine how the relayer will poll the events from that contract. +configuration values to determine how the relayer will poll the events from that contract. Example: @@ -1004,7 +1004,7 @@ tx-queue = { max-sleep-interval = 10000 } #### Pallets The pallets are the different pallets that are used by the relayer. Each will define its own -configration which will eventually be used by the relayer to start a different service for each +configuration which will eventually be used by the relayer to start a different service for each pallet. There are currently 5 different pallets that are supported by the relayer: diff --git a/config/development/README.md b/config/development/README.md index 2f234a8c3..5876e9702 100644 --- a/config/development/README.md +++ b/config/development/README.md @@ -4,15 +4,25 @@ This directory contains configuration for the development environment. ## EVM Blanknet -The EVM Blanknet is a private Ethereum network that is used for development and testing. It is configured in the `evm-blanknet` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deplpyed contracts and the deployed Anchors will be linked to each other. This will use the Mocked Signing Backend for signing proposals. +The EVM Blanknet is a private Ethereum network that is used for development and testing. It is +configured in the `evm-blanknet` directory. This configuration uses 3 chains [Athena, Hermes, and +Demeter] each chain contains the deplpyed contracts and the deployed Anchors will be linked to +each other. This will use the Mocked Signing Backend for signing proposals. ## EVM Local <> Tangle -The EVM Local <> Tangle is a private Ethereum network that is used for development and testing. It is configured in the `evm-local-tangle` directory. This configration starts a 3 chains [Athena, Hermes, and Demeter] each chain will contain the deployed contracts and the deployed Anchors will be linked to each other. in addition to that, there is a configured Tangle network that will be used for signing proposals. +The EVM Local <> Tangle is a private Ethereum network that is used for development and testing. It +is configured in the `evm-local-tangle` directory. This configuration starts a 3 chains [Athena, +Hermes, and Demeter] each chain will contain the deployed contracts and the deployed Anchors will be +linked to each other. in addition to that, there is a configured Tangle network that will be used +for signing proposals. ## Substrate Local -The Substrate Local is a private Substrate network that is used for development and testing. It is configured in the `substrate-local` directory. This configration will try to connect to a local running Substrate node that uses the Webb Protocol (protocol-substrate) Runtime; for easier testing, you could also use the tangle node for that. +The Substrate Local is a private Substrate network that is used for development and testing. It is +configured in the `substrate-local` directory. This configuration will try to connect to a local +running Substrate node that uses the Webb Protocol (protocol-substrate) Runtime; for easier testing, +you could also use the tangle node for that. ### Running the Development Environment @@ -32,7 +42,8 @@ You will also need to follow these steps: - [Running Local Bridge](https://github.com/webb-tools/webb-dapp/tree/develop/apps/bridge-dapp#run-local-webb-relayer-and-local-network-alongside-hubble-bridge) - [Local Standalone Tangle Network\*](https://github.com/webb-tools/tangle/tree/main/scripts#run-a-standalone-tangle-network) -* Note: The Tangle Network is only Required for the EVM Local <> Tangle configuration and is not required for the EVM Blanknet configuration. +* Note: The Tangle Network is only Required for the EVM Local <> Tangle configuration and is not + required for the EVM Blanknet configuration. After that, you can run the relayer: @@ -42,9 +53,12 @@ cargo run --bin webb-relayer -- -vvv --tmp --config config/development/ ## Production Configuration -This Repository does not contain any production ready configration, but they are all examples and for demonstration purposes only. +This Repository does not contain any production ready configuration, but they are all examples and +for demonstration purposes only. -However, you can take a look at the following configrations: +However, you can take a look at the following configurations: -1. [exclusive-startegies](../exclusive-strategies/) - These are a set of configurations that are used for the exclusive strategies of different roles that you can use the relayer for. -2. [example](../example/) - This is a very simple and minimal configuration for starting a Private Transaction Relayer over the Gorli Testnet. +1. [exclusive-startegies](../exclusive-strategies/) - These are a set of configurations that are + used for the exclusive strategies of different roles that you can use the relayer for. +2. [example](../example/) - This is a very simple and minimal configuration for starting a Private + Transaction Relayer over the Gorli Testnet. From fbbdd82aa415fc2c65d1558aebbd48b26ebfef22 Mon Sep 17 00:00:00 2001 From: salman01zp Date: Fri, 17 Mar 2023 18:37:51 +0530 Subject: [PATCH 27/27] fix tests --- tests/test/evm/evmToSubstrateTransaction.test.ts | 2 ++ tests/test/substrate/signatureBridgeVanchor.test.ts | 2 ++ tests/test/substrate/substrateToEvmTransaction.test.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/test/evm/evmToSubstrateTransaction.test.ts b/tests/test/evm/evmToSubstrateTransaction.test.ts index 686582412..249522fbf 100644 --- a/tests/test/evm/evmToSubstrateTransaction.test.ts +++ b/tests/test/evm/evmToSubstrateTransaction.test.ts @@ -207,7 +207,9 @@ describe('Cross chain transaction <<>> Mocked Backend', function () { // 2. We need to whitelist chain Id // force set maintainer + const refreshNonce = 0; const setMaintainerCall = api.tx.signatureBridge.forceSetMaintainer( + refreshNonce, `0x${uncompressedKey}` ); await aliceNode.sudoExecuteTransaction(setMaintainerCall); diff --git a/tests/test/substrate/signatureBridgeVanchor.test.ts b/tests/test/substrate/signatureBridgeVanchor.test.ts index 26bd25618..4e4fb80f5 100644 --- a/tests/test/substrate/signatureBridgeVanchor.test.ts +++ b/tests/test/substrate/signatureBridgeVanchor.test.ts @@ -131,7 +131,9 @@ describe('Substrate Signature Bridge Relaying On Vanchor Deposit <<>> Mocked Bac }); // force set maintainer + const refreshNonce = 0; const setMaintainerCall = api.tx.signatureBridge.forceSetMaintainer( + refreshNonce, `0x${uncompressedKey}` ); await aliceNode.sudoExecuteTransaction(setMaintainerCall); diff --git a/tests/test/substrate/substrateToEvmTransaction.test.ts b/tests/test/substrate/substrateToEvmTransaction.test.ts index ae2257bd3..b5c244d92 100644 --- a/tests/test/substrate/substrateToEvmTransaction.test.ts +++ b/tests/test/substrate/substrateToEvmTransaction.test.ts @@ -199,7 +199,9 @@ describe('Cross chain transaction <<>> Mocked Backend', function () { // 2. We need to whitelist chain Id // force set maintainer + const refreshNonce = 0; const setMaintainerCall = api.tx.signatureBridge.forceSetMaintainer( + refreshNonce, `0x${uncompressedKey}` ); await aliceNode.sudoExecuteTransaction(setMaintainerCall);