mirror of
https://github.com/boolnetwork/mining-scripts.git
synced 2026-02-21 11:47:21 +08:00
initialize docs
This commit is contained in:
commit
d061370e5f
21
README.md
Normal file
21
README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# BOOLNetwork scripts
|
||||
|
||||
## Instructions
|
||||
|
||||
Before Getting Started, Check at [Intel© Ark](https://ark.intel.com/content/www/us/en/ark.html#@Processors) that your processor is [Intel© SGX](https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/overview.html) compatible.
|
||||
|
||||
## BOOLNetwork & Docker
|
||||
|
||||
Clone the repo.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/boolnetwork/mining-scripts.git
|
||||
```
|
||||
|
||||
Run with docker-compose
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
More details about the config. [tee](https://boolnetwork.github.io/docs/developer/tee)
|
||||
8
configs/db.toml
Normal file
8
configs/db.toml
Normal file
@ -0,0 +1,8 @@
|
||||
port = 8710
|
||||
num_workers = 20
|
||||
db_path = "/bnk/data"
|
||||
token = ""
|
||||
|
||||
[options]
|
||||
create_if_missing = true
|
||||
atomic_flush = true
|
||||
13
configs/key.toml
Normal file
13
configs/key.toml
Normal file
@ -0,0 +1,13 @@
|
||||
version = 1
|
||||
port = 8730
|
||||
executors = 2
|
||||
db_url = "http://127.0.0.1:8710"
|
||||
msg_pool_url = "http://127.0.0.1:8720"
|
||||
db_token = ""
|
||||
cert_path = "../servers/test-ca/ca.cert"
|
||||
round_time_limit = 60
|
||||
clear_msg_interval = 180
|
||||
time_check_interval = 30
|
||||
retry_interval = 10
|
||||
retry_times = 2
|
||||
max_conn = 250
|
||||
105
configs/monitor.toml
Normal file
105
configs/monitor.toml
Normal file
@ -0,0 +1,105 @@
|
||||
port = 8740
|
||||
database_url = "bnk/data/sqlite.db"
|
||||
notified_url = "http://localhost:8750/event"
|
||||
|
||||
[[endpoints]]
|
||||
chain_id = 5
|
||||
name = "goerli"
|
||||
http_url = "https://rpc.goerli.dev"
|
||||
private_key = "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
|
||||
[[endpoints]]
|
||||
chain_id = 80001
|
||||
name = "mumbai"
|
||||
http_url = "https://polygontestapi.terminet.io/rpc"
|
||||
private_key = "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
|
||||
[[endpoints]]
|
||||
chain_id = 420
|
||||
name = "optimism"
|
||||
http_url = " https://goerli.optimism.io"
|
||||
private_key = "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
|
||||
[[sources]]
|
||||
named = "broadcaster"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "mumbai"
|
||||
address = "0x58F7616FF46De73197C6f79049f6387954223451"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 29177100
|
||||
|
||||
[[sources]]
|
||||
named = "factory"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "mumbai"
|
||||
address = "0x4d0c3b2bb15a114C6cBfa531BdeF9050809658B5"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 29177100
|
||||
|
||||
[[sources]]
|
||||
named = "broadcaster"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "optimism"
|
||||
address = "0x97543Bb9ab8BA62Aa60F596f84792f5766dd2765"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 2723200
|
||||
|
||||
[[sources]]
|
||||
named = "factory"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "optimism"
|
||||
address = "0x120F373F6b843A49D9103593a691F07571f6B11E"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 2723200
|
||||
|
||||
[[sources]]
|
||||
named = "broadcaster"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "goerli"
|
||||
address = "0xf05467484fF502A94B7Aeb704A368B33B52c529c"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 7961800
|
||||
|
||||
[[sources]]
|
||||
named = "factory"
|
||||
tag = ""
|
||||
kind = "Contract"
|
||||
backend = "goerli"
|
||||
address = "0x914FfCA8E10776a7d92305BCE2Be23B4f682Ab04"
|
||||
|
||||
[sources.watcher]
|
||||
enabled = true
|
||||
polling_interval = 20000
|
||||
max_step = 1000
|
||||
begin_height = 7961800
|
||||
|
||||
[default_watcher]
|
||||
enabled = true
|
||||
polling_interval = 30000
|
||||
max_step = 2000
|
||||
begin_height = 0
|
||||
25
configs/watcher.toml
Normal file
25
configs/watcher.toml
Normal file
@ -0,0 +1,25 @@
|
||||
# local msg_pool server port.
|
||||
msg_pool_port = 8720
|
||||
# local node url for watcher
|
||||
node_ws_url = "ws://127.0.0.1:9944"
|
||||
# local database url for data storage.
|
||||
db_url = "http://127.0.0.1:8710"
|
||||
# local database token for database usage.
|
||||
db_token = ""
|
||||
# local sgx key server url
|
||||
key_server_url = "https://localhost:8730"
|
||||
# used to generate LocalKeyStore, used to get AccountId in substrate.
|
||||
identity = "0x0000000000000000000000000000000000000000000000000000000000000000"
|
||||
# Notifies relayer of the event
|
||||
relayer_server_url = "http://localhost:8750"
|
||||
# seconds per block
|
||||
block_time = 3
|
||||
# blocks per epoch
|
||||
epoch_duration = 200
|
||||
|
||||
[network_config]
|
||||
port = 38700
|
||||
boot_nodes = ["/ip4/20.3.233.7/tcp/38700/p2p/12D3KooWEZopB8nMuMGFT24LrkGzxCEkwUpY4w5mgY78biy8ZiU5"]
|
||||
peer_key = "0x683740824cb70c50393d3fd7fe42e57df444ca93b62051f291d0ee3c71d88148"
|
||||
share_peer_interval = 30
|
||||
only_global_ips = true
|
||||
77
docker-compose.yml
Normal file
77
docker-compose.yml
Normal file
@ -0,0 +1,77 @@
|
||||
version: "3"
|
||||
services:
|
||||
bnk-node:
|
||||
image: boolnetwork/bnk-node:latest
|
||||
ports:
|
||||
- "9933:9933"
|
||||
- "9944:9944"
|
||||
- "30333:30333"
|
||||
environment:
|
||||
RUST_LOG: info
|
||||
volumes:
|
||||
- ./node-data:/data"
|
||||
command: |
|
||||
--unsafe-rpc-external
|
||||
--unsafe-ws-external
|
||||
--rpc-cors all
|
||||
|
||||
bnk-database:
|
||||
image: boolnetwork/bnk-database:latest
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "8710:8710"
|
||||
environment:
|
||||
RUST_LOG: info
|
||||
volumes:
|
||||
- ./configs/db.toml:/bnk/db.toml
|
||||
- ./data:/bnk/data
|
||||
|
||||
bnk-watcher:
|
||||
image: boolnetwork/bnk-watcher:latest
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "8720:8720"
|
||||
environment:
|
||||
RUST_LOG: info
|
||||
volumes:
|
||||
- ./configs/watcher.toml:/bnk/watcher.toml
|
||||
depends_on:
|
||||
- bnk-database
|
||||
|
||||
bnk-sgx-key-server:
|
||||
image: boolnetwork/bnk-sgx-key-server:latest
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "8730:8730"
|
||||
environment:
|
||||
RUST_LOG: info
|
||||
volumes:
|
||||
- ./configs/key.toml:/bnk/key.toml
|
||||
devices:
|
||||
- /dev/sgx/enclave
|
||||
- /dev/sgx/provision
|
||||
depends_on:
|
||||
- bnk-watcher
|
||||
|
||||
bnk-monitor:
|
||||
image: boolnetwork/bnk-monitor:latest
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "8740:8740"
|
||||
environment:
|
||||
RUST_LOG: warn,info=bnk_monitor
|
||||
volumes:
|
||||
- ./configs/monitor.toml:/bnk/monitor.toml
|
||||
- ./data/:/bnk/data
|
||||
|
||||
bnk-relayer:
|
||||
image: boolnetwork/bnk-relayer:latest
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "8750:8750"
|
||||
environment:
|
||||
RUST_LOG: debug
|
||||
command: |
|
||||
-w=http://127.0.0.1:8720
|
||||
-m=http://127.0.0.1:8740
|
||||
-p=8750
|
||||
Loading…
Reference in New Issue
Block a user