Random Number Generator (RNG)
Other Documentation
SON Configuration

SON configuration file

Example Config following SON config file is used as a template for SON test network.
Each node will require fine tuning to this config file, to set the parameters specific to that node.
1
# Endpoint for P2P node to listen on
2
p2p-endpoint = 0.0.0.0:9777
3
4
# P2P nodes to connect to on startup (may specify multiple times)
5
# seed-node =
6
7
# JSON array of P2P nodes to connect to on startup
8
seed-nodes = ["96.46.49.1:9777", "96.46.49.5:9777", "96.46.49.9:9777", "96.46.49.13:9777"]
9
10
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
11
# checkpoint =
12
13
# Endpoint for websocket RPC to listen on
14
rpc-endpoint = 0.0.0.0:8090
15
16
# Endpoint for TLS websocket RPC to listen on
17
# rpc-tls-endpoint =
18
19
# The TLS certificate file for this server
20
# server-pem =
21
22
# Password for this certificate
23
# server-pem-password =
24
25
# File to read Genesis State from
26
genesis-json = /peerplays/son-genesis.json
27
28
# Block signing key to use for init witnesses, overrides genesis file
29
# dbg-init-key =
30
31
# JSON file specifying API permissions
32
# api-access =
33
34
# Space-separated list of plugins to activate
35
plugins = witness account_history market_history accounts_list affiliate_stats bookie peerplays_sidechain
36
37
38
# ==============================================================================
39
# witness plugin options
40
# ==============================================================================
41
42
# Enable block production, even if the chain is stale.
43
enable-stale-production = true
44
45
# Percent of witnesses (0-99) that must be participating in order to produce blocks
46
required-participation = false
47
48
# ID of witness controlled by this node (e.g. "1.6.5", quotes are required, may specify multiple times)
49
# witness-id =
50
51
# IDs of multiple witnesses controlled by this node (e.g. ["1.6.5", "1.6.6"], quotes are required)
52
# witness-ids =
53
54
# Tuple of [PublicKey, WIF private key] (may specify multiple times)
55
private-key = ["TEST8eF6P2mvHssWGPN5VzEVC22RQkmTyrKskbHWhKbCZ45uwe2xzD", "5JzRHf68T8NT5T9fpDzRtYzxpafVUPPjCwUuxnwJ1L7hgwDBeNY"]
56
57
58
# ==============================================================================
59
# account_history plugin options
60
# ==============================================================================
61
62
# Account ID to track history for (may specify multiple times)
63
# track-account =
64
65
# Keep only those operations in memory that are related to account history tracking
66
partial-operations = 1
67
68
# Maximum number of operations per account will be kept in memory
69
max-ops-per-account = 100
70
71
72
# ==============================================================================
73
# market_history plugin options
74
# ==============================================================================
75
76
# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
77
bucket-size = [15,60,300,3600,86400]
78
79
# How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)
80
history-per-size = 1000
81
82
83
# ==============================================================================
84
# peerplays_sidechain plugin options
85
# ==============================================================================
86
87
# ID of SON controlled by this node (e.g. "1.27.5", quotes are required)
88
son-id = "1.27.0"
89
90
# IDs of multiple SONs controlled by this node (e.g. ["1.27.5", "1.27.6"], quotes are required)
91
# son-ids =
92
93
# Tuple of [PublicKey, WIF private key] (may specify multiple times)
94
peerplays-private-key = ["TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL", "5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF"]
95
96
# IP address of Bitcoin node
97
bitcoin-node-ip = 127.0.0.1
98
99
# ZMQ port of Bitcoin node
100
bitcoin-node-zmq-port = 11111
101
102
# RPC port of Bitcoin node
103
bitcoin-node-rpc-port = 8332
104
105
# Bitcoin RPC user
106
bitcoin-node-rpc-user = 1
107
108
# Bitcoin RPC password
109
bitcoin-node-rpc-password = 1
110
111
# Bitcoin wallet
112
bitcoin-wallet = son-wallet
113
114
# Bitcoin wallet password
115
bitcoin-wallet-password = ""
116
117
# Tuple of [Bitcoin public key, Bitcoin private key] (may specify multiple times)
118
bitcoin-private-key = ["03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275", "cSKyTeXidmj93dgbMFqgzD7yvxzA7QAYr5j9qDnY9seyhyv7gH2m"]
119
120
121
# ==============================================================================
122
# logging options
123
# ==============================================================================
124
#
125
# Logging configuration is loaded from logging.ini by default.
126
# If logging.ini exists, logging configuration added in this file will be ignored.
Copied!

Config file options that need to be changed

