OSDN Git Service

feat: init cross_tx keepers (#146)
[bytom/vapor.git] / docs / federation / README.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     "gin-gonic" : {
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" : "7f23aae65ee4307c38d342699e328f21834488e18191ebd66823d220b5a58303496c9d09731784372bade78d5e9a4a6249b2cfe2e3a85464e5a4017aa5611e47",
32             "host_port" : "192.168.0.2:3000",
33             "is_local" : false
34         },
35         {
36             "position" : 1,
37             "xpub" : "585e20143db413e45fbc82f03cb61f177e9916ef1df0012daa8cbf6dbb1025ce8f98e51ae319327b63505b64fdbbf6d36ef916d79e6dd67d51b0bfe76fe544c5",
38             "host_port" : "127.0.0.1:3000",
39             "is_local" : true
40         },
41         {
42             "position" : 1,
43             "xpub" : "b58170b51ca61604028ba1cb412377dfc2bc6567c0afc84c83aae1c0c297d0227ccf568561df70851f4144bbf069b525129f2434133c145e35949375b22a6c9d",
44             "host_port" : "192.168.0.3:3000",
45             "is_local" : false
46         }
47     ],
48     "mainchain" : {
49         "name" : "bytom",
50         "confirmations" : 10,
51         "upstream" : "http://127.0.0.1:9888",
52         "sync_seconds" : 150
53     },
54     "sidechain" : {
55         "name" : "vapor",
56         "confirmations" : 100,
57         "upstream" : "http://127.0.0.1:9889",
58         "sync_seconds" : 5
59     }
60 }
61 ```