OSDN Git Service

a6f31f91abfca37be91012f0763c8a2c4c21f313
[bytom/vapor.git] / docs / precog / README.md
1 # Precog
2
3 Keep monitoring (leader & candidate) consensus nodes status in vapor network.
4
5 ## Init
6
7 ### Database Scheme
8 [federation_shema.sql](./sql_dump/federation_shema.sql)
9
10 ### Config
11
12 ## API
13
14 + [/chain-status](#chain-status)
15 + [/list-nodes](#list-nodes)
16
17 ### /chain-status
18
19 __method:__ POST
20
21 __example response:__
22 ```
23 {
24     "best_height": 1024,
25     "policy": {
26         "confirmations": 150,
27         "required_lantency_ms": 500
28     } 
29 }
30 ```
31
32 ### /list-nodes
33
34 __method:__ POST
35
36 __example response:__
37 ```
38 {
39     [
40         {
41             "alias": "cobo",
42             "pubkey": "b928e46bb01e834fdf167185e31b15de7cc257af8bbdf17f9c7fefd5bb97b306d048b6bc0da2097152c1c2ff38333c756a543adbba7030a447dcc776b8ac64ef",
43             "host": "vapornode.cobo.com",
44             "port": 123,
45             "best_height": 1023,
46             "lantency_ms": 300,
47             "active_minutes": 4096,
48             "status": "healthy"
49         },
50         {
51             "alias": "matpool",
52             "pubkey": "0f8669abbd3cc0a167156188e428f940088d5b2f36bb3449df71d2bdc5e077814ea3f68628eef279ed435f51ee26cff00f8bd28fabfd500bedb2a9e369f5c825",
53             "host": "vapornode.matpool.io",
54             "port": 321,
55             "best_height": 1024,
56             "lantency_ms": 299,
57             "active_minutes": 4097,
58             "status": "healthy"
59         }
60     ] 
61 }
62 ```
63
64