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
Copy file name to clipboardExpand all lines: README.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,50 @@ In order for an oracle pool to run, it must be first created/bootstrapped on-cha
60
60
61
61
Check out the [Bootstrap doc](docs/Bootstrap.md) for detailed instructions about how to bootstrap an oracle pool and each of the oracles within it.
62
62
63
+
# Running An Oracle Using Docker Compose
64
+
It's possible to setup an oracle cluster using docker compose. We do not recommend this deployment for production, unless you know what you are doing.
65
+
66
+
1. Before bringing the cluster up, we need to update the `apiKeyHash` value inside `docker/ergo.conf`. This key will be used for interaction with the API.
67
+
68
+
2. After that is done, we can bring up the cluster.
69
+
70
+
```
71
+
docker-compose up -d
72
+
```
73
+
74
+
3. It will take a while until our Ergo `node` sync the blockchain. After it is done, we need to restore our wallet using the API key defined in the first step. As you can see, we need to define a wallet password as well.
75
+
76
+
```
77
+
$ curl -XPOST -H "api_key: hello" \
78
+
-d '{"pass": "123", "mnemonic": "all all all..."}' \
79
+
-H "accept: application/json" \
80
+
-H "Content-Type: application/json" \
81
+
http://localhost:9053/wallet/restore
82
+
"OK"
83
+
```
84
+
85
+
4. Now we need to unlock the wallet using the password we defined in the step above.
86
+
87
+
```
88
+
$ curl -XPOST -H "api_key: hello" \
89
+
-d '{"pass": "123"}' \
90
+
-H "accept: application/json" \
91
+
-H "Content-Type: application/json" \
92
+
http://localhost:9053/wallet/unlock
93
+
"OK"
94
+
```
95
+
96
+
5. Verify your wallet is on the tip and has some balance in it.
97
+
98
+
```
99
+
$ curl -XGET -H "api_key: hello" \
100
+
-H "accept: application/json" \
101
+
-H "Content-Type: application/json" \
102
+
http://localhost:9053/wallet/balances
103
+
```
104
+
63
105
64
106
# Writing A New Connector
65
107
If you are looking to create a new Oracle Pool for a new datapoint, you need to write a new Connector. This process has been greatly simplified thanks to [`Connector-lib`](connectors/connector-lib).
66
108
67
-
Now within 15-20 lines of Rust code, you can easily create your own Connector that plugs right in to the Oracle Core.
109
+
Now within 15-20 lines of Rust code, you can easily create your own Connector that plugs right in to the Oracle Core.
0 commit comments