Skip to content

Commit

Permalink
Add v0.9.20 chain specs & configs
Browse files Browse the repository at this point in the history
Closes #2419
  • Loading branch information
danforbes authored and timwu20 committed Aug 3, 2022
1 parent 4f311a5 commit 5376c4d
Show file tree
Hide file tree
Showing 28 changed files with 2,138 additions and 779 deletions.
47 changes: 47 additions & 0 deletions chain/dev-staking/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[global]
basepath = "~/.gossamer/dev-staking"
log = "info"
metrics-address = ":9876"

[log]
core = ""
network = ""
rpc = ""
state = ""
runtime = ""
babe = ""
grandpa = ""
sync = ""
digest = ""

[init]
genesis = "./chain/dev-staking/dev-staking-spec-raw.json"

[account]
key = "alice"
unlock = ""

[core]
roles = 4
babe-authority = true
grandpa-authority = true
babe-lead = true

[network]
port = 7001
nobootstrap = false
nomdns = false

[rpc]
enabled = true
ws = true
port = 8545
host = "localhost"
modules = ["system", "author", "chain", "state", "rpc", "grandpa", "offchain", "childstate", "syncstate", "payment"]
ws-port = 8546

[pprof]
enabled = false
listening-address = "localhost:6060"
block-rate = 0
mutex-rate = 0
111 changes: 111 additions & 0 deletions chain/dev-staking/defaults.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
// Copyright 2021 ChainSafe Systems (ON)
// SPDX-License-Identifier: LGPL-3.0-only

package dev

import (
"github.com/ChainSafe/gossamer/internal/log"
"github.com/ChainSafe/gossamer/lib/genesis"
"github.com/ChainSafe/gossamer/lib/runtime/wasmer"
)

var (
// GlobalConfig

// DefaultName is the node name
DefaultName = string("Gossamer")
// DefaultID is the chain ID
DefaultID = string("dev")
// DefaultConfig is the toml configuration path
DefaultConfig = string("./chain/dev/config.toml")
// DefaultBasePath is the node base directory path
DefaultBasePath = string("~/.gossamer/dev")

// DefaultMetricsAddress is the default metrics server listening address.
DefaultMetricsAddress = ":9876"

// DefaultLvl is the default log level
DefaultLvl = log.Info

// DefaultPruningMode is the default pruning mode
DefaultPruningMode = "archive"
// DefaultRetainBlocks is the default retained blocks
DefaultRetainBlocks = int64(512)

// DefaultTelemetryURLs is the default URL of the telemetry server to connect to.
DefaultTelemetryURLs []genesis.TelemetryEndpoint

// InitConfig

// DefaultGenesis is the default genesis configuration path
DefaultGenesis = string("./chain/dev/genesis-spec.json")

// AccountConfig

// DefaultKey is the default account key
DefaultKey = string("alice")
// DefaultUnlock is the account to unlock
DefaultUnlock = string("")

// CoreConfig

// DefaultAuthority is true if the node is a block producer and a grandpa authority
DefaultAuthority = true
// DefaultRoles Default node roles
DefaultRoles = byte(4) // authority node (see Table D.2)
// DefaultBabeAuthority is true if the node is a block producer (overwrites previous settings)
DefaultBabeAuthority = true
// DefaultGrandpaAuthority is true if the node is a grandpa authority (overwrites previous settings)
DefaultGrandpaAuthority = true
// DefaultWasmInterpreter is the name of the wasm interpreter to use by default
DefaultWasmInterpreter = wasmer.Name

// NetworkConfig

// DefaultNetworkPort network port
DefaultNetworkPort = uint16(7001)
// DefaultNetworkBootnodes network bootnodes
DefaultNetworkBootnodes = []string(nil)
// DefaultNoBootstrap disables bootstrap
DefaultNoBootstrap = false
// DefaultNoMDNS disables mDNS discovery
DefaultNoMDNS = false

// RPCConfig

// DefaultRPCHTTPHost rpc host
DefaultRPCHTTPHost = string("localhost")
// DefaultRPCHTTPPort rpc port
DefaultRPCHTTPPort = uint32(8545)
// DefaultRPCModules rpc modules
DefaultRPCModules = []string{
"system", "author", "chain",
"state", "rpc", "grandpa",
"offchain", "childstate", "syncstate",
"payment",
}
// DefaultRPCWSPort rpc websocket port
DefaultRPCWSPort = uint32(8546)
// DefaultRPCEnabled enables the RPC server
DefaultRPCEnabled = true
// DefaultWSEnabled enables the WS server
DefaultWSEnabled = true
)

const (
// PprofConfig

// DefaultPprofEnabled to indicate the pprof http server should be enabled or not.
DefaultPprofEnabled = true

// DefaultPprofListeningAddress default pprof HTTP server listening address.
DefaultPprofListeningAddress = "localhost:6060"

// DefaultPprofBlockRate default block profile rate.
// Set to 0 to disable profiling.
DefaultPprofBlockRate = 0

// DefaultPprofMutexRate default mutex profile rate.
// Set to 0 to disable profiling.
DefaultPprofMutexRate = 0
)
83 changes: 83 additions & 0 deletions chain/dev-staking/dev-staking-spec-raw.json

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions chain/dev-staking/dev-staking-spec.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion chain/dev/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sync = ""
digest = ""

[init]
genesis = "./chain/dev/genesis-spec.json"
genesis = "./chain/dev/dev-spec-raw.json"

[account]
key = "alice"
Expand Down
47 changes: 47 additions & 0 deletions chain/dev/dev-spec-raw.json

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions chain/dev/dev-spec.json

Large diffs are not rendered by default.

Loading

0 comments on commit 5376c4d

Please sign in to comment.