-
Notifications
You must be signed in to change notification settings - Fork 146
feat(chain): Add Westend network as command line chain option
#3103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| [global] | ||
| basepath = "~/.gossamer/westend" | ||
| log = "info" | ||
| metrics-address = "localhost:9876" | ||
|
|
||
| [log] | ||
| core = "" | ||
| network = "" | ||
| rpc = "" | ||
| state = "" | ||
| runtime = "" | ||
| babe = "" | ||
| grandpa = "" | ||
| sync = "" | ||
| digest = "" | ||
|
|
||
| [init] | ||
| genesis = "./chain/westend/genesis.json" | ||
|
|
||
| [account] | ||
| key = "" | ||
| unlock = "" | ||
|
|
||
| [core] | ||
| roles = 1 | ||
| babe-authority = false | ||
| grandpa-authority = false | ||
|
|
||
| [network] | ||
| port = 7001 | ||
| nobootstrap = false | ||
| nomdns = false | ||
|
|
||
| [rpc] | ||
| enabled = false | ||
| external = false | ||
| port = 8545 | ||
| host = "localhost" | ||
| modules = [ | ||
| "system", | ||
| "author", | ||
| "chain", | ||
| "state", | ||
| "rpc", | ||
| "grandpa", | ||
| "offchain", | ||
| "childstate", | ||
| "syncstate", | ||
| "payment", | ||
| ] | ||
| ws-port = 8546 | ||
| ws = false | ||
| ws-external = false | ||
|
|
||
|
|
||
| [pprof] | ||
| listening-address = "localhost:6060" | ||
| block-rate = 0 | ||
| mutex-rate = 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| // Copyright 2021 ChainSafe Systems (ON) | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
|
|
||
| package westend | ||
|
|
||
| import ( | ||
| "github.com/ChainSafe/gossamer/internal/log" | ||
| "github.com/ChainSafe/gossamer/lib/common" | ||
| "github.com/ChainSafe/gossamer/lib/genesis" | ||
| "github.com/ChainSafe/gossamer/lib/runtime/wasmer" | ||
| ) | ||
|
|
||
| var ( | ||
| // GlobalConfig | ||
|
|
||
| // DefaultName Default node name | ||
| DefaultName = string("Westend") | ||
| // DefaultID Default chain ID | ||
| DefaultID = string("westend2") | ||
| // DefaultConfig Default toml configuration path | ||
| DefaultConfig = string("./chain/westend/config.toml") | ||
| // DefaultBasePath Default node base directory path | ||
| DefaultBasePath = string("~/.gossamer/westend") | ||
|
|
||
| // DefaultLvl is the default log level | ||
| DefaultLvl = log.Info | ||
|
|
||
| // DefaultPruningMode is the default pruning mode | ||
| DefaultPruningMode = "archive" | ||
| // DefaultRetainBlocks is the default pruning mode | ||
| DefaultRetainBlocks = uint32(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/westend/genesis.json") | ||
|
|
||
| // AccountConfig | ||
|
|
||
| // DefaultKey Default account key | ||
| DefaultKey = string("") | ||
| // DefaultUnlock Default account 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 = common.FullNodeRole // 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) | ||
| ) | ||
|
|
||
| const ( | ||
| // PprofConfig | ||
|
|
||
| // 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 | ||
| ) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.