Juan
34b2a56af1
Soft deprecate GenesisConfig ( #14210 )
...
* soft deprecate genesisconfig
* temporarily add a deprecation attr
* update tests
* update mocks
* update genesis config
* update genesis config
* update genesis config
* update genesis config
* remove deprecation warning
* update deprecation comment
---------
Co-authored-by: parity-processbot <>
2023-05-26 09:42:47 +00:00
Davide Galassi
40c36c0c8a
Move grandpa crates to consensus folder ( #13458 )
...
* Move grandpa under consensus dir
* Rename grandpa folder
* Finish grandpa renaming
* Minor tweaks
* Cargo fmt
* Adjust path to chain spec
2023-02-27 17:15:08 +01:00
Adrian Catangiu
c1865988df
Name changes for GrandPa and Beefy notifications protocols ( #10463 )
...
* grandpa: update notif protocol name
* grandpa: add chain id prefix to protocol name
* grandpa: beautify protocol name handling
* grandpa: prepend genesis hash to protocol name
* chain-spec: add optional 'fork_id'
'fork_id' is used to uniquely identify forks of the same chain/network
'ChainSpec' trait provides default 'None' implementation, meaning this
chain hasn't been forked.
* grandpa: protocol_name mod instead of struct
* beefy: add genesis hash prefix to protocol name
* chainspec: add fork_id
* grandpa: simplify protocol name
* grandpa: contain protocol name building logic
* beefy: contain protocol name building logic
* grandpa: fix tests
* fix merge damage
* fix docs reference visibility
Signed-off-by: acatangiu <adrian@parity.io >
* Update client/finality-grandpa/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/finality-grandpa/src/communication/mod.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/beefy/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* avoid using hash default, even for protocol names
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2022-01-05 17:01:44 +00:00
Gavin Wood
1e24e45ea1
Remove Default bound for AccountId ( #10403 )
...
* Remove Default for AccountId
* More removals of default
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/authorship/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* More work
* More work
* Remove old code
* More work
* pallet-asset-tx-payment
* tips
* sc-consensus-babe
* sc-finality-grandpa
* sc-consensus-babe-rpc
* sc-cli
* make npos crates accept non-default account (#10420 )
* minimal changes to make npos pallets all work
* make this pesky reduce.rs a bit cleaner
* more work
* more work
* Tests build
* Fix imonline tests
* Formatting
* Fixes
* Fixes
* Fix bench
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Fixes
* Formatting
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/finality-grandpa/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/keystore/src/local.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/staking/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update frame/staking/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Formatting
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: kianenigma <kian@parity.io >
2021-12-13 15:03:59 +01:00
Arkadiy Paronyan
4cbbf0cf43
Kill the light client, CHTs and change tries. ( #10080 )
...
* Remove light client, change tries and CHTs
* Update tests
* fmt
* Restore changes_root
* Fixed benches
* Cargo fmt
* fmt
* fmt
2021-11-12 14:15:01 +01:00
Dan Shields
acc835acd3
Update node-template construct_runtime! syntax ( #10155 )
...
* update `construct_runtime!` syntax
* fix build
2021-11-04 13:37:26 +00:00
Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Keith Yeung
828d1d74aa
Use pallet names to name enum variants ( #8990 )
...
* Remove unused event_metadata variable
* Eliminate mod_name and use pallet names to name enum variants
* Rename field name `pallet` to `path`
* Use only the pallet name to generate variant names
* Use new naming scheme for Event enum in sudo pallet tests
* Use new naming scheme for Event enum in offences pallet tests
* Use new naming scheme for Event enum in contracts pallet tests
* Use new naming scheme for Event enum in collective pallet tests
* Use new naming scheme for Event enum in bounties pallet tests
* Use new naming scheme for Event enum in balances pallet tests
* Use new naming scheme for Event enum in assets pallet tests
* Use new naming scheme for Event enum in frame support tests
* Use new naming scheme for Event enum in tips pallet tests
* Use new naming scheme for Event enum in transaction payment pallet tests
* Use new naming scheme for GenesisConfig fields in example pallet tests
* Use new naming scheme for GenesisConfig fields in elections pallet tests
* Use new naming scheme for Event enum in election provider multi-phase pallet tests
* Use new naming scheme for Event enum in elections phragmen pallet tests
* Use new naming scheme for GenesisConfig fields in chain spec
* Use new naming scheme for Event enum in staking pallet mock
* Use new naming scheme for GenesisConfig fields in node-template chain spec
* Use new naming scheme for GenesisConfig fields in node-testing chain spec
* Use new naming scheme for Event enum in node executor tests
* Use new naming scheme for GenesisConfig fields in transaction storage pallet mock
* Refactor match conditions
2021-06-09 09:31:29 +00:00
Bastian Köcher
b0ebf6498f
Do not use Option to wrap GenesisConfig fields ( #8275 )
...
Currently we wrap every `GenesisConfig` field in an `Option`, while
we require `Default` being implemented for all pallet genesisconfigs.
Passing `None` also results in the genesis not being initialized, which
is a bug as seen from the perspective of a pallet developer?
This pr changes the fields of the `GenesisConfig` to non `Option` types.
2021-03-06 13:42:21 +00:00
Joshy Orndorff
dd8e7587cb
Lazily evaluate error string ( #7802 )
2020-12-29 07:51:17 +00:00
Joshy Orndorff
e4280858dc
De-alias pallets in node template runtime ( #6836 )
...
* dealias pallets
* Restore accidentally deleted code blocks
2020-08-06 21:23:31 +02:00
Joshy Orndorff
07c56a9be9
De-alias frame_system in node template runtime ( #6829 )
...
* de-alias frame_system in node template
* Fix line length
* Fix chainspec
2020-08-06 16:18:35 +00:00
Dan Forbes
68b2a09d21
Augmented node template docs ( #6721 )
2020-07-24 06:30:48 -07:00
Wei Tang
ac8de557d6
Better handling of stable-only build ( #6569 )
...
* Better handling of stable-only build
* Fix node template build
* Fix wasm builder node-template version mismatch
* Fix load_spec error
* Add , in parameter
* Add descrptive panic messages in tests
* Add descriptive tests in node/executor benches
* Fix missing compact_code_unwrap
* Add missing wasm_binary_unwrap function for executor integration test
* Only define import_sp_io in no_std
* Small Cargo.toml styling fix
* Bump wasm-builder to 2.0.0
* Fix all `with_wasm_builder_from_crates` version in Substrate
* Use `with_wasm_builder_from_crates` for node-template
Co-authored-by: Gavin Wood <gavin@parity.io >
2020-07-22 21:40:11 +02:00
Bastian Köcher
7cdfaff12b
Add new RPC method to get the chain type ( #5576 )
...
* Add new RPC method to get the chain type
This adds a new RPC method to get the chain type of the running chain.
The chain type needs to be specified in the chain spec. This should make
it easier for tools/UI to display extra information without needing to
rely on parsing the chain name.
* Update client/rpc-api/src/system/mod.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Primitive crate
* Feedback
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-08 20:41:51 +02:00
Cecile Tonglet
3da069e359
CLI: refactoring: remove Options from sc_service::Configuration's fields ( #5271 )
...
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Rename IntoConfiguration to CliConfiguration
* Renamed into_configuration to create_configuration
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Move keystore params to its own module
* Use in-memory keystore even for build-spec
* Enforce proper value for node name
* dev_key_seed
* Telemetry endpoints
* rustfmt
* Converted all RunCmd
* rustfmt
* Added export-blocks
* Missed something
* Removed config_path in NetworkConfiguration (not used)
* Fixed warnings
* public_addresses is used but never set, keeping it
* Merge Configuration.node and NetworkConfiguration.node_name
...because they are the same thing
* Added: import-blocks
* Adding a proc_macro to help impl SubstrateCli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Re-export spec_factory from sc_cli
* Re-added all the commands
* Refactored node_key_params
* Fixed previous refucktoring
* Clean-up and removed full_version()
* Renamed get_is_dev to not confuse with Configuration field
* Fixed sc-cli-derive example
* Fixing tests
* Fixing tests and removing some (will re-add later)
* Fixing more tests
* Removes the need of type parameter
* Converting bin/node and simplifying API
* Converting more
* Converting last command
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fixing tests and added default for WasmExecutionMethod
* Fixing stuff
* Fixed something I broke oops
* Update Cargo.lock
* Moving things around
* Convert everything to Result
* Added new macros to simplify the impl of CliConfiguration
* Added a macro to generate CliConfiguration automatically for subcommands
* Revert... too many macros (this one is not really useful)
This reverts commit 9c516dd38b40fbc420b02c1f8e61d5b2b1a4e434.
* Renamed is_dev to get_is_dev
Good enough for now
* Fixed name roles (this is plural, not singular)
* Clean-up
* Re-export NodeKeyConfig and TelemetryEndpoints from sc_service
* Improve styling/formatting
* Added copyrights
* Added doc and fixed warnings
* Added myself to code owners
* Yes it is needed according to the history
* Revert formatting
* Fixing conflict
* Updated build.rs
* Cargo.lock
* Clean-up
* Update client/cli-derive/Cargo.toml
Co-Authored-By: Seun Lanlege <seunlanlege@gmail.com >
* Fail if using proc_macro and build.rs is not set properly
* Dropped all get_ in front of methods
* Clean-up
* Fixing proc macro missing env var
* Get the configuration inside the Runtime (needed for polkadot)
* Clean-up
* Get is_dev from argument like the others
* Get chain ID instead of chain spec from shared params
* &self is passed to spec_factory/load_spec
* Wrong text
* Fix example
* Officialize macro and made a cool doc
* Renamed spec_factory to load_spec (substrate_cli_configuration)
* Removed not so useful ChainSpec
* Renamed SubstrateCLI to SubstrateCli
* Added changelog for impl_version being full now
* Renamed Runtime to Runner
* Update changelog to show example
* Removed option on database cache size
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fix on removal of option
* typo
* Clean-up imports
* Added info in Cargo.toml
* typo
* remarks
* Moved function for build.rs to substrate-build-script-utils
* Fixed example & test of cli-derive
* Moved function for build.rs to substrate-build-script-utils
* Renamed substrate_cli_configuration to substrate_cli oops
It implements SubstrateCli not CliConfiguration!
* Added documentation and wrapper macro
* Removed option on database cache size
* Removed option on database cache size
* Clean-up
* Reduce risk of errors due to typos
* Removed option on database cache size
* Added NOTE as suggested
* Added doc as suggested
* Fixed test
* typo
* renamed runtime to runner
* Fixed weird argument
* More commas
* Moved client/cli-derive to client/cli/derive
* Added 7 tests for the macros
* Improve error message
* Upgrade assert_cmd
* Fixing missing stuff
* Fixed unused import
* Improve SubstrateCli doc
* Applied suggestions
* Fix and clean-up imports
* Started replacing macros WIP
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Started removing substrate_cli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* fixed bug introduced while refactoring
* Renamed NetworkConfigurationParams to NetworkParams for consistency sake
* Fixed test
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/check_block_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 5906776953392c02beac6bc0bf50f8cbe1a12a01.
* Revert "Update client/cli/src/commands/check_block_cmd.rs"
This reverts commit f705f42b7f3d732be001141afee210fe46a1ef47.
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 8d57c0550164449e6eb2d3bacb04c750c714fcea.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 93e74cf5d2e1c0dc49cdff8608d59fc40fc59338.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 11d527ba345c0d79f0d3b5b071933d95474d0614.
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/import_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Changed ::sc_cli to $crate in the macro
* fixed tests
* fixed conflicts
* Fixing test
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove comment as suggested
* Apply suggestion
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/node_key_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/network_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/config.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added doc
* Fixed error introduced after applying suggestion
* Revert "Update client/cli/src/params/pruning_params.rs"
This reverts commit 0574d06a4f1efd86e94c1214420a12e7a4be0099.
* Print error
* Apply suggestions from code review
* Remove useless Results
* Fixed CI failing on polkadot approval
Co-authored-by: Seun Lanlege <seunlanlege@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-07 11:38:07 +02:00
Joshy Orndorff
0505e93733
Remove package aliases from node template ( #5389 )
...
* delias outer node template
* dealias pallet template
* Fix mock
* attempt to fix warning
* Revert "attempt to fix warning"
This reverts commit 3d39142b877fb7ae2bd9bd0b31442a00d4c8f0bf.
* Add call to test interface.
2020-03-25 19:44:13 +01:00
Arkadiy Paronyan
dc0bf210fb
ChainSpec trait ( #5185 )
...
* ChainSpec trait
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added docs
* Fixed build
* Fixed build
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-03-12 00:00:10 +01:00
Shawn Tabrizi
e2d50d558b
Remove indices from node-template ( #5025 )
...
* Remove indices from node-template
* Use identity lookup instead
* Bump impl
* clean cargo.toml
2020-02-25 15:51:46 +01:00
Gavin Wood
5b7512e2e4
Composite accounts ( #4820 )
...
* Basic account composition.
* Add try_mutate_exists
* De-duplicate
* Refactor away the UpdateBalanceOutcome
* Expunge final UpdateBalanceOutcome refs
* Refactor transfer
* Refactor reservable currency stuff.
* Test with the alternative setup.
* Fixes
* Test with both setups.
* Fixes
* Fix
* Fix macros
* Make indices opt-in
* Remove CreationFee, and make indices opt-in.
* Fix construct_runtime
* Fix last few bits
* Fix tests
* Update trait impls
* Don't hardcode the system event
* Make tests build and fix some stuff.
* Pointlessly bump runtime version
* Fix benchmark
* Another fix
* Whitespace
* Make indices module economically safe
* Migrations for indices.
* Fix
* Whilespace
* Trim defunct migrations
* Remove unused storage item
* More contains_key fixes
* Docs.
* Bump runtime
* Remove unneeded code
* Fix test
* Fix test
* Update frame/balances/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Fix ED logic
* Repatriate reserved logic
* Typo
* Fix typo
* Update frame/system/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Update frame/system/src/lib.rs
Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com >
* Last few fixes
* Another fix
* Build fix
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Jaco Greeff <jacogr@gmail.com >
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-02-14 00:47:51 +00:00
Jimmy Chu
acb66f0699
Node template folders restructuring ( #4811 )
...
* Restructure node-template so it is clear that node, runtime, and pallets are separated
* Separating to mock and tests
* restructuring runtime to top-level
* updated release script
* updated Cargo.lock
2020-02-06 20:13:44 +08:00