This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
CLI: refactoring: remove Options from sc_service::Configuration's fields #5271
Merged
Merged
Changes from 126 commits
Commits
Show all changes
258 commits
Select commit
Hold shift + click to select a range
32cf27d
WIP
cecton b455e22
Rename IntoConfiguration to CliConfiguration
cecton 71ccb0f
Renamed into_configuration to create_configuration
cecton 5c723ea
WIP
cecton 94ac935
WIP
cecton ff7b3ff
Move keystore params to its own module
cecton 88c3171
Use in-memory keystore even for build-spec
cecton 5f3ec11
Enforce proper value for node name
cecton 41a7e80
dev_key_seed
cecton 541a6f2
Telemetry endpoints
cecton b055b38
rustfmt
cecton fe59624
Converted all RunCmd
cecton 07e9bb5
rustfmt
cecton 5794bb4
Added export-blocks
cecton 1bcc01d
Missed something
cecton 0e24aab
Removed config_path in NetworkConfiguration (not used)
cecton 01e37fa
Fixed warnings
cecton 2b973ba
public_addresses is used but never set, keeping it
cecton f22007c
Merge Configuration.node and NetworkConfiguration.node_name
cecton a5acb71
Added: import-blocks
cecton c2ac3d3
Adding a proc_macro to help impl SubstrateCli
cecton 7b2a46f
WIP
cecton 5430e1a
WIP
cecton 2405569
WIP
cecton 7c11cde
Re-export spec_factory from sc_cli
cecton ae65701
Re-added all the commands
cecton 0e58648
Refactored node_key_params
cecton ed60ce7
Fixed previous refucktoring
cecton 8a106a5
Clean-up and removed full_version()
cecton 94f1d50
Renamed get_is_dev to not confuse with Configuration field
cecton 38d64a5
Fixed sc-cli-derive example
cecton 983bd5d
Fixing tests
cecton 9875eeb
Fixing tests and removing some (will re-add later)
cecton 505296e
Fixing more tests
cecton 052de1a
Removes the need of type parameter
cecton defeda3
Converting bin/node and simplifying API
cecton 349ab93
Converting more
cecton 957b3c5
Converting last command
cecton 9fdffdb
WIP
cecton c755a4a
Fixing tests and added default for WasmExecutionMethod
cecton 09b6450
Fixing stuff
cecton 98545b8
Fixed something I broke oops
cecton 72981fc
Update Cargo.lock
cecton e18c782
Moving things around
cecton 3f071cf
Convert everything to Result
cecton da453d1
Added new macros to simplify the impl of CliConfiguration
cecton 9c516dd
Added a macro to generate CliConfiguration automatically for subcommands
cecton d41a269
Revert... too many macros (this one is not really useful)
cecton c8b00a6
Renamed is_dev to get_is_dev
cecton 547ed24
Fixed name roles (this is plural, not singular)
cecton e1d73d5
Clean-up
cecton 08294e6
Re-export NodeKeyConfig and TelemetryEndpoints from sc_service
cecton fcf9882
Improve styling/formatting
cecton b950f73
Added copyrights
cecton bd72413
Added doc and fixed warnings
cecton a94fb8f
Added myself to code owners
cecton e6464c0
Yes it is needed according to the history
cecton e55292e
Revert formatting
cecton 3b3cbde
Update from parent 'origin/master' (no conflict)
cecton aaf4b48
Update from parent 'origin/master' (conflicts)
cecton 39f60e0
Update from parent 'origin/master' (conflicts)
cecton c71fa1d
Update from parent 'origin/master' (no conflict)
cecton 5db8b05
Update from parent 'origin/master' (conflicts)
cecton bfe8a75
Update from parent 'origin/master' (no conflict)
cecton 924ca71
Update from parent 'origin/master' (conflicts)
cecton 1b456c1
Update from parent 'origin/master' (no conflict)
cecton 679c950
Update from parent 'origin/master' (conflicts)
cecton a201a5a
Update from parent 'origin/master' (no conflict)
cecton f60a930
Update from parent 'origin/master' (conflicts)
cecton f6154db
Update from parent 'origin/master' (no conflict)
cecton 42e0068
Update from parent 'origin/master' (conflicts)
cecton 005a152
Update from parent 'origin/master' (conflicts)
cecton 6604f06
Update from parent 'origin/master' (no conflict)
cecton 2c3c536
Update from parent 'origin/master' (conflicts)
cecton 6e9914e
Update from parent 'origin/master' (no conflict)
cecton 925c8ce
Update from parent 'origin/master' (conflicts)
cecton d1f9754
Update from parent 'origin/master' (no conflict)
cecton 7925233
Update from parent 'origin/master' (conflicts)
cecton 78b373b
Update from parent 'origin/master' (no conflict)
cecton e95097b
Update from parent 'origin/master' (conflicts)
cecton 66fd4bc
Fixing conflict
cecton 7852dd7
Update from parent 'origin/master' (conflicts)
cecton 50613ce
Update from parent 'origin/master' (no conflict)
cecton 86e5d89
Update from parent 'origin/master' (conflicts)
cecton c3ad5d4
Update from parent 'origin/master' (no conflict)
cecton 8244a74
Update from parent 'origin/master' (conflicts)
cecton 7efc74a
Update from parent 'origin/master' (no conflict)
cecton 153f156
Update from parent 'origin/master' (conflicts)
cecton c527778
Updated build.rs
cecton d08a9c9
Update from parent 'origin/master' (no conflict)
cecton 240b7ac
Update from parent 'origin/master' (conflicts)
cecton 67aa412
Update from parent 'origin/master' (no conflict)
cecton 4123a66
Update from parent 'origin/master' (conflicts)
cecton 4b1070c
Update from parent 'origin/master' (no conflict)
cecton 93bbb53
Update from parent 'origin/master' (conflicts)
cecton 113c6e2
Update from parent 'origin/master' (no conflict)
cecton 58e0c7c
Update from parent 'origin/master' (conflicts)
cecton bbc7d54
Update from parent 'origin/master' (no conflict)
cecton 5fbab29
Update from parent 'origin/master' (conflicts)
cecton f9a9145
Update from parent 'origin/master' (no conflict)
cecton 1131b3a
Update from parent 'origin/master' (conflicts)
cecton dd1b4cd
Update from parent 'origin/master' (no conflict)
cecton feb4d76
Update from parent 'origin/master' (conflicts)
cecton bd87787
Update from parent 'origin/master' (no conflict)
cecton 9b39164
Update from parent 'origin/master' (conflicts)
cecton 0016aa1
Update from parent 'origin/master' (no conflict)
cecton a423bbb
Update from parent 'origin/master' (conflicts)
cecton 71cbf2e
Update from parent 'origin/master' (no conflict)
cecton 97f281e
Cargo.lock
cecton 07eb393
Clean-up
cecton 1c88217
Update client/cli-derive/Cargo.toml
cecton c0ef8cb
Fail if using proc_macro and build.rs is not set properly
cecton 85892f6
Dropped all get_ in front of methods
cecton 7aa8040
Update from parent 'origin/master' (no conflict)
cecton dc7703c
Update from parent 'origin/master' (conflicts)
cecton af11693
Clean-up
cecton 89b519c
Fixing proc macro missing env var
cecton 65349dd
Get the configuration inside the Runtime (needed for polkadot)
cecton 6331d26
Clean-up
cecton ff2e47f
Get is_dev from argument like the others
cecton 3e03f69
Get chain ID instead of chain spec from shared params
cecton 3c68411
&self is passed to spec_factory/load_spec
cecton 86a7adc
Wrong text
cecton a62448b
Fix example
cecton ef5a2fd
Officialize macro and made a cool doc
cecton ad40ed7
Renamed spec_factory to load_spec (substrate_cli_configuration)
cecton b7b7e1a
Removed not so useful ChainSpec
cecton 6599e13
Renamed SubstrateCLI to SubstrateCli
cecton f9102a2
Added changelog for impl_version being full now
cecton 4ddbcd1
Renamed Runtime to Runner
cecton 14c22ee
Update from parent 'origin/master' (no conflict)
cecton 575343c
Update from parent 'origin/master' (conflicts)
cecton 0e23a14
Update changelog to show example
cecton d32defd
Removed option on database cache size
cecton b4580b0
WIP
cecton 1303520
Fix on removal of option
cecton ffeeea7
typo
cecton 59208c7
Clean-up imports
cecton 2fc46d7
Added info in Cargo.toml
cecton fb3b7c9
typo
cecton cc866bb
remarks
cecton 7241a23
Moved function for build.rs to substrate-build-script-utils
cecton 38db0bf
Fixed example & test of cli-derive
cecton 61ef62f
Moved function for build.rs to substrate-build-script-utils
cecton 4f7e1bc
Renamed substrate_cli_configuration to substrate_cli oops
cecton 0598aa3
Added documentation and wrapper macro
cecton de25e87
Removed option on database cache size
cecton 0aebd52
Removed option on database cache size
cecton 2bd04e8
Clean-up
cecton 30353d1
Reduce risk of errors due to typos
cecton 2105c0c
Removed option on database cache size
cecton 0ae2794
Added NOTE as suggested
cecton 78b5243
Added doc as suggested
cecton e14fbab
Fixed test
cecton a84557e
typo
cecton 6e7882c
Update from parent 'origin/master' (no conflict)
cecton ae303e4
Update from parent 'origin/master' (conflicts)
cecton 8a03f2e
Update from parent 'origin/master' (no conflict)
cecton 66539c7
renamed runtime to runner
cecton 2ffad91
Fixed weird argument
cecton d4ebc23
More commas
cecton 10db8cc
Moved client/cli-derive to client/cli/derive
cecton 730dc61
Update from parent 'origin/master' (conflicts)
cecton 3db9864
Update from parent 'origin/master' (no conflict)
cecton 23f7d4b
Update from parent 'origin/master' (no conflict)
cecton 9b35ad7
Update from parent 'origin/master' (conflicts)
cecton ceaab33
Added 7 tests for the macros
cecton 7640777
Update from parent 'origin/master' (conflicts)
cecton 02e6888
Improve error message
cecton efeff6a
Upgrade assert_cmd
cecton 1db040d
Update from parent 'origin/master' (no conflict)
cecton 36dfd43
Update from parent 'origin/master' (conflicts)
cecton e541885
Fixing missing stuff
cecton 643f51a
Fixed unused import
cecton b34e607
Update from parent 'origin/master' (no conflict)
cecton 834f041
Update from parent 'origin/master' (conflicts)
cecton f8f1cdb
Improve SubstrateCli doc
cecton 099f6b3
Applied suggestions
cecton 8956dca
Fix and clean-up imports
cecton d99c601
Update from parent 'origin/master' (no conflict)
cecton 5744513
Update from parent 'origin/master' (conflicts)
cecton bf706c6
Update from parent 'origin/master' (no conflict)
cecton 1e71e46
Update from parent 'origin/master' (conflicts)
cecton ec13b54
Update from parent 'origin/master' (no conflict)
cecton d45601a
Update from parent 'origin/master' (conflicts)
cecton 71216f4
Update from parent 'origin/master' (no conflict)
cecton 743ff72
Started replacing macros WIP
cecton e553696
WIP
cecton c559485
WIP
cecton deec407
WIP
cecton 02d3b54
Started removing substrate_cli
cecton 6db9ff4
WIP
cecton da487d1
WIP
cecton a7a57c1
WIP
cecton b6e9a91
fixed bug introduced while refactoring
cecton 26e4d4a
Update from parent 'origin/master' (no conflict)
cecton 2ad3b76
Update from parent 'origin/master' (conflicts)
cecton db7c9ca
Update from parent 'origin/master' (conflicts)
cecton 41295e6
Update from parent 'origin/master' (no conflict)
cecton 53e8ec2
Renamed NetworkConfigurationParams to NetworkParams for consistency sake
cecton 2e72f3d
Fixed test
cecton 93e74cf
Update client/cli/src/commands/runcmd.rs
cecton 11d527b
Update client/cli/src/commands/runcmd.rs
cecton 8d57c05
Update client/cli/src/commands/export_blocks_cmd.rs
cecton f705f42
Update client/cli/src/commands/check_block_cmd.rs
cecton 5c30229
Update bin/node/cli/src/command.rs
cecton 3351723
Update bin/node/cli/src/command.rs
cecton 5906776
Update client/cli/src/commands/export_blocks_cmd.rs
cecton 319f249
Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
cecton 489ab74
Revert "Update client/cli/src/commands/check_block_cmd.rs"
cecton 6c3698f
Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
cecton b675a90
Revert "Update client/cli/src/commands/runcmd.rs"
cecton a2f4c94
Revert "Update client/cli/src/commands/runcmd.rs"
cecton 9ec0673
Update client/cli/src/commands/export_blocks_cmd.rs
cecton 84e6eba
Update client/cli/src/commands/import_blocks_cmd.rs
cecton 4546a72
Update client/cli/src/commands/purge_chain_cmd.rs
cecton c5f7973
Update from parent 'origin/master' (no conflict)
cecton 2a53d03
Update from parent 'origin/master' (conflicts)
cecton 4b6b39c
Changed ::sc_cli to $crate in the macro
cecton f7f8a4d
fixed tests
cecton b8f56b2
Update from parent 'origin/master' (no conflict)
cecton ca83720
Update from parent 'origin/master' (conflicts)
cecton c760c01
fixed conflicts
cecton 03ac706
Update from parent 'origin/master' (no conflict)
cecton 40367eb
Update from parent 'origin/master' (conflicts)
cecton 24160a7
Fixing test
cecton f27416c
Merge commit f1d7d1d4d4f648536eefce6eefda6d0d2d1abb63 (no conflict)
cecton 1215407
Update client/cli/src/commands/purge_chain_cmd.rs
cecton 9ea4bf1
Update client/cli/src/params/pruning_params.rs
cecton d36910d
Remove comment as suggested
cecton 925a378
Apply suggestion
cecton 210eda0
Update client/cli/src/commands/purge_chain_cmd.rs
cecton 7801a1e
Update client/cli/src/commands/purge_chain_cmd.rs
cecton 1ad4b0f
Update client/cli/src/commands/purge_chain_cmd.rs
cecton 242f1c9
Update utils/frame/benchmarking-cli/src/command.rs
cecton 2d976c6
Update client/cli/src/runner.rs
cecton 75d7dd7
Update client/cli/src/runner.rs
cecton d8e765b
Update client/cli/src/runner.rs
cecton 0574d06
Update client/cli/src/params/pruning_params.rs
cecton 68689b7
Update client/cli/src/params/node_key_params.rs
cecton 8ff0472
Update client/cli/src/params/network_params.rs
cecton ef5af47
Update client/cli/src/lib.rs
cecton 70d1df3
Update client/cli/src/config.rs
cecton aa73acf
Added doc
cecton 3bc37fe
Fixed error introduced after applying suggestion
cecton 387f6f4
Revert "Update client/cli/src/params/pruning_params.rs"
cecton 993b86c
Print error
cecton be5960b
Apply suggestions from code review
bkchr 526029f
Remove useless Results
cecton 4b07043
Fixed CI failing on polkadot approval
cecton 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,7 @@ | ||
| use vergen::{ConstantsFlags, generate_cargo_keys}; | ||
|
|
||
| const ERROR_MSG: &str = "Failed to generate metadata files"; | ||
| use sc_cli; | ||
|
|
||
| fn main() { | ||
| generate_cargo_keys(ConstantsFlags::SHA_SHORT).expect(ERROR_MSG); | ||
| sc_cli::generate_cargo_keys(); | ||
|
|
||
| build_script_utils::rerun_if_git_head_changed(); | ||
| sc_cli::rerun_if_git_head_changed(); | ||
gnunicorn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| name = "node-cli" | ||
| version = "2.0.0-alpha.4" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| description = "Substrate node implementation in Rust." | ||
| description = "Generic Substrate node implementation in Rust." | ||
| build = "build.rs" | ||
| edition = "2018" | ||
| license = "GPL-3.0" | ||
|
|
@@ -112,7 +112,6 @@ nix = "0.17" | |
| serde_json = "1.0" | ||
|
|
||
| [build-dependencies] | ||
| build-script-utils = { version = "2.0.0-alpha.4", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } | ||
| structopt = { version = "0.3.8", optional = true } | ||
| node-transaction-factory = { version = "0.8.0-alpha.4", optional = true, path = "../transaction-factory" } | ||
| node-inspect = { version = "0.8.0-alpha.4", optional = true, path = "../inspect" } | ||
|
|
@@ -124,10 +123,6 @@ package = "sc-cli" | |
| path = "../../../client/cli" | ||
| optional = true | ||
|
|
||
| [build-dependencies.vergen] | ||
| version = "3.0.4" | ||
| optional = true | ||
|
|
||
| [features] | ||
| default = ["cli", "wasmtime"] | ||
| browser = [ | ||
|
|
@@ -143,7 +138,6 @@ cli = [ | |
| "frame-benchmarking-cli", | ||
| "sc-service/rocksdb", | ||
| "structopt", | ||
| "vergen", | ||
| ] | ||
| wasmtime = [ | ||
| "cli", | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -19,16 +19,5 @@ | |
| #![warn(missing_docs)] | ||
|
|
||
| fn main() -> sc_cli::Result<()> { | ||
| let version = sc_cli::VersionInfo { | ||
| name: "Substrate Node", | ||
| commit: env!("VERGEN_SHA_SHORT"), | ||
| version: env!("CARGO_PKG_VERSION"), | ||
| executable_name: "substrate", | ||
| author: "Parity Technologies <[email protected]>", | ||
| description: "Generic substrate node", | ||
| support_url: "https://github.com/paritytech/substrate/issues/new", | ||
| copyright_start_year: 2017, | ||
| }; | ||
|
|
||
| node_cli::run(std::env::args(), version) | ||
| node_cli::run() | ||
| } | ||
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
Oops, something went wrong.
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.