You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presents the event and necesary information to validate it on the other network
3
+
Presents the event and necesary information to validate it on the other network.
4
4
The federator is an off-chain process which performs voting actions to validate transactions between a Mainchain (source) and a Sidechain (target) network. These transactions are obtained from the Bridge contract on the Mainchain using event logs and voted in the Sidechain through a Federation contract. Once all required signers (federators) vote for a transaction the Federation contract starts the process to release the funds on the Sidechain.
5
5
The federators will be the owners of the contracts willing to allow to cross their tokens, and by doing so staking they reputation.
6
6
7
7
## Config
8
8
9
9
Go to /federator/config copy `config.sample.js` file and rename it to `config.js` set mainchain and sidechain to point to the json files of the networks you are using, for example rsktestnet-kovan.json and kovan.json, `make sure to set the host parameter of those files`. Add a value to the key `FEDERATOR_KEY` in the .env file, and add the private key of the member of the Federation contract, also you can define a general retry attempts number for the failed processes in the application by setting the value of the key `ENV_DEFAULT_ATTEMPTS` to the number of attempts that you desire, you can use 0 for infinite attempts, if no attempt is provided the default value is 3. The members of the federation are controled by the MultiSig contract, same that is owner of the Bridge and AllowedTokens contracts.
10
10
You will also need to add an [etherscan api key](https://etherscan.io/myapikey) in this config file.
11
+
> Please also note that the private node of RSKj should be running and synced with public one.
11
12
## Usage
12
13
13
14
Run `npm install` to install the dependencies, make sure you followed the previous config step. Then to start the service run `npm start` which will start a single federator that listen to both networks. Check the logs to see that everything is working properly.
@@ -20,7 +21,7 @@ In order to test with multiple federators, ensure they're added as members of th
20
21
21
22
## Run a Federator
22
23
23
-
### config
24
+
### Config
24
25
25
26
To run the federator using Docker, go to the /federator/config folder and rename `config.sample.js` to `config.js`. In that file you will determine the networks the federate must be listening to, for example for the bridge in testnet a federator config.js will look like
26
27
@@ -122,287 +123,3 @@ This endpoint is introduced, in order to better monitor health status on the Fed
122
123
123
124
### Skip HTTPS check
124
125
- As an developer you can set in config.js the property `checkHttps: false` to skip the HTTPS check on the host url config
125
-
126
-
# Datadog
127
-
128
-
## Datadog metric tracking
129
-
130
-
A `DATADOG_API_KEY` environment variable should be available for this to work (**only an error log will let you know if this is not configured - the app will run either way**).
131
-
This should be a valid API key associated to the Datadog account in which you're going to be tracking the metrics.
132
-
Example for setting it: `export DATADOG_API_KEY=08e436512591258b12bf1781ebe`
133
-
134
-
## Running a local Datadog agent
135
-
136
-
If you're interested in the metrics to be tracked in a particular account (might be a personal test account), you can follow the instructions [here](https://docs.datadoghq.com/agent/docker/?tab=standard).
137
-
Either way, at the time of writing this (mid-October 2021), running a Docker container as follows should suffice:
The following is a basic dashboard that collects metrics tracked by the Federators - just copying it and pasting it into a new timeboard in Datadog should be enough for it to look like the following:
0 commit comments