-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
159 lines (154 loc) · 7.43 KB
/
config.yaml
File metadata and controls
159 lines (154 loc) · 7.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
## node configurations template
node:
mode: "multiminer"
## the profile of node: devnet/testnet/testnet2/mainnet
profile: "testnet2"
# default chain url for miner, can be overwritten in miners[] as below
chainWsUrl: "ws://127.0.0.1:9944"
## chain configurations
## set option: '--skip-chain' or '-s' to skip installing chain (mineradm install --skip-chain)
## if set option: --skip-chain, please set official chain in miner[].chainWsUrl or others chain you know
chain:
## chain mode: rpcnode, the name of the rpc node
name: "cess"
## the port of rpc node
port: 30336
## listen at port 9944
rpcPort: 9944
## This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database
## archive: Keep the data of all blocks
pruning: 8000
## miners configurations (multi miners mode)
miners:
- name: "miner1"
# Use this endpoint to receive/send file, can be a domain or ip:port, default value: hostPublicIp:port
apiendpoint: ""
port: 15001
# Maximum space used in each miner, the unit is GiB
# The declaration space on chain is auto set by the value of `UseSpace after round up to the closest TB` when the miner first run
# If set UseSpace 2300, that means declare 3 TiB space on the chain
# If set UseSpace 300, that means declare 1 TiB space on the chain
UseSpace: 1000
# Number of cpu's processor used, 0 means use all
UseCpu: 2
# earnings account
earningsAcc: "cXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Staking account
# If you fill in the staking account, the staking will be paid by the staking account you set,
# otherwise the staking will be paid by the signatureAcc(mnemonic).
stakingAcc: ""
# Signature account mnemonic
# each storage node's mnemonic should be different
mnemonic: "wheel demand repair proof wolf lumber drum clump clown ivory property notice"
# miner work at this path
diskPath: "/mnt/cess_storage1"
# The rpc endpoint of the chain
# `official chain: "wss://t2-rpc.cess.network"`
chainWsUrl: "ws://127.0.0.1:9944"
backupChainWsUrls: [ "wss://t2-rpc.cess.network" ]
# Default 12 second for transaction with chain
Timeout: 12
# Tee public key
# Attention: Storage miner will not use public tee nodes on chain if set custom tee nodes in config.yaml
# TeeList:
# - 0x3222602a6be742ec9edc3c31cb48dd8a48001bc6efba6c2ed59cd728cdf46a55
# - 0x.....
- name: "miner2"
apiendpoint: ""
port: 15002
UseSpace: 1000
UseCpu: 2
earningsAcc: "cXxxx"
stakingAcc: ""
mnemonic: "xxx"
diskPath: "/mnt/cess_storage2"
chainWsUrl: "ws://127.0.0.1:9944"
backupChainWsUrls: [ "wss://t2-rpc.cess.network" ]
Timeout: 12
# cacher is a gateway which provide an integration interface for all of your storage miners
cacher:
# Enable is whether to enable the cacher service
enable: false
# Workspace is the root directory of all working subdirectories of the node. Please reserve at least 16 GiB of storage space for it.
WorkSpace: /mnt/cess_cacher
# default 16 GB for storage space: 16* 1024 * 1024 * 1024 = 17179869184
CacheSize: 17179869184
# The RPC address of the blockchain where the cache protocol smart contract is deployed, usually the CESS chain
Rpcs:
- "ws://127.0.0.1:9944"
- "ws://t2-rpc.cess.network"
# SecretKey is the key of the node working account (Ethereum wallet account), which is used to initiate a call request to the cache protocol contract (working on EVM).
# By default, it is not filled in, which means that it does not participate in the CD2N network and only has the most basic data interaction with the gateway.
SecretKey: ""
# Token is the NFT access certificate for nodes to join the CD2N network and will be released in subsequent versions.
Token: ""
# TokenAcc is the holder account(Ethereum wallet account) of the above NFT token.
TokenAcc: ""
# TokenAccSign is an Ethereum account signature, which is the token holder's proof of holding the token.
# Signature methods and tools will be published in the document.
TokenAccSign: ""
# CD2N cache protocol contract address, which is responsible for node traffic statistics and reward distribution, and works on EVM.
ProtoContract: "0xce078A9098dF68189Cbe7A42FC629A4bDCe7dDD4"
# Local storage nodes configuration file, currently only available for the "Cess Multi-Miner Admin" script.
# The cacher automatically imports the storage node information started by the script through it.
MinerConfigPath: /opt/cess/mineradm/config.yaml
# You can manually configure the following connection options to make the cacher serve the specified retriever node:
# By default, it points to the CESS official retriever node.
# If you register your cacher to the cache protocol contract,
# it will automatically connect to some publicly available retriever nodes to get more opportunities to get rewards.
CdnNodes:
- Account: "0xb7B43408864aEa0449D8F813380f8ec424F7a775"
Endpoint: "https://retriever.cess.network"
# You can also manually import storage nodes through the following configuration.
# The cacher will automatically check the availability of the storage node and complete other information from the chain.
StorageNodes:
- Account: "" # CESS account address
Endpoint: "" # Http address
# miners monitor service, send alert with email/webhook when miners is down or get punishment
watchdog:
# enable miners monitor or not
enable: false
# external: server run with 0.0.0.0 or 127.0.0.1
external: true
# apiUrl: watchdog-web request this apiUrl to fetch data from watchdog: <my_public_ip:13081 or a domain>
apiUrl: ""
# watchdog server listen http port at: 13081
port: 13081
# the interval of query data from chain for each miner, 1800 <= scrapeInterval <= 3600
scrapeInterval: 1800
# watchdog can scrape miners data from this hosts
hosts:
- ip: 127.0.0.1 # 127.x, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 is a private IP
# make sure docker daemon listen at 2375: https://docs.docker.com/config/daemon/remote-access/
port: 2375
# Configure remote access for Docker daemon in public network must use tls to make sure mnemonic safe
# Set ca/crt/key path if the ip no belongs to [ 127.x, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 ]
# https ≠ security, Set a public endpoint is not recommended
- ip: 1.1.1.1 # 1.1.1.1 is a public IP
# make sure docker daemon tls listen at 2376: https://docs.docker.com/engine/security/protect-access/
port: 2376
# please make sure each file name is unique
ca_path: /etc/docker/tls/1.1.1.1-ca.pem
cert_path: /etc/docker/tls/1.1.1.1-cert.pem
key_path: /etc/docker/tls/1.1.1.1-key.pem
alert:
# enable alert or not
enable: false
# send webhook to alert someone
webhook:
- https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
- https://discordapp.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# send email to alert someone
email:
smtp_endpoint: smtp.example.com
smtp_port: 80
smtp_account: myservice@example.com
smtp_password: my_pwd
receiver:
- example1@gmail.com
- example2@outlook.com
auth:
username: "admin" # env: WATCHDOG_USERNAME, default: cess
password: "passwd" # env: WATCHDOG_PASSWORD, default: Cess123456
jwt_secret_key: "your-random-secret-key" # env: WATCHDOG_JWT_SECRET
token_expiry: 1 # 1 hour # env: WATCHDOG_TOKEN_EXPIRY