Add example configs

This commit is contained in:
Kirill Fedoseev 2020-06-05 14:44:34 +03:00
parent 0b9c369695
commit d597f08694
6 changed files with 191 additions and 0 deletions

41
configs/genesis.json Normal file
View File

@ -0,0 +1,41 @@
{
"config": {
"chainId": 111,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"homesteadBlock": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"istanbul": {
"epoch": 30000,
"policy": 0,
"ceil2Nby3Block": 0
},
"maxCodeSizeConfig": [
{
"block": 0,
"size": 35
}
],
"isQuorum": true
},
"nonce": "0x0",
"timestamp": "0x5eda1803",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f85ad5947de1cd14693fbe1240011afe8c68d61012e51babb8410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
"gasLimit": "0x989680",
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"7de1cd14693fbe1240011afe8c68d61012e51bab": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

100
configs/geth-config.toml Normal file
View File

@ -0,0 +1,100 @@
[Eth]
NetworkId = 111
SyncMode = "full"
NoPruning = true
NoPrefetch = false
LightPeers = 100
UltraLightFraction = 75
DatabaseCache = 768
DatabaseFreezer = ""
TrieCleanCache = 256
TrieDirtyCache = 256
TrieTimeout = 3600000000000
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
[Eth.Miner]
GasFloor = 700000000
GasCeil = 800000000
GasPrice = 1000000000
Recommit = 3000000000
Noverify = false
[Eth.Ethash]
CacheDir = "ethash"
CachesInMem = 2
CachesOnDisk = 3
DatasetDir = "/root/.ethash"
DatasetsInMem = 1
DatasetsOnDisk = 2
PowMode = 0
[Eth.TxPool]
Locals = []
NoLocals = false
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 1
PriceBump = 10
AccountSlots = 16
GlobalSlots = 4096
AccountQueue = 64
GlobalQueue = 1024
Lifetime = 10800000000000
TransactionSizeLimit = 64
MaxCodeSize = 24
[Eth.GPO]
Blocks = 20
Percentile = 60
[Eth.Istanbul]
RequestTimeout = 10000
BlockPeriod = 5
Epoch = 30000
Ceil2Nby3Block = 0
[Shh]
MaxMessageSize = 1048576
MinimumAcceptedPOW = 2e-01
RestrictConnectionBetweenLightClients = true
[Node]
UserIdent = "node"
DataDir = "/qdata/dd"
KeyStoreDir = "/qdata/dd/keystore"
omitempty = ""
NoUSB = true
IPCPath = "geth.ipc"
HTTPHost = "0.0.0.0"
HTTPPort = 8545
HTTPCors = ["*"]
HTTPVirtualHosts = ["*"]
HTTPModules = ["admin", "db", "eth", "debug", "miner", "net", "shh", "txpool", "personal", "web3", "istanbul"]
WSHost = "0.0.0.0"
WSPort = 8645
WSOrigins = ["*"]
WSModules = ["net", "web3", "eth", "shh"]
GraphQLPort = 8547
GraphQLVirtualHosts = ["localhost"]
[Node.P2P]
MaxPeers = 50
NoDiscovery = true
BootstrapNodes = []
BootstrapNodesV5 = []
StaticNodes = []
TrustedNodes = []
ListenAddr = ":21000"
EnableMsgEvents = false
[Node.HTTPTimeouts]
ReadTimeout = 30000000000
WriteTimeout = 30000000000
IdleTimeout = 120000000000
[Dashboard]
Host = "localhost"
Port = 8080
Refresh = 5000000000

View File

@ -0,0 +1,5 @@
[
"enode://ce6865299217787002fdcbd0f71f1aad006fa2f15131e6aaf3fcc001ba6fdb5b555899af70d3dbbab09847692f9a6e9f58cb3a3573e7048de951503b64d7c128@0.0.0.0:30303?discport=0",
"enode://8510cbf9fbfa8e7b41e052f9ac656f04f80456439087030ffee6e5d1fa96751c79da7e1e6f95d0846dc43d1c7428cf38977794d7cd2dfa7cacae8b4beeaa64ff@0.0.0.0:30303?discport=0",
"enode://b01be7ebd34b0326557b7144bf7f96b4902ef08d894b4748eb98625d84291e0cf9472b53c820d55e6d7a27628c7f4df55fbdbc279f6ed5e2350c6ec6e5d70030@0.0.0.0:30303?discport=0"
]

39
docker-compose.yml Normal file
View File

@ -0,0 +1,39 @@
version: "3.8"
services:
node:
restart: "on-failure"
image: quorumengineering/quorum:latest
healthcheck:
test: ["CMD", "wget", "--spider", "--proxy", "off", "http://localhost:8545"]
interval: 3s
timeout: 3s
retries: 10
start_period: 5s
entrypoint:
- /bin/sh
- -c
- |
DDIR=/qdata/dd
GENESIS_FILE="$${DDIR}/genesis.json"
mkdir -p $${DDIR}
if [ -z "$$(ls -A $${DDIR})" ]; then
cp -RT /configs $${DDIR}
mkdir $${DDIR}/keystore
mkdir $${DDIR}/geth
cp /validator_config/info $${DDIR}/keystore
cp /validator_config/nodekey $${DDIR}/geth
fi
geth --datadir $${DDIR} init $${GENESIS_FILE}
geth --config /configs/geth-config.toml --verbosity 5 --gcmode archive --nodekey $${DDIR}/geth/nodekey --mine --minerthreads 1
hostname: node
ports:
- "8545:8545"
- "8645:8645"
environment:
PRIVATE_CONFIG: ignore
volumes:
- node_vol:/qdata
- ./configs:/configs:ro
- ./validators/0:/validator_config:ro
volumes:
node_vol:

5
validators/0/info Normal file
View File

@ -0,0 +1,5 @@
{
"Address": "0x7de1cd14693fbe1240011afe8c68d61012e51bab",
"Nodekey": "5c7a7055c4bd1be37256455d014406e8d5c696a93edc2aa70889108ba59fd9ea",
"NodeInfo": "enode://3ef78ad4f64863ee51a6cb88073e899c5c732ca58570df12c2337cb8bced6ad3d775beccdd3f5378449785b6fd5fce085edfdfd6943b28b1ce336b62d37205f4@0.0.0.0:30303?discport=0"
}

1
validators/0/nodekey Normal file
View File

@ -0,0 +1 @@
5c7a7055c4bd1be37256455d014406e8d5c696a93edc2aa70889108ba59fd9ea