1
# P2P nodes to connect to on startup (may specify multiple times)
2
# seed-node =
3
4
# JSON array of P2P nodes to connect to on startup
5
seed-nodes = []
6
7
# Set the list of seed nodes you want to connect to at startup
8
# Examples:
9
10
seed-node = "1.2.3.4:9777"
11
seed-nodes = ["1.2.3.4:9777", "5.6.7.8:9777"]
12
13
# seed-node =
14
seed-nodes = ["1.2.3.4:9777", "5.6.7.8:9777"]
15
# Enable block production, even if the chain is stale.
16
enable-stale-production = false
17
18
# Set this parameter to true on one node only, all other nodes should have false
19
# ID of witness controlled by this node (e.g. "1.6.5", quotes are required, may specify multiple times)
20
# witness-id =
21
22
# IDs of multiple witnesses controlled by this node (e.g. ["1.6.5", "1.6.6"], quotes are required)
23
witness-ids = ["1.6.1", "1.6.2", "1.6.3", "1.6.4", "1.6.5", "1.6.6", "1.6.7", "1.6.8", "1.6.9", "1.6.10", "1.6.11"]"
24
25
# Set the list of witness ids belonging to your node
26
# Examples:
27
28
witness-id = "1.6.1"
29
witness-ids = []
30
31
# witness-id =
32
witness-ids = ["1.6.1", "1.6.2"]
33
# Tuple of [PublicKey, WIF private key] (may specify multiple times)
34
private-key = ["TEST6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
35
36
# Set your witness public/private key pair.
37
# ID of SON controlled by this node (e.g. "1.27.5", quotes are required)
38
son-id = "1.27.0"
39
40
# IDs of multiple SONs controlled by this node (e.g. ["1.27.5", "1.27.6"], quotes are required)
41
son-ids = ["1.27.0", "1.27.1", "1.27.2", "1.27.3", "1.27.4", "1.27.5", "1.27.6", "1.27.7", "1.27.8", "1.27.9", "1.27.10", "1.27.11", "1.27.12", "1.27.13", "1.27.14", "1.27.15"]
42
43
# Set the SON id belonging to your node
44
# Examples:
45
46
son-id = "1.27.1"
47
son-ids = []
48
49
# son-id =
50
son-ids = ["1.27.1"]
51
# Tuple of [PublicKey, WIF private key]
52
peerplays-private-key = ["TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL", "5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF"]
53
peerplays-private-key = ...
54
55
# Config file contains all default public/private key pairs for SON owner accounts
56
# No changes are required here, but unused key pairs may be removed
57
# List of keypairs is ordered, so first belongs to sonaccount01, last to sonaccount16
58
# Tuple of [Bitcoin public key, Bitcoin private key] (may specify multiple times)
59
bitcoin-private-key = ["03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275", "cSKyTeXidmj93dgbMFqgzD7yvxzA7QAYr5j9qDnY9seyhyv7gH2m"]
60
bitcoin-private-key = ...
61
62
# Config file contains all default public/private key pairs for SON
63
# No changes are required here, but unused key pairs may be removed
64
# List of keypairs is ordered, so first belongs to sonaccount01, last to sonaccount16
Copied!

Manually configuring single SON

1
# ==============================================================================
2
# peerplays_sidechain plugin options
3
# ==============================================================================
4
5
# ID of SON controlled by this node (e.g. "1.27.5", quotes are required)
6
son-id = "1.27.0"
7
8
# IDs of multiple SONs controlled by this node (e.g. ["1.27.5", "1.27.6"], quotes are required)
9
# son-ids =
10
11
# Tuple of [PublicKey, WIF private key] (may specify multiple times)
12
peerplays-private-key = ["TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL", "5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF"]
13
14
# IP address of Bitcoin node
15
bitcoin-node-ip = 127.0.0.1
16
17
# ZMQ port of Bitcoin node
18
bitcoin-node-zmq-port = 11111
19
20
# RPC port of Bitcoin node
21
bitcoin-node-rpc-port = 8332
22
23
# Bitcoin RPC user
24
bitcoin-node-rpc-user = 1
25
26
# Bitcoin RPC password
27
bitcoin-node-rpc-password = 1
28
29
# Bitcoin wallet
30
bitcoin-wallet = son-wallet
31
32
# Bitcoin wallet password
33
bitcoin-wallet-password = 9da115c9fa6fe7fd09390841ac91aee4
34
35
# Tuple of [Bitcoin public key, Bitcoin private key] (may specify multiple times)
36
bitcoin-private-key = ["03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275", "cSKyTeXidmj93dgbMFqgzD7yvxzA7QAYr5j9qDnY9seyhyv7gH2m"]
Copied!
On config file recreation, default values will be assigned to some of the properties, but some of them need to be changed or added manually for more complex testing environment.
To find values you need to put into config file, for particular SON, you need to get full SON Account info and its private key, using cli_wallet. Execute these commands with initialized wallet.
1
# get SON info for SON owned by sonaccount01
2
get_son sonaccount01
3
4
# response will be similar to this
5
# get_son sonaccount01
6
# {
7
# "id": "1.27.0",
8
# "son_account": "1.2.36",
9
# "vote_id": "3:38",
10
# "total_votes": 0,
11
# "url": "http://sonaddreess01.com",
12
# "deposit": "1.13.1",
13
# "signing_key": "TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL",
14
# "pay_vb": "1.13.2",
15
# "statistics": "2.24.0",
16
# "status": "active",
17
# "sidechain_public_keys": [[
18
# "bitcoin",
19
# "03456772301e221026269d3095ab5cb623fc239835b583ae4632f99a15107ef275"
20
# ]
21
# ]
22
# }
23
24
# Get the private key for signing_key of sonaccount01
25
unlocked >>> get_private_key TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL
26
27
# response will be similar to this
28
# get_private_key TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL
29
# "5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF"
30
31
# We have all we need
32
# son-id (1.27.0)
33
# public key ("TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL")
34
# private keys ("5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF")
Copied!
Our config params should look like this now
1
son-id = "1.27.0"
2
peerplays-private-key = ["TEST8TCQFzyYDp3DPgWZ24261fMPSCzXxVyoF3miWeTj6JTi2DZdrL","5K7tjTnFn2zasimVmebUiH1yawgwK9YXm2chUwcurcHgqms9JaF"]
Copied!
Now, we need to create a new bitcoin address and get its public and private key, and add them to config file
1
# create new address in a wallet
2
docker exec bitcoind-node bitcoin-cli -rpcuser=1 -rpcpassword=1 -rpcwallet="son-wallet" getnewaddress
3
# response will be similar to this
4
# 2N8vYSFg9MAghj5nNC2ZURYcZTKcck8M1PU
5
6
# get info about this address
7
docker exec bitcoind-node bitcoin-cli -rpcuser=1 -rpcpassword=1 -rpcwallet="son-wallet" getaddressinfo 2N8vYSFg9MAghj5nNC2ZURYcZTKcck8M1PU
8
9
# response will be similar to this
10
# {
11
# "address": "2N8vYSFg9MAghj5nNC2ZURYcZTKcck8M1PU",
12
# "scriptPubKey": "a914abf98238ba69bacc38a613405caaeee484f6810e87",
13
# "ismine": true,
14
# "solvable": true,
15
# "desc": "sh(wpkh([153472fd/0'/0'/31']02a6d0cd88e927afc34da3fb364a681d42889547af70b1589069364febd3e0ac29))#k8z2zlkg",
16
# "iswatchonly": false,
17
# "isscript": true,
18
# "iswitness": false,
19
# "script": "witness_v0_keyhash",
20
# "hex": "001432a344b250250dd279b1658b201181ccab890141",
21
# "pubkey": "02a6d0cd88e927afc34da3fb364a681d42889547af70b1589069364febd3e0ac29",
22
# "embedded": {
23
# "isscript": false,
24
# "iswitness": true,
25
# "witness_version": 0,
26
# "witness_program": "32a344b250250dd279b1658b201181ccab890141",
27
# "pubkey": "02a6d0cd88e927afc34da3fb364a681d42889547af70b1589069364febd3e0ac29",
28
# "address": "bcrt1qx235fvjsy5xay7d3vk9jqyvpej4cjq2plrqjk2",
29
# "scriptPubKey": "001432a344b250250dd279b1658b201181ccab890141"
30
# },
31
# "label": "",
32
# "ischange": false,
33
# "timestamp": 1571845292,
34
# "hdkeypath": "m/0'/0'/31'",
35
# "hdseedid": "7fc94a298c785719434c63458bb41bc1995a270d",
36
# "hdmasterfingerprint": "153472fd",
37
# "labels": [
38
# {
39
# "name": "",
40
# "purpose": "receive"
41
# }
42
# ]
43
# }
44
45
# pubkey is what we will set as bitcoin-public-key in config file
46
47
# get private key for this address
48
docker exec bitcoind-node bitcoin-cli -rpcuser=1 -rpcpassword=1 -rpcwallet="" dumpprivkey 2N8vYSFg9MAghj5nNC2ZURYcZTKcck8M1PU
49
50
# response will be similar to this
51
# cT9CBy22gmyyXfZgRvVaddZodjFgeuN7R18tGJe9UZeAjizgY2z4
52
53
# this value is what we will set as bitcoin-private-key in config file
54
55
# We have all we need
56
# bitcoin public key ("02a6d0cd88e927afc34da3fb364a681d42889547af70b1589069364febd3e0ac29")
57
# bitcoin private key ("cT9CBy22gmyyXfZgRvVaddZodjFgeuN7R18tGJe9UZeAjizgY2z4")
Copied!
Our config param should look like this now
1
bitcoin-private-key = ["02a6d0cd88e927afc34da3fb364a681d42889547af70b1589069364febd3e0ac29", "cT9CBy22gmyyXfZgRvVaddZodjFgeuN7R18tGJe9UZeAjizgY2z4"]
Copied!

Configuring a Witness Node

For more realistic test scenario, witnesses also need to be configured with their own IDs, public and private keys.