OSDN Git Service

feat(warder): add warder backbone (#181)
[bytom/vapor.git] / docs / federation / README-en.md
1 # Federation
2
3 To run a federation node, you will need to:
4
5 1. init a MySQL database with this [schema](./federation.sql);
6 2. run a `bytomd` node;
7 3. run a `vapord` node and import the federation private key;
8 4. and last but not least, run a `fedd` node with a `fed_cfg.json`.
9
10 A `fed_cfg.json` would look like this:
11
12 ```json
13 {
14     "api" : {
15         "listening_port" : 3000,
16         "is_release_mode": false
17     },
18     "mysql" : {
19         "connection" : {
20             "host": "127.0.0.1",
21             "port": 3306,
22             "username": "root",
23             "password": "",
24             "database": "federation"
25         },
26         "log_mode" : true
27     },
28     "warders" : [
29         {
30             "position" : 1,
31             "xpub" : "50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1"
32         }
33     ],
34     "quorum": 1,
35     "mainchain" : {
36         "name" : "bytom",
37         "confirmations" : 10,
38         "upstream" : "http://127.0.0.1:9888",
39         "sync_seconds" : 150
40     },
41     "sidechain" : {
42         "name" : "vapor",
43         "confirmations" : 100,
44         "upstream" : "http://127.0.0.1:9889",
45         "sync_seconds" : 5
46     }
47 }
48 ```