From aaddf5ea7f75347d40ba2ee4604dd5524ca3196f Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 27 Nov 2019 13:30:57 +0100 Subject: [PATCH 1/7] Adding script for rename, could be applicable for nodes on top of it, too --- .maintain/rename-crates-for-2.0.sh | 107 +++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 .maintain/rename-crates-for-2.0.sh diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh new file mode 100644 index 0000000000000..08112ca5dd7e7 --- /dev/null +++ b/.maintain/rename-crates-for-2.0.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +function rust_rename() { + sed -i "s/$1/$2/g" `grep -Rl --include="*.rs" "$1" *` > /dev/null +} + +function cargo_rename() { + find . -name "Cargo.toml" -exec sed -i "s/\(^\|[^\/]\)$1/\1$2/g" {} \; +} + +function rename() { + old=$(echo $1 | cut -f1 -d\ ); + new=$(echo $1 | cut -f2 -d\ ); + + echo "Renaming $old to $new" + # rename in Cargo.tomls + cargo_rename $old $new + # and it appears, we have the same syntax in rust files + rust_rename $old $new + + # but generally we have the snail case syntax in rust files + old=$(echo $old | sed s/-/_/g ); + new=$(echo $new | sed s/-/_/g ); + + echo " > $old to $new" + rust_rename $old $new +} + +TO_RENAME=( + # OLD-CRATE-NAME NEW-CRATE-NAME + + # PRIMITIVES + "substrate-application-crypto sc-application-crypto" + "substrate-authority-discovery-primitives sp-authority-discovery" + "substrate-block-builder-runtime-api sp-block-builder" + "substrate-consensus-aura-primitives sp-consensus-aura" + "substrate-consensus-babe-primitives sp-consensus-babe" + "substrate-consensus-common sp-consensus" + "substrate-consensus-pow-primitives sp-consensus-pow" + "substrate-primitives sp-core" + "substrate-debug-derive sp-debug-derive" + "substrate-primitives-storage sp-storage" + "substrate-externalities sp-externalities" + "substrate-finality-grandpa-primitives sp-finality-granpda" + "substrate-inherents sp-inherents" + "substrate-keyring sp-keyring" + "substrate-offchain-primitives sp-offchain" + "substrate-panic-handler sp-panic-handler" + "substrate-phragmen sp-phragmen" + "substrate-rpc-primitives sp-rpc" + "substrate-runtime-interface sp-runtime-interface" + "substrate-runtime-interface-proc-macro sp-runtime-interface-proc-macro" + "substrate-runtime-interface-test-wasm sp-runtime-interface-test-wasm" + "substrate-serializer sp-serializer" + "substrate-session sp-sesssion" + "sr-api sp-api" + "sr-api-proc-macro sp-api-proc-macro" + "sr-api-test sp-api-test" + "sr-arithmetic sp-arithmetic" + "sr-arithmetic-fuzzer sp-arithmetic-fuzzer" + "sr-io sp-io" + "sr-primitives sp-runtime" + "sr-sandbox sp-sandbox" + "sr-staking-primitives sp-staking" + "sr-std sp-std" + "sr-version sp-version" + "substrate-state-machine sp-state-machine" + "substrate-transaction-pool-runtime-api sp-transaction-pool" + "substrate-trie sp-trie" + "substrate-wasm-interface sp-wasm-interface" + + # # CLIENT + "substrate-client sc-client" + "substrate-client-api sc-api" + "substrate-authority-discovery sc-authority-discovery" + "substrate-basic-authorship sc-basic-authority" + "substrate-block-builder sc-block-builder" + "substrate-chain-spec sc-chain-spec" + "substrate-chain-spec-derive sc-chain-spec-derive" + "substrate-cli sc-cli" + "substrate-consensus-aura sc-consensus-aura" + "substrate-consensus-babe sc-consensus-babe" + "substrate-consensus-pow sc-consensus-pow" + "substrate-consensus-slots sc-consensus-slots" + "substrate-consensus-uncles sc-consensus-uncles" + "substrate-client-db sc-database" + "substrate-executor sc-executor" + "substrate-runtime-test sc-runtime-test" + "substrate-finality-grandpa sc-finality-grandpa" + "substrate-keystore sc-keystore" + "substrate-network sc-network" + "substrate-offchain sc-offchain" + "substrate-peerset sc-peerset" + "substrate-rpc-servers sc-rpc-server" + "substrate-rpc sc-rpc" + "substrate-service sc-service" + "substrate-service-test sc-service-test" + "substrate-state-db sc-state-db" + "substrate-telemetry sc-telemetry" + "substrate-tracing sc-transaction" + +); + +for rule in "${TO_RENAME[@]}" +do + rename "$rule"; +done \ No newline at end of file From dadd23ca3c6b1b1282b3cc8bdbfb7a77a4c310fe Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 28 Nov 2019 12:16:53 +0100 Subject: [PATCH 2/7] add stderr and gitlab ci features --- .maintain/rename-crates-for-2.0.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index 08112ca5dd7e7..70f924023f9de 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -1,13 +1,17 @@ #!/bin/bash function rust_rename() { - sed -i "s/$1/$2/g" `grep -Rl --include="*.rs" "$1" *` > /dev/null + sed -i "s/$1/$2/g" `grep -Rl --include="*.rs" --include="*.stderr" "$1" *` > /dev/null } function cargo_rename() { find . -name "Cargo.toml" -exec sed -i "s/\(^\|[^\/]\)$1/\1$2/g" {} \; } +function rename_gitlabci() { + sed -i "s/$1/$2/g" .gitlab-ci.yml +} + function rename() { old=$(echo $1 | cut -f1 -d\ ); new=$(echo $1 | cut -f2 -d\ ); @@ -15,6 +19,7 @@ function rename() { echo "Renaming $old to $new" # rename in Cargo.tomls cargo_rename $old $new + rename_gitlabci $old $new # and it appears, we have the same syntax in rust files rust_rename $old $new From dac6dd68d161fc84deadbc369a3aae509ba2a57d Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Mon, 2 Dec 2019 09:32:50 +0100 Subject: [PATCH 3/7] apply script --- .gitlab-ci.yml | 18 +++--- bin/node-template/Cargo.toml | 30 ++++----- bin/node-template/runtime/Cargo.toml | 28 ++++----- bin/node-template/runtime/src/lib.rs | 18 +++--- bin/node-template/runtime/src/template.rs | 2 +- bin/node-template/src/chain_spec.rs | 6 +- bin/node-template/src/cli.rs | 6 +- bin/node-template/src/main.rs | 2 +- bin/node-template/src/service.rs | 14 ++--- bin/node/cli/Cargo.toml | 62 +++++++++---------- bin/node/cli/bin/main.rs | 6 +- bin/node/cli/build.rs | 2 +- bin/node/cli/src/browser.rs | 2 +- bin/node/cli/src/chain_spec.rs | 10 +-- bin/node/cli/src/cli.rs | 16 ++--- bin/node/cli/src/factory_impl.rs | 4 +- bin/node/cli/src/service.rs | 26 ++++---- bin/node/executor/Cargo.toml | 16 ++--- bin/node/executor/benches/bench.rs | 2 +- bin/node/executor/src/lib.rs | 10 +-- bin/node/primitives/Cargo.toml | 8 +-- bin/node/primitives/src/lib.rs | 2 +- bin/node/rpc-client/Cargo.toml | 2 +- bin/node/rpc-client/src/main.rs | 2 +- bin/node/rpc/Cargo.toml | 4 +- bin/node/rpc/src/lib.rs | 4 +- bin/node/runtime/Cargo.toml | 38 ++++++------ bin/node/runtime/src/impls.rs | 6 +- bin/node/runtime/src/lib.rs | 20 +++--- bin/node/testing/Cargo.toml | 12 ++-- bin/node/testing/src/client.rs | 4 +- bin/node/testing/src/genesis.rs | 2 +- bin/node/testing/src/keyring.rs | 2 +- bin/subkey/Cargo.toml | 4 +- bin/subkey/src/main.rs | 2 +- client/Cargo.toml | 36 +++++------ client/api/Cargo.toml | 34 +++++----- client/api/src/backend.rs | 4 +- client/api/src/call_executor.rs | 4 +- client/api/src/client.rs | 2 +- client/api/src/execution_extensions.rs | 2 +- client/api/src/lib.rs | 2 +- client/api/src/light.rs | 2 +- client/api/src/notifications.rs | 4 +- client/authority-discovery/Cargo.toml | 18 +++--- client/authority-discovery/src/lib.rs | 10 +-- client/basic-authorship/Cargo.toml | 18 +++--- .../basic-authorship/src/basic_authorship.rs | 6 +- client/basic-authorship/src/lib.rs | 4 +- client/block-builder/Cargo.toml | 12 ++-- client/block-builder/src/lib.rs | 4 +- client/chain-spec/Cargo.toml | 12 ++-- client/chain-spec/derive/Cargo.toml | 2 +- client/chain-spec/derive/src/impls.rs | 2 +- client/chain-spec/src/chain_spec.rs | 2 +- client/chain-spec/src/extension.rs | 4 +- client/chain-spec/src/lib.rs | 10 +-- client/cli/Cargo.toml | 22 +++---- client/cli/src/informant.rs | 2 +- client/cli/src/informant/display.rs | 2 +- client/cli/src/lib.rs | 10 +-- client/cli/src/params.rs | 10 +-- client/consensus/aura/Cargo.toml | 40 ++++++------ client/consensus/aura/src/digest.rs | 2 +- client/consensus/aura/src/lib.rs | 12 ++-- client/consensus/babe/Cargo.toml | 44 ++++++------- client/consensus/babe/src/aux_schema.rs | 2 +- client/consensus/babe/src/epoch_changes.rs | 2 +- client/consensus/babe/src/lib.rs | 10 +-- client/consensus/babe/src/tests.rs | 4 +- client/consensus/babe/src/verification.rs | 2 +- client/consensus/pow/Cargo.toml | 16 ++--- client/consensus/pow/src/lib.rs | 6 +- client/consensus/slots/Cargo.toml | 14 ++--- client/consensus/slots/src/aux_schema.rs | 4 +- client/consensus/slots/src/lib.rs | 12 ++-- client/consensus/uncles/Cargo.toml | 12 ++-- client/consensus/uncles/src/lib.rs | 2 +- client/db/Cargo.toml | 22 +++---- client/db/src/cache/list_cache.rs | 8 +-- client/db/src/cache/list_entry.rs | 2 +- client/db/src/cache/list_storage.rs | 4 +- client/db/src/cache/mod.rs | 4 +- client/db/src/lib.rs | 10 +-- client/db/src/light.rs | 8 +-- client/db/src/storage_cache.rs | 6 +- client/db/src/utils.rs | 8 +-- client/executor/Cargo.toml | 30 ++++----- client/executor/runtime-test/Cargo.toml | 12 ++-- client/executor/runtime-test/src/lib.rs | 2 +- .../executor/src/deprecated_host_interface.rs | 4 +- client/executor/src/native_executor.rs | 4 +- client/executor/src/wasmi_execution.rs | 2 +- .../src/wasmtime/function_executor.rs | 2 +- client/finality-grandpa/Cargo.toml | 32 +++++----- client/finality-grandpa/src/authorities.rs | 2 +- client/finality-grandpa/src/aux_schema.rs | 2 +- .../src/communication/gossip.rs | 4 +- .../finality-grandpa/src/communication/mod.rs | 4 +- .../src/communication/periodic.rs | 2 +- .../src/communication/tests.rs | 2 +- client/finality-grandpa/src/environment.rs | 6 +- client/finality-grandpa/src/finality_proof.rs | 4 +- client/finality-grandpa/src/import.rs | 6 +- client/finality-grandpa/src/justification.rs | 4 +- client/finality-grandpa/src/lib.rs | 6 +- client/finality-grandpa/src/light_import.rs | 6 +- client/finality-grandpa/src/observer.rs | 2 +- client/finality-grandpa/src/tests.rs | 6 +- client/finality-grandpa/src/until_imported.rs | 2 +- client/finality-grandpa/src/voting_rule.rs | 4 +- client/keystore/Cargo.toml | 6 +- client/network/Cargo.toml | 24 +++---- client/network/src/behaviour.rs | 2 +- client/network/src/chain.rs | 6 +- client/network/src/config.rs | 4 +- client/network/src/lib.rs | 6 +- client/network/src/on_demand_layer.rs | 2 +- client/network/src/protocol.rs | 6 +- .../network/src/protocol/consensus_gossip.rs | 6 +- client/network/src/protocol/light_dispatch.rs | 4 +- client/network/src/protocol/message.rs | 4 +- client/network/src/protocol/specialization.rs | 2 +- client/network/src/protocol/sync.rs | 2 +- client/network/src/protocol/sync/blocks.rs | 4 +- .../src/protocol/sync/extra_requests.rs | 2 +- client/network/src/service.rs | 6 +- client/network/src/test/block_import.rs | 2 +- client/network/src/test/mod.rs | 6 +- client/offchain/Cargo.toml | 18 +++--- client/offchain/src/lib.rs | 6 +- client/peerset/Cargo.toml | 2 +- client/peerset/tests/fuzz.rs | 2 +- client/rpc-servers/Cargo.toml | 4 +- client/rpc/Cargo.toml | 28 ++++----- client/rpc/api/Cargo.toml | 6 +- client/rpc/src/author/mod.rs | 4 +- client/rpc/src/chain/chain_full.rs | 2 +- client/rpc/src/chain/chain_light.rs | 2 +- client/rpc/src/chain/mod.rs | 2 +- client/rpc/src/state/mod.rs | 4 +- client/rpc/src/state/state_full.rs | 4 +- client/rpc/src/state/state_light.rs | 2 +- client/rpc/src/state/tests.rs | 2 +- client/rpc/src/system/mod.rs | 2 +- client/service/Cargo.toml | 48 +++++++------- client/service/src/builder.rs | 14 ++--- client/service/src/chain_ops.rs | 4 +- client/service/src/config.rs | 4 +- client/service/src/lib.rs | 10 +-- client/service/test/Cargo.toml | 14 ++--- client/service/test/src/lib.rs | 2 +- client/src/call_executor.rs | 4 +- client/src/cht.rs | 2 +- client/src/client.rs | 10 +-- client/src/genesis.rs | 2 +- client/src/in_mem.rs | 6 +- client/src/leaves.rs | 2 +- client/src/lib.rs | 6 +- client/src/light/backend.rs | 4 +- client/src/light/blockchain.rs | 4 +- client/src/light/call_executor.rs | 6 +- client/src/light/fetcher.rs | 4 +- client/src/light/mod.rs | 4 +- client/state-db/Cargo.toml | 4 +- client/telemetry/Cargo.toml | 2 +- client/telemetry/src/lib.rs | 8 +-- client/tracing/Cargo.toml | 4 +- client/tracing/src/lib.rs | 2 +- client/transaction-pool/Cargo.toml | 10 +-- client/transaction-pool/graph/Cargo.toml | 4 +- .../transaction-pool/graph/benches/basics.rs | 4 +- .../transaction-pool/graph/src/base_pool.rs | 4 +- client/transaction-pool/graph/src/error.rs | 2 +- client/transaction-pool/graph/src/future.rs | 2 +- client/transaction-pool/graph/src/listener.rs | 2 +- client/transaction-pool/graph/src/pool.rs | 4 +- client/transaction-pool/graph/src/ready.rs | 4 +- .../graph/src/validated_pool.rs | 2 +- client/transaction-pool/src/api.rs | 4 +- client/transaction-pool/src/lib.rs | 2 +- client/transaction-pool/src/maintainer.rs | 8 +-- client/transaction-pool/src/tests.rs | 2 +- frame/assets/Cargo.toml | 10 +-- frame/assets/src/lib.rs | 6 +- frame/aura/Cargo.toml | 18 +++--- frame/aura/src/lib.rs | 10 +-- frame/aura/src/mock.rs | 6 +- frame/authority-discovery/Cargo.toml | 16 ++--- frame/authority-discovery/src/lib.rs | 6 +- frame/authorship/Cargo.toml | 12 ++-- frame/authorship/src/lib.rs | 6 +- frame/babe/Cargo.toml | 20 +++--- frame/babe/src/lib.rs | 10 +-- frame/babe/src/mock.rs | 6 +- frame/babe/src/tests.rs | 2 +- frame/balances/Cargo.toml | 10 +-- frame/balances/src/lib.rs | 6 +- frame/balances/src/mock.rs | 4 +- frame/balances/src/tests.rs | 2 +- frame/collective/Cargo.toml | 10 +-- frame/collective/src/lib.rs | 10 +-- frame/contracts/Cargo.toml | 12 ++-- frame/contracts/rpc/Cargo.toml | 6 +- frame/contracts/rpc/runtime-api/Cargo.toml | 10 +-- frame/contracts/rpc/runtime-api/src/lib.rs | 4 +- frame/contracts/rpc/src/lib.rs | 2 +- frame/contracts/src/account_db.rs | 2 +- frame/contracts/src/exec.rs | 6 +- frame/contracts/src/gas.rs | 2 +- frame/contracts/src/lib.rs | 2 +- frame/contracts/src/rent.rs | 2 +- frame/contracts/src/tests.rs | 2 +- frame/contracts/src/wasm/code_cache.rs | 2 +- frame/contracts/src/wasm/env_def/macros.rs | 2 +- frame/contracts/src/wasm/prepare.rs | 2 +- frame/contracts/src/wasm/runtime.rs | 4 +- frame/democracy/Cargo.toml | 10 +-- frame/democracy/src/lib.rs | 6 +- frame/democracy/src/vote_threshold.rs | 4 +- frame/elections-phragmen/Cargo.toml | 12 ++-- frame/elections-phragmen/src/lib.rs | 8 +-- frame/elections/Cargo.toml | 10 +-- frame/elections/src/lib.rs | 2 +- frame/elections/src/mock.rs | 6 +- frame/evm/Cargo.toml | 10 +-- frame/evm/src/backend.rs | 2 +- frame/evm/src/lib.rs | 4 +- frame/example/Cargo.toml | 10 +-- frame/example/src/lib.rs | 8 +-- frame/executive/Cargo.toml | 10 +-- frame/executive/src/lib.rs | 34 +++++----- frame/finality-tracker/Cargo.toml | 12 ++-- frame/finality-tracker/src/lib.rs | 4 +- frame/generic-asset/Cargo.toml | 10 +-- frame/generic-asset/src/lib.rs | 4 +- frame/generic-asset/src/mock.rs | 2 +- frame/grandpa/Cargo.toml | 18 +++--- frame/grandpa/src/lib.rs | 8 +-- frame/grandpa/src/mock.rs | 6 +- frame/grandpa/src/tests.rs | 4 +- frame/im-online/Cargo.toml | 16 ++--- frame/im-online/src/lib.rs | 6 +- frame/im-online/src/mock.rs | 8 +-- frame/im-online/src/tests.rs | 2 +- frame/indices/Cargo.toml | 14 ++--- frame/indices/src/address.rs | 2 +- frame/indices/src/lib.rs | 2 +- frame/indices/src/mock.rs | 6 +- frame/membership/Cargo.toml | 10 +-- frame/membership/src/lib.rs | 4 +- frame/metadata/Cargo.toml | 4 +- frame/nicks/Cargo.toml | 10 +-- frame/nicks/src/lib.rs | 4 +- frame/offences/Cargo.toml | 14 ++--- frame/offences/src/lib.rs | 4 +- frame/offences/src/mock.rs | 10 +-- frame/offences/src/tests.rs | 2 +- frame/randomness-collective-flip/Cargo.toml | 10 +-- frame/randomness-collective-flip/src/lib.rs | 4 +- frame/scored-pool/Cargo.toml | 10 +-- frame/scored-pool/src/lib.rs | 2 +- frame/scored-pool/src/mock.rs | 2 +- frame/scored-pool/src/tests.rs | 2 +- frame/session/Cargo.toml | 22 +++---- frame/session/src/historical.rs | 12 ++-- frame/session/src/lib.rs | 10 +-- frame/session/src/mock.rs | 8 +-- frame/staking/Cargo.toml | 20 +++--- frame/staking/reward-curve/Cargo.toml | 2 +- frame/staking/reward-curve/src/lib.rs | 18 +++--- frame/staking/reward-curve/tests/test.rs | 4 +- frame/staking/src/inflation.rs | 4 +- frame/staking/src/lib.rs | 6 +- frame/staking/src/mock.rs | 12 ++-- frame/staking/src/slashing.rs | 2 +- frame/staking/src/tests.rs | 4 +- frame/sudo/Cargo.toml | 10 +-- frame/sudo/src/lib.rs | 6 +- frame/support/Cargo.toml | 18 +++--- .../procedural/src/construct_runtime/mod.rs | 6 +- .../src/storage/genesis_config/mod.rs | 14 ++--- frame/support/procedural/tools/src/lib.rs | 4 +- frame/support/src/dispatch.rs | 28 ++++----- frame/support/src/error.rs | 2 +- frame/support/src/inherent.rs | 2 +- frame/support/src/lib.rs | 4 +- frame/support/src/traits.rs | 2 +- frame/support/src/unsigned.rs | 4 +- frame/support/src/weights.rs | 8 +-- frame/support/test/Cargo.toml | 12 ++-- frame/support/test/tests/instance.rs | 6 +- frame/support/test/tests/issue2219.rs | 4 +- frame/support/test/tests/system.rs | 2 +- frame/system/Cargo.toml | 14 ++--- frame/system/benches/bench.rs | 2 +- frame/system/rpc/runtime-api/Cargo.toml | 4 +- frame/system/rpc/runtime-api/src/lib.rs | 2 +- frame/system/src/lib.rs | 6 +- frame/system/src/offchain.rs | 4 +- frame/timestamp/Cargo.toml | 12 ++-- frame/timestamp/src/lib.rs | 4 +- frame/transaction-payment/Cargo.toml | 10 +-- frame/transaction-payment/rpc/Cargo.toml | 6 +- .../rpc/runtime-api/Cargo.toml | 10 +-- .../rpc/runtime-api/src/lib.rs | 2 +- frame/transaction-payment/rpc/src/lib.rs | 2 +- frame/transaction-payment/src/lib.rs | 4 +- frame/treasury/Cargo.toml | 10 +-- frame/treasury/src/lib.rs | 8 +-- frame/utility/Cargo.toml | 10 +-- frame/utility/src/lib.rs | 4 +- primitives/application-crypto/Cargo.toml | 10 +-- primitives/application-crypto/src/ed25519.rs | 2 +- primitives/application-crypto/src/lib.rs | 6 +- primitives/application-crypto/src/sr25519.rs | 2 +- primitives/authority-discovery/Cargo.toml | 14 ++--- primitives/authority-discovery/src/lib.rs | 2 +- primitives/authorship/Cargo.toml | 4 +- .../block-builder/runtime-api/Cargo.toml | 14 ++--- .../block-builder/runtime-api/src/lib.rs | 6 +- primitives/blockchain/Cargo.toml | 8 +-- primitives/blockchain/src/backend.rs | 6 +- primitives/blockchain/src/error.rs | 2 +- primitives/blockchain/src/header_metadata.rs | 2 +- primitives/consensus/aura/Cargo.toml | 16 ++--- primitives/consensus/aura/src/lib.rs | 4 +- primitives/consensus/babe/Cargo.toml | 18 +++--- primitives/consensus/babe/src/digest.rs | 4 +- primitives/consensus/babe/src/lib.rs | 4 +- primitives/consensus/common/Cargo.toml | 12 ++-- .../consensus/common/src/block_import.rs | 4 +- .../consensus/common/src/block_validation.rs | 2 +- primitives/consensus/common/src/evaluation.rs | 2 +- .../consensus/common/src/import_queue.rs | 2 +- .../common/src/import_queue/basic_queue.rs | 2 +- .../common/src/import_queue/buffered_link.rs | 6 +- primitives/consensus/common/src/lib.rs | 2 +- .../consensus/common/src/select_chain.rs | 2 +- primitives/consensus/pow/Cargo.toml | 14 ++--- primitives/consensus/pow/src/lib.rs | 4 +- primitives/core/Cargo.toml | 16 ++--- primitives/core/benches/bench.rs | 2 +- primitives/core/debug-derive/Cargo.toml | 2 +- primitives/core/debug-derive/src/lib.rs | 2 +- primitives/core/debug-derive/tests/tests.rs | 2 +- primitives/core/src/hash.rs | 2 +- primitives/core/src/lib.rs | 2 +- primitives/core/src/testing.rs | 2 +- primitives/core/src/uint.rs | 2 +- primitives/core/storage/Cargo.toml | 6 +- primitives/core/storage/src/lib.rs | 2 +- primitives/externalities/Cargo.toml | 6 +- primitives/externalities/src/extensions.rs | 2 +- primitives/finality-grandpa/Cargo.toml | 14 ++--- primitives/finality-grandpa/src/lib.rs | 4 +- primitives/finality-tracker/Cargo.toml | 4 +- primitives/inherents/Cargo.toml | 6 +- primitives/keyring/Cargo.toml | 6 +- primitives/keyring/src/ed25519.rs | 6 +- primitives/keyring/src/sr25519.rs | 6 +- primitives/offchain/Cargo.toml | 10 +-- primitives/offchain/src/lib.rs | 4 +- primitives/panic-handler/Cargo.toml | 2 +- primitives/phragmen/Cargo.toml | 10 +-- primitives/phragmen/benches/phragmen.rs | 4 +- primitives/phragmen/src/lib.rs | 6 +- primitives/phragmen/src/mock.rs | 2 +- primitives/phragmen/src/tests.rs | 2 +- primitives/rpc/Cargo.toml | 4 +- primitives/runtime-interface/Cargo.toml | 20 +++--- .../runtime-interface/proc-macro/Cargo.toml | 6 +- .../runtime-interface/proc-macro/src/lib.rs | 8 +-- .../runtime-interface/proc-macro/src/utils.rs | 10 +-- primitives/runtime-interface/src/lib.rs | 4 +- primitives/runtime-interface/src/pass_by.rs | 8 +-- .../runtime-interface/test-wasm/Cargo.toml | 10 +-- primitives/serializer/Cargo.toml | 2 +- primitives/session/Cargo.toml | 10 +-- primitives/session/src/lib.rs | 6 +- primitives/sr-api/Cargo.toml | 18 +++--- primitives/sr-api/benches/bench.rs | 6 +- primitives/sr-api/proc-macro/Cargo.toml | 8 +-- primitives/sr-api/proc-macro/src/lib.rs | 18 +++--- primitives/sr-api/proc-macro/src/utils.rs | 14 ++--- primitives/sr-api/src/lib.rs | 8 +-- primitives/sr-api/test/Cargo.toml | 12 ++-- primitives/sr-api/test/tests/decl_and_impl.rs | 10 +-- primitives/sr-api/test/tests/runtime_calls.rs | 2 +- .../test/tests/ui/adding_self_parameter.rs | 2 +- .../tests/ui/changed_in_unknown_version.rs | 4 +- .../test/tests/ui/declaring_old_block.rs | 4 +- .../test/tests/ui/declaring_old_block.stderr | 4 +- ...declaring_own_block_with_different_name.rs | 4 +- ...aring_own_block_with_different_name.stderr | 4 +- .../tests/ui/empty_impl_runtime_apis_call.rs | 6 +- .../ui/empty_impl_runtime_apis_call.stderr | 2 +- .../ui/impl_incorrect_method_signature.rs | 8 +-- .../ui/impl_incorrect_method_signature.stderr | 10 +-- .../ui/impl_two_traits_with_same_name.rs | 6 +- .../ui/impl_two_traits_with_same_name.stderr | 10 +-- .../test/tests/ui/invalid_api_version.rs | 2 +- .../test/tests/ui/invalid_api_version.stderr | 4 +- .../test/tests/ui/invalid_api_version_2.rs | 2 +- .../tests/ui/invalid_api_version_2.stderr | 4 +- .../test/tests/ui/invalid_api_version_3.rs | 2 +- .../tests/ui/invalid_api_version_3.stderr | 4 +- .../ui/missing_block_generic_parameter.rs | 6 +- .../test/tests/ui/missing_path_for_trait.rs | 6 +- ...ype_reference_in_impl_runtime_apis_call.rs | 8 +-- ...reference_in_impl_runtime_apis_call.stderr | 10 +-- primitives/sr-arithmetic/Cargo.toml | 8 +-- primitives/sr-arithmetic/benches/bench.rs | 2 +- primitives/sr-arithmetic/fuzzer/Cargo.toml | 4 +- .../sr-arithmetic/fuzzer/src/biguint.rs | 2 +- .../sr-arithmetic/fuzzer/src/rational128.rs | 2 +- primitives/sr-arithmetic/src/lib.rs | 2 +- primitives/sr-arithmetic/src/per_things.rs | 2 +- primitives/sr-arithmetic/src/rational128.rs | 2 +- primitives/sr-io/Cargo.toml | 16 ++--- primitives/sr-io/src/lib.rs | 4 +- primitives/sr-primitives/Cargo.toml | 14 ++--- primitives/sr-primitives/src/lib.rs | 8 +-- primitives/sr-primitives/src/offchain/http.rs | 4 +- .../src/random_number_generator.rs | 4 +- primitives/sr-primitives/src/traits.rs | 2 +- primitives/sr-sandbox/Cargo.toml | 8 +-- primitives/sr-staking-primitives/Cargo.toml | 8 +-- .../sr-staking-primitives/src/offence.rs | 4 +- primitives/sr-std/Cargo.toml | 2 +- primitives/sr-std/src/lib.rs | 2 +- primitives/sr-version/Cargo.toml | 8 +-- primitives/sr-version/src/lib.rs | 10 +-- primitives/state-machine/Cargo.toml | 10 +-- primitives/timestamp/Cargo.toml | 12 ++-- primitives/timestamp/src/lib.rs | 4 +- primitives/transaction-pool/Cargo.toml | 4 +- .../transaction-pool/runtime-api/Cargo.toml | 8 +-- .../transaction-pool/runtime-api/src/lib.rs | 4 +- primitives/transaction-pool/src/error.rs | 2 +- primitives/transaction-pool/src/lib.rs | 6 +- primitives/trie/Cargo.toml | 6 +- primitives/trie/benches/bench.rs | 8 +-- primitives/wasm-interface/Cargo.toml | 2 +- test/utils/chain-spec-builder/Cargo.toml | 4 +- test/utils/client/Cargo.toml | 18 +++--- test/utils/client/src/client_ext.rs | 6 +- test/utils/client/src/lib.rs | 4 +- test/utils/primitives/Cargo.toml | 6 +- test/utils/primitives/src/lib.rs | 10 +-- test/utils/runtime/Cargo.toml | 46 +++++++------- test/utils/runtime/client/Cargo.toml | 10 +-- .../runtime/client/src/block_builder_ext.rs | 2 +- test/utils/runtime/client/src/lib.rs | 2 +- test/utils/runtime/client/src/trait_tests.rs | 4 +- test/utils/runtime/src/genesismap.rs | 4 +- test/utils/runtime/src/lib.rs | 30 ++++----- test/utils/runtime/src/system.rs | 12 ++-- test/utils/transaction-factory/Cargo.toml | 18 +++--- .../transaction-factory/src/complex_mode.rs | 6 +- test/utils/transaction-factory/src/lib.rs | 6 +- .../transaction-factory/src/simple_modes.rs | 6 +- utils/frame/rpc/support/Cargo.toml | 2 +- utils/frame/rpc/support/src/lib.rs | 2 +- utils/frame/rpc/system/Cargo.toml | 6 +- utils/frame/rpc/system/src/lib.rs | 4 +- 466 files changed, 1698 insertions(+), 1698 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 439fda5fabe1e..91994487b7617 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -218,14 +218,14 @@ check-web-wasm: script: # WASM support is in progress. As more and more crates support WASM, we # should add entries here. See https://github.com/paritytech/substrate/issues/2416 - - time cargo build --target=wasm32-unknown-unknown -p sr-io - - time cargo build --target=wasm32-unknown-unknown -p sr-primitives - - time cargo build --target=wasm32-unknown-unknown -p sr-std - - time cargo build --target=wasm32-unknown-unknown -p substrate-client - - time cargo build --target=wasm32-unknown-unknown -p substrate-consensus-aura - - time cargo build --target=wasm32-unknown-unknown -p substrate-consensus-babe - - time cargo build --target=wasm32-unknown-unknown -p substrate-consensus-common - - time cargo build --target=wasm32-unknown-unknown -p substrate-telemetry + - time cargo build --target=wasm32-unknown-unknown -p sp-io + - time cargo build --target=wasm32-unknown-unknown -p sp-runtime + - time cargo build --target=wasm32-unknown-unknown -p sp-std + - time cargo build --target=wasm32-unknown-unknown -p sc-client + - time cargo build --target=wasm32-unknown-unknown -p sc-consensus-aura + - time cargo build --target=wasm32-unknown-unknown -p sc-consensus-babe + - time cargo build --target=wasm32-unknown-unknown -p sp-consensus + - time cargo build --target=wasm32-unknown-unknown -p sc-telemetry # Note: the command below is a bit weird because several Cargo issues prevent us from compiling the node in a more straight-forward way. - time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown - sccache -s @@ -369,7 +369,7 @@ check_polkadot: - git grep -l "polkadot-master" | grep toml | xargs sed -i "s/branch.*=.*\"polkadot-master\"/rev = \"$COMMIT_HASH\"/; s~https://github.com/paritytech/substrate~file://$SUBSTRATE_PATH~; s/,\s*}/ }/" # Make sure 'Cargo.lock' matches 'Cargo.toml'. It's enough to update one # package, others are updated along the way. - - cargo update -p sr-io + - cargo update -p sp-io # Check whether Polkadot 'master' branch builds with this Substrate commit. - time cargo check - cd - diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 09b438a0ac751..bfe39ee0c77c4 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -18,24 +18,24 @@ tokio = "0.1.22" parking_lot = "0.9.0" codec = { package = "parity-scale-codec", version = "1.0.0" } trie-root = "0.15.2" -sr-io = { path = "../../primitives/sr-io" } -substrate-cli = { path = "../../client/cli" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -substrate-executor = { path = "../../client/executor" } -substrate-service = { path = "../../client/service" } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents" } +sp-io = { path = "../../primitives/sr-io" } +sc-cli = { path = "../../client/cli" } +primitives = { package = "sp-core", path = "../../primitives/core" } +sc-executor = { path = "../../client/executor" } +sc-service = { path = "../../client/service" } +inherents = { package = "sp-inherents", path = "../../primitives/inherents" } txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } -network = { package = "substrate-network", path = "../../client/network" } -aura = { package = "substrate-consensus-aura", path = "../../client/consensus/aura" } -aura-primitives = { package = "substrate-consensus-aura-primitives", path = "../../primitives/consensus/aura" } -consensus-common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } -grandpa = { package = "substrate-finality-grandpa", path = "../../client/finality-grandpa" } -grandpa-primitives = { package = "substrate-finality-grandpa-primitives", path = "../../primitives/finality-grandpa" } -substrate-client = { path = "../../client/" } +network = { package = "sc-network", path = "../../client/network" } +aura = { package = "sc-consensus-aura", path = "../../client/consensus/aura" } +aura-primitives = { package = "sp-consensus-aura", path = "../../primitives/consensus/aura" } +consensus-common = { package = "sp-consensus", path = "../../primitives/consensus/common" } +grandpa = { package = "sc-finality-grandpa", path = "../../client/finality-grandpa" } +grandpa-primitives = { package = "sp-finality-granpda", path = "../../primitives/finality-grandpa" } +sc-client = { path = "../../client/" } runtime = { package = "node-template-runtime", path = "runtime" } -sr-primitives = { path = "../../primitives/sr-primitives" } -basic-authorship = { package = "substrate-basic-authorship", path = "../../client/basic-authorship"} +sp-runtime = { path = "../../primitives/sr-primitives" } +basic-authorship = { package = "sc-basic-authority", path = "../../client/basic-authorship"} [build-dependencies] vergen = "3.0.4" diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 46767e70989a1..1f71c426fe3e4 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -6,31 +6,31 @@ edition = "2018" [dependencies] aura = { package = "pallet-aura", path = "../../../frame/aura", default-features = false } -aura-primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura", default-features = false } +aura-primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura", default-features = false } balances = { package = "pallet-balances", path = "../../../frame/balances", default-features = false } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false} +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api", default-features = false} codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } executive = { package = "frame-executive", path = "../../../frame/executive", default-features = false } grandpa = { package = "pallet-grandpa", path = "../../../frame/grandpa", default-features = false } indices = { package = "pallet-indices", path = "../../../frame/indices", default-features = false } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false} -offchain-primitives = { package = "substrate-offchain-primitives", path = "../../../primitives/offchain", default-features = false } -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false} +offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } randomness-collective-flip = { package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip", default-features = false } -rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false } +rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false } safe-mix = { version = "1.0.0", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sr-api = { path = "../../../primitives/sr-api", default-features = false } -sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false } -substrate-session = { path = "../../../primitives/session", default-features = false } +sp-api = { path = "../../../primitives/sr-api", default-features = false } +sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } +sp-sesssion = { path = "../../../primitives/session", default-features = false } sudo = { package = "pallet-sudo", path = "../../../frame/sudo", default-features = false } support = { package = "frame-support", path = "../../../frame/support", default-features = false } system = { package = "frame-system", path = "../../../frame/system", default-features = false } timestamp = { package = "pallet-timestamp", path = "../../../frame/timestamp", default-features = false } transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment", default-features = false } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false } -version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false } +version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false } [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" } @@ -54,9 +54,9 @@ std = [ "runtime-io/std", "safe-mix/std", "serde", - "sr-api/std", - "sr-primitives/std", - "substrate-session/std", + "sp-api/std", + "sp-runtime/std", + "sp-sesssion/std", "sudo/std", "support/std", "system/std", diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index 36edeecc6eaea..f16018da8fcf4 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -10,14 +10,14 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); use rstd::prelude::*; use primitives::OpaqueMetadata; -use sr_primitives::{ +use sp_runtime::{ ApplyExtrinsicResult, transaction_validity::TransactionValidity, generic, create_runtime_str, impl_opaque_keys, MultiSignature }; -use sr_primitives::traits::{ +use sp_runtime::traits::{ NumberFor, BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount }; -use sr_api::impl_runtime_apis; +use sp_api::impl_runtime_apis; use aura_primitives::sr25519::AuthorityId as AuraId; use grandpa::AuthorityList as GrandpaAuthorityList; use grandpa::fg_primitives; @@ -27,10 +27,10 @@ use version::NativeVersion; // A few exports that help ease life for downstream crates. #[cfg(any(feature = "std", test))] -pub use sr_primitives::BuildStorage; +pub use sp_runtime::BuildStorage; pub use timestamp::Call as TimestampCall; pub use balances::Call as BalancesCall; -pub use sr_primitives::{Permill, Perbill}; +pub use sp_runtime::{Permill, Perbill}; pub use support::{ StorageValue, construct_runtime, parameter_types, traits::Randomness, @@ -73,7 +73,7 @@ mod template; pub mod opaque { use super::*; - pub use sr_primitives::OpaqueExtrinsic as UncheckedExtrinsic; + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; /// Opaque block header type. pub type Header = generic::Header; @@ -283,7 +283,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic, Runtime, AllModules>; impl_runtime_apis! { - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { VERSION } @@ -297,7 +297,7 @@ impl_runtime_apis! { } } - impl sr_api::Metadata for Runtime { + impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { Runtime::metadata().into() } @@ -350,7 +350,7 @@ impl_runtime_apis! { } } - impl substrate_session::SessionKeys for Runtime { + impl sp_sesssion::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { opaque::SessionKeys::generate(seed) } diff --git a/bin/node-template/runtime/src/template.rs b/bin/node-template/runtime/src/template.rs index 33f0b6af7ebe0..e3e053da5396c 100644 --- a/bin/node-template/runtime/src/template.rs +++ b/bin/node-template/runtime/src/template.rs @@ -71,7 +71,7 @@ mod tests { use primitives::H256; use support::{impl_outer_origin, assert_ok, parameter_types, weights::Weight}; - use sr_primitives::{ + use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, testing::Header, Perbill, }; diff --git a/bin/node-template/src/chain_spec.rs b/bin/node-template/src/chain_spec.rs index 8d43e67304c79..6b979b16dd947 100644 --- a/bin/node-template/src/chain_spec.rs +++ b/bin/node-template/src/chain_spec.rs @@ -5,14 +5,14 @@ use runtime::{ }; use aura_primitives::sr25519::{AuthorityId as AuraId}; use grandpa_primitives::{AuthorityId as GrandpaId}; -use substrate_service; -use sr_primitives::traits::{Verify, IdentifyAccount}; +use sc_service; +use sp_runtime::traits::{Verify, IdentifyAccount}; // Note this is the URL for the telemetry server //const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type. -pub type ChainSpec = substrate_service::ChainSpec; +pub type ChainSpec = sc_service::ChainSpec; /// The chain specification option. This is expected to come in from the CLI and /// is little more than one of a number of alternatives which can easily be converted diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index edbe40feb84a3..5d29cdf8df2e2 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -2,9 +2,9 @@ use crate::service; use futures::{future::{select, Map}, FutureExt, TryFutureExt, channel::oneshot, compat::Future01CompatExt}; use std::cell::RefCell; use tokio::runtime::Runtime; -pub use substrate_cli::{VersionInfo, IntoExit, error}; -use substrate_cli::{display_role, informant, parse_and_prepare, ParseAndPrepare, NoCustom}; -use substrate_service::{AbstractService, Roles as ServiceRoles, Configuration}; +pub use sc_cli::{VersionInfo, IntoExit, error}; +use sc_cli::{display_role, informant, parse_and_prepare, ParseAndPrepare, NoCustom}; +use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use aura_primitives::sr25519::{AuthorityPair as AuraPair}; use crate::chain_spec; use log::info; diff --git a/bin/node-template/src/main.rs b/bin/node-template/src/main.rs index 1f286a2237548..2942bb68a37aa 100644 --- a/bin/node-template/src/main.rs +++ b/bin/node-template/src/main.rs @@ -8,7 +8,7 @@ mod chain_spec; mod service; mod cli; -pub use substrate_cli::{VersionInfo, IntoExit, error}; +pub use sc_cli::{VersionInfo, IntoExit, error}; fn main() -> Result<(), cli::error::Error> { let version = VersionInfo { diff --git a/bin/node-template/src/service.rs b/bin/node-template/src/service.rs index 6fd4daed69c8a..600ae2c5b2db1 100644 --- a/bin/node-template/src/service.rs +++ b/bin/node-template/src/service.rs @@ -2,13 +2,13 @@ use std::sync::Arc; use std::time::Duration; -use substrate_client::LongestChain; +use sc_client::LongestChain; use runtime::{self, GenesisConfig, opaque::Block, RuntimeApi}; -use substrate_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; +use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder}; use inherents::InherentDataProviders; use network::{construct_simple_protocol}; -use substrate_executor::native_executor_instance; -pub use substrate_executor::NativeExecutor; +use sc_executor::native_executor_instance; +pub use sc_executor::NativeExecutor; use aura_primitives::sr25519::{AuthorityPair as AuraPair}; use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; use basic_authorship; @@ -34,11 +34,11 @@ macro_rules! new_full_start { let mut import_setup = None; let inherent_data_providers = inherents::InherentDataProviders::new(); - let builder = substrate_service::ServiceBuilder::new_full::< + let builder = sc_service::ServiceBuilder::new_full::< runtime::opaque::Block, runtime::RuntimeApi, crate::service::Executor >($config)? .with_select_chain(|_config, backend| { - Ok(substrate_client::LongestChain::new(backend.clone())) + Ok(sc_client::LongestChain::new(backend.clone())) })? .with_transaction_pool(|config, client, _fetcher| { let pool_api = txpool::FullChainApi::new(client.clone()); @@ -49,7 +49,7 @@ macro_rules! new_full_start { })? .with_import_queue(|_config, client, mut select_chain, transaction_pool| { let select_chain = select_chain.take() - .ok_or_else(|| substrate_service::Error::SelectChainRequired)?; + .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = grandpa::block_import::<_, _, _, runtime::RuntimeApi, _>( diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index d04a0382b48f1..6b61f7abe0618 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -34,34 +34,34 @@ rand = "0.7.2" structopt = "0.3.3" # primitives -authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../../primitives/authority-discovery"} -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe" } -grandpa_primitives = { package = "substrate-finality-grandpa-primitives", path = "../../../primitives/finality-grandpa" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../../primitives/authority-discovery"} +babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe" } +grandpa_primitives = { package = "sp-finality-granpda", path = "../../../primitives/finality-grandpa" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +sp-runtime = { path = "../../../primitives/sr-primitives" } sp-timestamp = { path = "../../../primitives/timestamp", default-features = false } sp-finality-tracker = { path = "../../../primitives/finality-tracker", default-features = false } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" } -runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring" } +runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" } # client dependencies -client-api = { package = "substrate-client-api", path = "../../../client/api" } -client = { package = "substrate-client", path = "../../../client/" } -chain-spec = { package = "substrate-chain-spec", path = "../../../client/chain-spec" } +client-api = { package = "sc-client-api", path = "../../../client/api" } +client = { package = "sc-client", path = "../../../client/" } +chain-spec = { package = "sc-chain-spec", path = "../../../client/chain-spec" } txpool = { package = "sc-transaction-pool", path = "../../../client/transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" } -network = { package = "substrate-network", path = "../../../client/network" } -babe = { package = "substrate-consensus-babe", path = "../../../client/consensus/babe" } -grandpa = { package = "substrate-finality-grandpa", path = "../../../client/finality-grandpa" } -client_db = { package = "substrate-client-db", path = "../../../client/db", default-features = false } -offchain = { package = "substrate-offchain", path = "../../../client/offchain" } -substrate-rpc = { package = "substrate-rpc", path = "../../../client/rpc" } -substrate-basic-authorship = { path = "../../../client/basic-authorship" } -substrate-service = { path = "../../../client/service", default-features = false } -substrate-telemetry = { package = "substrate-telemetry", path = "../../../client/telemetry" } -authority-discovery = { package = "substrate-authority-discovery", path = "../../../client/authority-discovery"} -consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } +network = { package = "sc-network", path = "../../../client/network" } +babe = { package = "sc-consensus-babe", path = "../../../client/consensus/babe" } +grandpa = { package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } +client_db = { package = "sc-client-db", path = "../../../client/db", default-features = false } +offchain = { package = "sc-offchain", path = "../../../client/offchain" } +sc-rpc = { package = "sc-rpc", path = "../../../client/rpc" } +sc-basic-authority = { path = "../../../client/basic-authorship" } +sc-service = { path = "../../../client/service", default-features = false } +sc-telemetry = { package = "sc-telemetry", path = "../../../client/telemetry" } +authority-discovery = { package = "sc-authority-discovery", path = "../../../client/authority-discovery"} +consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } # frame dependencies indices = { package = "pallet-indices", path = "../../../frame/indices" } @@ -82,7 +82,7 @@ node-executor = { path = "../executor" } # CLI-specific dependencies tokio = { version = "0.1.22", optional = true } -substrate-cli = { path = "../../../client/cli", optional = true } +sc-cli = { path = "../../../client/cli", optional = true } transaction-factory = { path = "../../../test/utils/transaction-factory", optional = true } ctrlc = { version = "3.1.3", features = ["termination"], optional = true } @@ -98,14 +98,14 @@ kvdb-memorydb = { version = "0.1.1", optional = true } rand6 = { package = "rand", version = "0.6", features = ["wasm-bindgen"], optional = true } # Imported just for the `wasm-bindgen` feature [dev-dependencies] -keystore = { package = "substrate-keystore", path = "../../../client/keystore" } -babe = { package = "substrate-consensus-babe", path = "../../../client/consensus/babe", features = ["test-helpers"] } -service-test = { package = "substrate-service-test", path = "../../../client/service/test" } +keystore = { package = "sc-keystore", path = "../../../client/keystore" } +babe = { package = "sc-consensus-babe", path = "../../../client/consensus/babe", features = ["test-helpers"] } +service-test = { package = "sc-service-test", path = "../../../client/service/test" } futures = "0.3.1" tempfile = "3.1.0" [build-dependencies] -substrate-cli = { package = "substrate-cli", path = "../../../client/cli" } +sc-cli = { package = "sc-cli", path = "../../../client/cli" } build-script-utils = { package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } structopt = "0.3.3" vergen = "3.0.4" @@ -125,16 +125,16 @@ browser = [ "rand6" ] cli = [ - "substrate-cli", + "sc-cli", "transaction-factory", "tokio", "ctrlc", - "substrate-service/rocksdb", + "sc-service/rocksdb", "node-executor/wasmi-errno", ] wasmtime = [ "cli", "node-executor/wasmtime", - "substrate-cli/wasmtime", - "substrate-service/wasmtime", + "sc-cli/wasmtime", + "sc-service/wasmtime", ] diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs index 45cf173efb3e9..338fbd081e720 100644 --- a/bin/node/cli/bin/main.rs +++ b/bin/node/cli/bin/main.rs @@ -20,13 +20,13 @@ use futures::channel::oneshot; use futures::{future, FutureExt}; -use substrate_cli::VersionInfo; +use sc_cli::VersionInfo; use std::cell::RefCell; // handles ctrl-c struct Exit; -impl substrate_cli::IntoExit for Exit { +impl sc_cli::IntoExit for Exit { type Exit = future::Map, fn(Result<(), oneshot::Canceled>) -> ()>; fn into_exit(self) -> Self::Exit { // can't use signal directly here because CtrlC takes only `Fn`. @@ -43,7 +43,7 @@ impl substrate_cli::IntoExit for Exit { } } -fn main() -> Result<(), substrate_cli::error::Error> { +fn main() -> Result<(), sc_cli::error::Error> { let version = VersionInfo { name: "Substrate Node", commit: env!("VERGEN_SHA_SHORT"), diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs index ae936ce4fbace..44bbe8c5dbb8b 100644 --- a/bin/node/cli/build.rs +++ b/bin/node/cli/build.rs @@ -16,7 +16,7 @@ use std::{fs, env, path::Path}; use structopt::{StructOpt, clap::Shell}; -use substrate_cli::{NoCustom, CoreParams}; +use sc_cli::{NoCustom, CoreParams}; use vergen::{ConstantsFlags, generate_cargo_keys}; fn main() { diff --git a/bin/node/cli/src/browser.rs b/bin/node/cli/src/browser.rs index 93df41402b9f2..b09bb74026525 100644 --- a/bin/node/cli/src/browser.rs +++ b/bin/node/cli/src/browser.rs @@ -19,7 +19,7 @@ use futures01::{prelude::*, sync::oneshot, sync::mpsc}; use libp2p::wasm_ext; use log::{debug, info}; use std::sync::Arc; -use substrate_service::{AbstractService, RpcSession, Roles as ServiceRoles, Configuration, config::DatabaseConfig}; +use sc_service::{AbstractService, RpcSession, Roles as ServiceRoles, Configuration, config::DatabaseConfig}; use wasm_bindgen::prelude::*; /// Starts the client. diff --git a/bin/node/cli/src/chain_spec.rs b/bin/node/cli/src/chain_spec.rs index 792dd237ac4dc..51ef7590ac339 100644 --- a/bin/node/cli/src/chain_spec.rs +++ b/bin/node/cli/src/chain_spec.rs @@ -26,14 +26,14 @@ use node_runtime::{ }; use node_runtime::Block; use node_runtime::constants::currency::*; -use substrate_service; +use sc_service; use hex_literal::hex; -use substrate_telemetry::TelemetryEndpoints; +use sc_telemetry::TelemetryEndpoints; use grandpa_primitives::{AuthorityId as GrandpaId}; use babe_primitives::{AuthorityId as BabeId}; use im_online::sr25519::{AuthorityId as ImOnlineId}; use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; -use sr_primitives::{Perbill, traits::{Verify, IdentifyAccount}}; +use sp_runtime::{Perbill, traits::{Verify, IdentifyAccount}}; pub use node_primitives::{AccountId, Balance, Signature}; pub use node_runtime::GenesisConfig; @@ -53,7 +53,7 @@ pub struct Extensions { } /// Specialized `ChainSpec`. -pub type ChainSpec = substrate_service::ChainSpec< +pub type ChainSpec = sc_service::ChainSpec< GenesisConfig, Extensions, >; @@ -347,7 +347,7 @@ pub fn local_testnet_config() -> ChainSpec { pub(crate) mod tests { use super::*; use crate::service::new_full; - use substrate_service::Roles; + use sc_service::Roles; use service_test; fn local_testnet_genesis_instant_single() -> GenesisConfig { diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 3a83c3eb76a38..add6eaa590c48 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -14,14 +14,14 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -pub use substrate_cli::VersionInfo; +pub use sc_cli::VersionInfo; use tokio::prelude::Future; use tokio::runtime::{Builder as RuntimeBuilder, Runtime}; -use substrate_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; -use substrate_service::{AbstractService, Roles as ServiceRoles, Configuration}; +use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; +use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use log::info; use structopt::{StructOpt, clap::App}; -use substrate_cli::{display_role, parse_and_prepare, AugmentClap, GetLogFilter, ParseAndPrepare}; +use sc_cli::{display_role, parse_and_prepare, AugmentClap, GetLogFilter, ParseAndPrepare}; use crate::{service, ChainSpec, load_spec}; use crate::factory_impl::FactoryState; use transaction_factory::RuntimeAdapter; @@ -93,7 +93,7 @@ impl AugmentClap for FactoryCmd { } /// Parse command line arguments into service configuration. -pub fn run(args: I, exit: E, version: substrate_cli::VersionInfo) -> error::Result<()> where +pub fn run(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Result<()> where I: IntoIterator, T: Into + Clone, E: IntoExit, @@ -135,13 +135,13 @@ pub fn run(args: I, exit: E, version: substrate_cli::VersionInfo) -> er ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Config<_, _>| Ok(new_full_start!(config).0), load_spec), ParseAndPrepare::CustomCommand(CustomSubcommands::Factory(cli_args)) => { - let mut config: Config<_, _> = substrate_cli::create_config_with_db_path( + let mut config: Config<_, _> = sc_cli::create_config_with_db_path( load_spec, &cli_args.shared_params, &version, )?; - substrate_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; + sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; match ChainSpec::from(config.chain_spec.id()) { Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, @@ -180,7 +180,7 @@ where let (exit_send, exit) = oneshot::channel(); - let informant = substrate_cli::informant::build(&service); + let informant = sc_cli::informant::build(&service); let future = select(informant, exit) .map(|_| Ok(())) diff --git a/bin/node/cli/src/factory_impl.rs b/bin/node/cli/src/factory_impl.rs index b47710b733f48..5f37615b1bc42 100644 --- a/bin/node/cli/src/factory_impl.rs +++ b/bin/node/cli/src/factory_impl.rs @@ -29,7 +29,7 @@ use node_runtime::{ }; use node_primitives::Signature; use primitives::{sr25519, crypto::Pair}; -use sr_primitives::{ +use sp_runtime::{ generic::Era, traits::{Block as BlockT, Header as HeaderT, SignedExtension, Verify, IdentifyAccount} }; use transaction_factory::RuntimeAdapter; @@ -71,7 +71,7 @@ impl RuntimeAdapter for FactoryState { type AccountId = node_primitives::AccountId; type Balance = node_primitives::Balance; type Block = node_primitives::Block; - type Phase = sr_primitives::generic::Phase; + type Phase = sp_runtime::generic::Phase; type Secret = sr25519::Pair; type Index = node_primitives::Index; diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index e6e54be6be6f3..6dd08addc6d52 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -26,16 +26,16 @@ use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; use node_executor; use node_primitives::Block; use node_runtime::{GenesisConfig, RuntimeApi}; -use substrate_service::{ +use sc_service::{ AbstractService, ServiceBuilder, config::Configuration, error::{Error as ServiceError}, }; use inherents::InherentDataProviders; use network::construct_simple_protocol; -use substrate_service::{Service, NetworkStatus}; +use sc_service::{Service, NetworkStatus}; use client::{Client, LocalCallExecutor}; use client_db::Backend; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; use node_executor::NativeExecutor; use network::NetworkService; use offchain::OffchainWorkers; @@ -52,11 +52,11 @@ construct_simple_protocol! { /// be able to perform chain operations. macro_rules! new_full_start { ($config:expr) => {{ - type RpcExtension = jsonrpc_core::IoHandler; + type RpcExtension = jsonrpc_core::IoHandler; let mut import_setup = None; let inherent_data_providers = inherents::InherentDataProviders::new(); - let builder = substrate_service::ServiceBuilder::new_full::< + let builder = sc_service::ServiceBuilder::new_full::< node_primitives::Block, node_runtime::RuntimeApi, node_executor::Executor >($config)? .with_select_chain(|_config, backend| { @@ -71,7 +71,7 @@ macro_rules! new_full_start { })? .with_import_queue(|_config, client, mut select_chain, _transaction_pool| { let select_chain = select_chain.take() - .ok_or_else(|| substrate_service::Error::SelectChainRequired)?; + .ok_or_else(|| sc_service::Error::SelectChainRequired)?; let (grandpa_block_import, grandpa_link) = grandpa::block_import( client.clone(), &*client, @@ -160,14 +160,14 @@ macro_rules! new_full { ($with_startup_data)(&block_import, &babe_link); if participates_in_consensus { - let proposer = substrate_basic_authorship::ProposerFactory { + let proposer = sc_basic_authority::ProposerFactory { client: service.client(), transaction_pool: service.transaction_pool(), }; let client = service.client(); let select_chain = service.select_chain() - .ok_or(substrate_service::Error::SelectChainRequired)?; + .ok_or(sc_service::Error::SelectChainRequired)?; let can_author_with = consensus_common::CanAuthorWithNativeVersion::new(client.executor().clone()); @@ -314,7 +314,7 @@ pub fn new_full(config: NodeConfiguration) /// Builds a new service for a light client. pub fn new_light(config: NodeConfiguration) -> Result { - type RpcExtension = jsonrpc_core::IoHandler; + type RpcExtension = jsonrpc_core::IoHandler; let inherent_data_providers = InherentDataProviders::new(); let service = ServiceBuilder::new_light::(config)? @@ -394,7 +394,7 @@ mod tests { use node_runtime::constants::{currency::CENTS, time::SLOT_DURATION}; use codec::{Encode, Decode}; use primitives::{crypto::Pair as CryptoPair, H256}; - use sr_primitives::{ + use sp_runtime::{ generic::{BlockId, Era, Digest, SignedPayload}, traits::Block as BlockT, traits::Verify, @@ -403,9 +403,9 @@ mod tests { use sp_timestamp; use sp_finality_tracker; use keyring::AccountKeyring; - use substrate_service::{AbstractService, Roles}; + use sc_service::{AbstractService, Roles}; use crate::service::new_full; - use sr_primitives::traits::IdentifyAccount; + use sp_runtime::traits::IdentifyAccount; type AccountPublic = ::Signer; @@ -518,7 +518,7 @@ mod tests { let parent_id = BlockId::number(service.client().info().chain.best_number); let parent_header = service.client().header(&parent_id).unwrap().unwrap(); - let mut proposer_factory = substrate_basic_authorship::ProposerFactory { + let mut proposer_factory = sc_basic_authority::ProposerFactory { client: service.client(), transaction_pool: service.transaction_pool(), }; diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index aad3351e91451..bafe514393f9e 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -8,18 +8,18 @@ edition = "2018" [dependencies] trie-root = "0.15.2" codec = { package = "parity-scale-codec", version = "1.0.0" } -runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" } -state_machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" } -substrate-executor = { path = "../../../client/executor" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -trie = { package = "substrate-trie", path = "../../../primitives/trie" } +runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" } +state_machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" } +sc-executor = { path = "../../../client/executor" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +trie = { package = "sp-trie", path = "../../../primitives/trie" } node-primitives = { path = "../primitives" } node-runtime = { path = "../runtime" } [dev-dependencies] node-testing = { path = "../testing" } test-client = { package = "substrate-test-client", path = "../../../test/utils/client" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } runtime_support = { package = "frame-support", path = "../../../frame/support" } balances = { package = "pallet-balances", path = "../../../frame/balances" } transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" } @@ -35,10 +35,10 @@ criterion = "0.3.0" [features] wasmtime = [ - "substrate-executor/wasmtime", + "sc-executor/wasmtime", ] wasmi-errno = [ - "substrate-executor/wasmi-errno", + "sc-executor/wasmi-errno", ] stress-test = [] diff --git a/bin/node/executor/benches/bench.rs b/bin/node/executor/benches/bench.rs index e72c28467fa7f..86a9c1c6725fb 100644 --- a/bin/node/executor/benches/bench.rs +++ b/bin/node/executor/benches/bench.rs @@ -28,7 +28,7 @@ use primitives::storage::well_known_keys; use primitives::traits::CodeExecutor; use runtime_support::Hashable; use state_machine::TestExternalities as CoreTestExternalities; -use substrate_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities}; +use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities}; criterion_group!(benches, bench_execute_block); criterion_main!(benches); diff --git a/bin/node/executor/src/lib.rs b/bin/node/executor/src/lib.rs index d85ec452c72c5..b2410ed15edeb 100644 --- a/bin/node/executor/src/lib.rs +++ b/bin/node/executor/src/lib.rs @@ -17,8 +17,8 @@ //! A `CodeExecutor` specialization which uses natively compiled runtime when the wasm to be //! executed is equivalent to the natively compiled code. -pub use substrate_executor::NativeExecutor; -use substrate_executor::native_executor_instance; +pub use sc_executor::NativeExecutor; +use sc_executor::native_executor_instance; // Declare an instance of the native executor named `Executor`. Include the wasm binary as the // equivalent wasm code. @@ -30,7 +30,7 @@ native_executor_instance!( #[cfg(test)] mod tests { - use substrate_executor::error::Result; + use sc_executor::error::Result; use super::Executor; use {balances, contracts, indices, system, timestamp}; use codec::{Encode, Decode, Joiner}; @@ -44,12 +44,12 @@ mod tests { Blake2Hasher, NeverNativeValue, NativeOrEncoded, map, traits::{CodeExecutor, Externalities}, storage::well_known_keys, }; - use sr_primitives::{ + use sp_runtime::{ Fixed64, traits::{Header as HeaderT, Hash as HashT, Convert}, ApplyExtrinsicResult, transaction_validity::InvalidTransaction, }; use contracts::ContractAddressFor; - use substrate_executor::{NativeExecutor, WasmExecutionMethod}; + use sc_executor::{NativeExecutor, WasmExecutionMethod}; use system::{EventRecord, Phase}; use node_runtime::{ Header, Block, UncheckedExtrinsic, CheckedExtrinsic, Call, Runtime, Balances, BuildStorage, diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index 1f632dda8dd5c..6c8d1e22adb21 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -5,16 +5,16 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } -sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } +sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } [dev-dependencies] -substrate-serializer = { path = "../../../primitives/serializer" } +sp-serializer = { path = "../../../primitives/serializer" } pretty_assertions = "0.6.1" [features] default = ["std"] std = [ "primitives/std", - "sr-primitives/std", + "sp-runtime/std", ] diff --git a/bin/node/primitives/src/lib.rs b/bin/node/primitives/src/lib.rs index b6a5ec05655c5..eeb03a1b9bf39 100644 --- a/bin/node/primitives/src/lib.rs +++ b/bin/node/primitives/src/lib.rs @@ -20,7 +20,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sr_primitives::{ +use sp_runtime::{ generic, traits::{Verify, BlakeTwo256, IdentifyAccount}, OpaqueExtrinsic, MultiSignature }; diff --git a/bin/node/rpc-client/Cargo.toml b/bin/node/rpc-client/Cargo.toml index 882dd7ee2b629..5ef06beb6505a 100644 --- a/bin/node/rpc-client/Cargo.toml +++ b/bin/node/rpc-client/Cargo.toml @@ -11,4 +11,4 @@ hyper = "0.12.35" jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] } log = "0.4.8" node-primitives = { path = "../primitives" } -substrate-rpc = { path = "../../../client/rpc", version = "2.0.0" } +sc-rpc = { path = "../../../client/rpc", version = "2.0.0" } diff --git a/bin/node/rpc-client/src/main.rs b/bin/node/rpc-client/src/main.rs index fe057bcbeaf42..3874556ef6217 100644 --- a/bin/node/rpc-client/src/main.rs +++ b/bin/node/rpc-client/src/main.rs @@ -24,7 +24,7 @@ use futures::Future; use hyper::rt; use node_primitives::Hash; -use substrate_rpc::author::{ +use sc_rpc::author::{ AuthorClient, hash::ExtrinsicOrHash, }; diff --git a/bin/node/rpc/Cargo.toml b/bin/node/rpc/Cargo.toml index fb571e2706f35..56edc94d4e4a5 100644 --- a/bin/node/rpc/Cargo.toml +++ b/bin/node/rpc/Cargo.toml @@ -5,11 +5,11 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -client = { package = "substrate-client", path = "../../../client/" } +client = { package = "sc-client", path = "../../../client/" } jsonrpc-core = "14.0.3" node-primitives = { path = "../primitives" } node-runtime = { path = "../runtime" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } pallet-contracts-rpc = { path = "../../../frame/contracts/rpc/" } pallet-transaction-payment-rpc = { path = "../../../frame/transaction-payment/rpc/" } substrate-frame-rpc-system = { path = "../../../utils/frame/rpc/system" } diff --git a/bin/node/rpc/src/lib.rs b/bin/node/rpc/src/lib.rs index 06b0e33606483..718250d1d4841 100644 --- a/bin/node/rpc/src/lib.rs +++ b/bin/node/rpc/src/lib.rs @@ -18,7 +18,7 @@ //! //! Since `substrate` core functionality makes no assumptions //! about the modules used inside the runtime, so do -//! RPC methods defined in `substrate-rpc` crate. +//! RPC methods defined in `sc-rpc` crate. //! It means that `client/rpc` can't have any methods that //! need some strong assumptions about the particular runtime. //! @@ -33,7 +33,7 @@ use std::sync::Arc; use node_primitives::{Block, AccountId, Index, Balance}; use node_runtime::UncheckedExtrinsic; -use sr_primitives::traits::ProvideRuntimeApi; +use sp_runtime::traits::ProvideRuntimeApi; use txpool_api::TransactionPool; /// Light client extra dependencies. diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index c24e4eb4d00fd..18e307c55b7af 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -14,21 +14,21 @@ rustc-hex = { version = "2.0", optional = true } serde = { version = "1.0.102", optional = true } # primitives -authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../../primitives/authority-discovery", default-features = false } -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe", default-features = false } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false} -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../../primitives/authority-discovery", default-features = false } +babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe", default-features = false } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api", default-features = false} +inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false } node-primitives = { path = "../primitives", default-features = false } -offchain-primitives = { package = "substrate-offchain-primitives", path = "../../../primitives/offchain", default-features = false } -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false } -sr-api = { path = "../../../primitives/sr-api", default-features = false } -sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../../primitives/sr-staking-primitives", default-features = false } -substrate-keyring = { path = "../../../primitives/keyring", optional = true } -substrate-session = { path = "../../../primitives/session", default-features = false } +offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false } +sp-api = { path = "../../../primitives/sr-api", default-features = false } +sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../../primitives/sr-staking-primitives", default-features = false } +sp-keyring = { path = "../../../primitives/keyring", optional = true } +sp-sesssion = { path = "../../../primitives/session", default-features = false } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false } -version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false } +version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false } # frame dependencies authority-discovery = { package = "pallet-authority-discovery", path = "../../../frame/authority-discovery", default-features = false } @@ -66,7 +66,7 @@ transaction-payment-rpc-runtime-api = { package = "pallet-transaction-payment-rp wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" } +runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" } [features] default = ["std"] @@ -102,12 +102,12 @@ std = [ "safe-mix/std", "serde", "session/std", - "sr-api/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-api/std", + "sp-runtime/std", + "sp-staking/std", "staking/std", - "substrate-keyring", - "substrate-session/std", + "sp-keyring", + "sp-sesssion/std", "sudo/std", "support/std", "system-rpc-runtime-api/std", diff --git a/bin/node/runtime/src/impls.rs b/bin/node/runtime/src/impls.rs index 1b9006e75e4b1..a4547aa07b428 100644 --- a/bin/node/runtime/src/impls.rs +++ b/bin/node/runtime/src/impls.rs @@ -17,8 +17,8 @@ //! Some configurable implementations as associated type for the substrate runtime. use node_primitives::Balance; -use sr_primitives::traits::{Convert, Saturating}; -use sr_primitives::{Fixed64, Perbill}; +use sp_runtime::traits::{Convert, Saturating}; +use sp_runtime::{Fixed64, Perbill}; use support::{traits::{OnUnbalanced, Currency, Get}, weights::Weight}; use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance}; @@ -115,7 +115,7 @@ impl> Convert for TargetedFeeAdjustment { #[cfg(test)] mod tests { use super::*; - use sr_primitives::assert_eq_error_rate; + use sp_runtime::assert_eq_error_rate; use crate::{MaximumBlockWeight, AvailableBlockRatio, Runtime}; use crate::{constants::currency::*, TransactionPayment, TargetBlockFullness}; use support::weights::Weight; diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 366f8847354b8..90085ce801bcf 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -28,11 +28,11 @@ use support::{ }; use primitives::u32_trait::{_1, _2, _3, _4}; use node_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature}; -use sr_api::impl_runtime_apis; -use sr_primitives::{Permill, Perbill, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str}; -use sr_primitives::curve::PiecewiseLinear; -use sr_primitives::transaction_validity::TransactionValidity; -use sr_primitives::traits::{ +use sp_api::impl_runtime_apis; +use sp_runtime::{Permill, Perbill, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str}; +use sp_runtime::curve::PiecewiseLinear; +use sp_runtime::transaction_validity::TransactionValidity; +use sp_runtime::traits::{ self, BlakeTwo256, Block as BlockT, NumberFor, StaticLookup, SaturatedConversion, OpaqueKeys, }; @@ -50,7 +50,7 @@ use system::offchain::TransactionSubmitter; use inherents::{InherentData, CheckInherentsResult}; #[cfg(any(feature = "std", test))] -pub use sr_primitives::BuildStorage; +pub use sp_runtime::BuildStorage; pub use timestamp::Call as TimestampCall; pub use balances::Call as BalancesCall; pub use contracts::Gas; @@ -248,7 +248,7 @@ pallet_staking_reward_curve::build! { } parameter_types! { - pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6; + pub const SessionsPerEra: sp_staking::SessionIndex = 6; pub const BondingDuration: staking::EraIndex = 24 * 28; pub const SlashDeferDuration: staking::EraIndex = 24 * 7; // 1/4 the bonding duration. pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; @@ -571,7 +571,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic, Runtime, AllModules>; impl_runtime_apis! { - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { VERSION } @@ -585,7 +585,7 @@ impl_runtime_apis! { } } - impl sr_api::Metadata for Runtime { + impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { Runtime::metadata().into() } @@ -711,7 +711,7 @@ impl_runtime_apis! { } } - impl substrate_session::SessionKeys for Runtime { + impl sp_sesssion::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { SessionKeys::generate(seed) } diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index 2bfdd58a65b92..4bbf14972d145 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -7,22 +7,22 @@ edition = "2018" [dependencies] balances = { package = "pallet-balances", path = "../../../frame/balances" } -client = { package = "substrate-client", path = "../../../client/" } +client = { package = "sc-client", path = "../../../client/" } codec = { package = "parity-scale-codec", version = "1.0.0" } contracts = { package = "pallet-contracts", path = "../../../frame/contracts" } grandpa = { package = "pallet-grandpa", path = "../../../frame/grandpa" } indices = { package = "pallet-indices", path = "../../../frame/indices" } -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring" } node-executor = { path = "../executor" } node-primitives = { path = "../primitives" } node-runtime = { path = "../runtime" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" } runtime_support = { package = "frame-support", path = "../../../frame/support" } session = { package = "pallet-session", path = "../../../frame/session" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } staking = { package = "pallet-staking", path = "../../../frame/staking" } -substrate-executor = { path = "../../../client/executor" } +sc-executor = { path = "../../../client/executor" } system = { package = "frame-system", path = "../../../frame/system" } test-client = { package = "substrate-test-client", path = "../../../test/utils/client" } timestamp = { package = "pallet-timestamp", path = "../../../frame/timestamp" } diff --git a/bin/node/testing/src/client.rs b/bin/node/testing/src/client.rs index 3b16f2cbcb97d..b865a407fac4d 100644 --- a/bin/node/testing/src/client.rs +++ b/bin/node/testing/src/client.rs @@ -16,13 +16,13 @@ //! Utilites to build a `TestClient` for `node-runtime`. -use sr_primitives::BuildStorage; +use sp_runtime::BuildStorage; /// Re-export test-client utilities. pub use test_client::*; /// Call executor for `node-runtime` `TestClient`. -pub type Executor = substrate_executor::NativeExecutor; +pub type Executor = sc_executor::NativeExecutor; /// Default backend type. pub type Backend = client_db::Backend; diff --git a/bin/node/testing/src/genesis.rs b/bin/node/testing/src/genesis.rs index 1531ba134892a..dae5c2c4a4e1e 100644 --- a/bin/node/testing/src/genesis.rs +++ b/bin/node/testing/src/genesis.rs @@ -24,7 +24,7 @@ use node_runtime::{ }; use node_runtime::constants::currency::*; use primitives::ChangesTrieConfiguration; -use sr_primitives::Perbill; +use sp_runtime::Perbill; /// Create genesis runtime configuration for tests. diff --git a/bin/node/testing/src/keyring.rs b/bin/node/testing/src/keyring.rs index 9c4f11fcf3110..620c26578a178 100644 --- a/bin/node/testing/src/keyring.rs +++ b/bin/node/testing/src/keyring.rs @@ -19,7 +19,7 @@ use keyring::{AccountKeyring, Sr25519Keyring, Ed25519Keyring}; use node_primitives::{AccountId, Balance, Index}; use node_runtime::{CheckedExtrinsic, UncheckedExtrinsic, SessionKeys, SignedExtra}; -use sr_primitives::generic::Era; +use sp_runtime::generic::Era; use codec::Encode; /// Alice's account id. diff --git a/bin/subkey/Cargo.toml b/bin/subkey/Cargo.toml index c7edb4f3975f4..19290b3ccc50e 100644 --- a/bin/subkey/Cargo.toml +++ b/bin/subkey/Cargo.toml @@ -5,10 +5,10 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives = { package = "substrate-primitives", version = "*", path = "../../primitives/core" } +primitives = { package = "sp-core", version = "*", path = "../../primitives/core" } node-runtime = { version = "*", path = "../node/runtime" } node-primitives = { version = "*", path = "../node/primitives" } -sr-primitives = { version = "*", path = "../../primitives/sr-primitives" } +sp-runtime = { version = "*", path = "../../primitives/sr-primitives" } rand = "0.7.2" clap = "2.33.0" tiny-bip39 = "0.6.2" diff --git a/bin/subkey/src/main.rs b/bin/subkey/src/main.rs index b1dce363146fd..d0babc5802cca 100644 --- a/bin/subkey/src/main.rs +++ b/bin/subkey/src/main.rs @@ -28,7 +28,7 @@ use primitives::{ crypto::{set_default_ss58_version, Ss58AddressFormat, Ss58Codec}, ed25519, sr25519, ecdsa, Pair, Public, H256, hexdisplay::HexDisplay, }; -use sr_primitives::{traits::{IdentifyAccount, Verify}, generic::Era}; +use sp_runtime::{traits::{IdentifyAccount, Verify}, generic::Era}; use std::{ convert::{TryInto, TryFrom}, io::{stdin, Read}, diff --git a/client/Cargo.toml b/client/Cargo.toml index 7dadb1f847836..13a98b7f80128 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,41 +1,41 @@ [package] -name = "substrate-client" +name = "sc-client" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -block-builder = { package = "substrate-block-builder", path = "block-builder" } -client-api = { package = "substrate-client-api", path = "api" } +block-builder = { package = "sc-block-builder", path = "block-builder" } +client-api = { package = "sc-client-api", path = "api" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -consensus = { package = "substrate-consensus-common", path = "../primitives/consensus/common" } +consensus = { package = "sp-consensus", path = "../primitives/consensus/common" } derive_more = { version = "0.99.2" } -executor = { package = "substrate-executor", path = "executor" } -externalities = { package = "substrate-externalities", path = "../primitives/externalities" } +executor = { package = "sc-executor", path = "executor" } +externalities = { package = "sp-externalities", path = "../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1", features = ["compat"] } hash-db = { version = "0.15.2" } hex-literal = { version = "0.2.1" } -inherents = { package = "substrate-inherents", path = "../primitives/inherents" } -keyring = { package = "substrate-keyring", path = "../primitives/keyring" } +inherents = { package = "sp-inherents", path = "../primitives/inherents" } +keyring = { package = "sp-keyring", path = "../primitives/keyring" } kvdb = "0.1.1" log = { version = "0.4.8" } parking_lot = { version = "0.9.0" } -primitives = { package = "substrate-primitives", path = "../primitives/core" } -rstd = { package = "sr-std", path = "../primitives/sr-std" } -runtime-version = { package = "sr-version", path = "../primitives/sr-version" } -sr-api = { path = "../primitives/sr-api" } -sr-primitives = { path = "../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../primitives/core" } +rstd = { package = "sp-std", path = "../primitives/sr-std" } +runtime-version = { package = "sp-version", path = "../primitives/sr-version" } +sp-api = { path = "../primitives/sr-api" } +sp-runtime = { path = "../primitives/sr-primitives" } sp-blockchain = { path = "../primitives/blockchain" } -state-machine = { package = "substrate-state-machine", path = "../primitives/state-machine" } -substrate-telemetry = { path = "telemetry" } -trie = { package = "substrate-trie", path = "../primitives/trie" } +state-machine = { package = "sp-state-machine", path = "../primitives/state-machine" } +sc-telemetry = { path = "telemetry" } +trie = { package = "sp-trie", path = "../primitives/trie" } tracing = "0.1.10" [dev-dependencies] env_logger = "0.7.0" tempfile = "3.1.0" -client-db = { package = "substrate-client-db", path = "./db", features = ["kvdb-rocksdb"] } +client-db = { package = "sc-client-db", path = "./db", features = ["kvdb-rocksdb"] } test-client = { package = "substrate-test-runtime-client", path = "../test/utils/runtime/client" } kvdb-memorydb = "0.1.2" -panic-handler = { package = "substrate-panic-handler", path = "../primitives/panic-handler" } +panic-handler = { package = "sp-panic-handler", path = "../primitives/panic-handler" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index 90fab81ba9787..38fe13cda212f 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -1,42 +1,42 @@ [package] -name = "substrate-client-api" +name = "sc-client-api" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -block-builder = { package = "substrate-block-builder", path = "../block-builder" } +block-builder = { package = "sc-block-builder", path = "../block-builder" } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -consensus = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } +consensus = { package = "sp-consensus", path = "../../primitives/consensus/common" } derive_more = { version = "0.99.2" } -executor = { package = "substrate-executor", path = "../executor" } -externalities = { package = "substrate-externalities", path = "../../primitives/externalities" } +executor = { package = "sc-executor", path = "../executor" } +externalities = { package = "sp-externalities", path = "../../primitives/externalities" } fnv = { version = "1.0.6" } futures = { version = "0.3.1" } hash-db = { version = "0.15.2", default-features = false } sp-blockchain = { path = "../../primitives/blockchain" } hex-literal = { version = "0.2.1" } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } -keyring = { package = "substrate-keyring", path = "../../primitives/keyring" } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } +keyring = { package = "sp-keyring", path = "../../primitives/keyring" } kvdb = "0.1.1" log = { version = "0.4.8" } parking_lot = { version = "0.9.0" } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-version = { package = "sr-version", path = "../../primitives/sr-version", default-features = false } -sr-api = { path = "../../primitives/sr-api" } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } -substrate-telemetry = { path = "../telemetry" } -trie = { package = "substrate-trie", path = "../../primitives/trie" } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-version = { package = "sp-version", path = "../../primitives/sr-version", default-features = false } +sp-api = { path = "../../primitives/sr-api" } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } +sc-telemetry = { path = "../telemetry" } +trie = { package = "sp-trie", path = "../../primitives/trie" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } [dev-dependencies] env_logger = "0.7.0" tempfile = "3.1.0" -client-db = { package = "substrate-client-db", path = ".././db", features = ["kvdb-rocksdb"] } +client-db = { package = "sc-client-db", path = ".././db", features = ["kvdb-rocksdb"] } test-primitives = { package = "substrate-test-primitives", path = "../../test/utils/primitives" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } kvdb-memorydb = "0.1.2" -panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" } +panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" } diff --git a/client/api/src/backend.rs b/client/api/src/backend.rs index 220aede2f543c..488cab6bb01d8 100644 --- a/client/api/src/backend.rs +++ b/client/api/src/backend.rs @@ -20,8 +20,8 @@ use std::sync::Arc; use std::collections::HashMap; use primitives::ChangesTrieConfiguration; use primitives::offchain::OffchainStorage; -use sr_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay}; -use sr_primitives::traits::{Block as BlockT, NumberFor}; +use sp_runtime::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use state_machine::backend::Backend as StateBackend; use state_machine::{ChangesTrieStorage as StateChangesTrieStorage, ChangesTrieTransaction}; use crate::{ diff --git a/client/api/src/call_executor.rs b/client/api/src/call_executor.rs index 11a18d2e011a4..8bd4bb9015d39 100644 --- a/client/api/src/call_executor.rs +++ b/client/api/src/call_executor.rs @@ -18,7 +18,7 @@ use std::{cmp::Ord, panic::UnwindSafe, result, cell::RefCell}; use codec::{Encode, Decode}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::Block as BlockT, traits::NumberFor, }; use state_machine::{ @@ -30,7 +30,7 @@ use externalities::Extensions; use hash_db::Hasher; use primitives::{Blake2Hasher, NativeOrEncoded}; -use sr_api::{ProofRecorder, InitializeBlock}; +use sp_api::{ProofRecorder, InitializeBlock}; use sp_blockchain; /// Method call executor. diff --git a/client/api/src/client.rs b/client/api/src/client.rs index 73ce4f108082c..d053e11732a4b 100644 --- a/client/api/src/client.rs +++ b/client/api/src/client.rs @@ -19,7 +19,7 @@ use std::collections::HashMap; use futures::channel::mpsc; use primitives::storage::StorageKey; -use sr_primitives::{ +use sp_runtime::{ traits::{Block as BlockT, NumberFor}, generic::BlockId }; diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index 94ce6c573e5e3..3e0cf44b84993 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -27,7 +27,7 @@ use primitives::{ offchain::{self, OffchainExt, TransactionPoolExt}, traits::{BareCryptoStorePtr, KeystoreExt}, }; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits, }; diff --git a/client/api/src/lib.rs b/client/api/src/lib.rs index 97d7fb2a023d4..ab2f521df258a 100644 --- a/client/api/src/lib.rs +++ b/client/api/src/lib.rs @@ -39,7 +39,7 @@ pub use state_machine::{StorageProof, ExecutionStrategy}; pub mod utils { use sp_blockchain::{HeaderBackend, HeaderMetadata, Error}; use primitives::H256; - use sr_primitives::traits::{Block as BlockT}; + use sp_runtime::traits::{Block as BlockT}; use std::borrow::Borrow; /// Returns a function for checking block ancestry, the returned function will diff --git a/client/api/src/light.rs b/client/api/src/light.rs index 56a18dcc1f069..c368fdd108340 100644 --- a/client/api/src/light.rs +++ b/client/api/src/light.rs @@ -20,7 +20,7 @@ use std::sync::Arc; use std::collections::{BTreeMap, HashMap}; use std::future::Future; -use sr_primitives::{ +use sp_runtime::{ traits::{ Block as BlockT, Header as HeaderT, NumberFor, }, diff --git a/client/api/src/notifications.rs b/client/api/src/notifications.rs index 0ddc4c72cdb55..1706f07b96eca 100644 --- a/client/api/src/notifications.rs +++ b/client/api/src/notifications.rs @@ -24,7 +24,7 @@ use std::{ use fnv::{FnvHashSet, FnvHashMap}; use futures::channel::mpsc; use primitives::storage::{StorageKey, StorageData}; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; /// Storage change set #[derive(Debug)] @@ -307,7 +307,7 @@ impl StorageNotifications { #[cfg(test)] mod tests { - use sr_primitives::testing::{H256 as Hash, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{H256 as Hash, Block as RawBlock, ExtrinsicWrapper}; use super::*; use std::iter::{empty, Empty}; diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 81cf48a72044a..0b1dad37447aa 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-authority-discovery" +name = "sc-authority-discovery" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -9,25 +9,25 @@ build = "build.rs" prost-build = "0.5.0" [dependencies] -authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../primitives/authority-discovery" } +authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../primitives/authority-discovery" } bytes = "0.4.12" -client-api = { package = "substrate-client-api", path = "../api" } +client-api = { package = "sc-client-api", path = "../api" } codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } derive_more = "0.99.2" futures = "0.3.1" futures-timer = "2.0" -keystore = { package = "substrate-keystore", path = "../keystore" } +keystore = { package = "sc-keystore", path = "../keystore" } libp2p = { version = "0.13.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] } log = "0.4.8" -network = { package = "substrate-network", path = "../network" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +network = { package = "sc-network", path = "../network" } +primitives = { package = "sp-core", path = "../../primitives/core" } sp-blockchain = { path = "../../primitives/blockchain" } prost = "0.5.0" serde_json = "1.0.41" -sr-primitives = { path = "../../primitives/sr-primitives" } +sp-runtime = { path = "../../primitives/sr-primitives" } [dev-dependencies] parking_lot = "0.9.0" -peerset = { package = "substrate-peerset", path = "../peerset" } +peerset = { package = "sc-peerset", path = "../peerset" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } -sr-api = { path = "../../primitives/sr-api" } +sp-api = { path = "../../primitives/sr-api" } diff --git a/client/authority-discovery/src/lib.rs b/client/authority-discovery/src/lib.rs index f404ad3c43702..cd436237306e4 100644 --- a/client/authority-discovery/src/lib.rs +++ b/client/authority-discovery/src/lib.rs @@ -64,8 +64,8 @@ use network::{DhtEvent, ExHashT}; use primitives::crypto::{key_types, Pair}; use primitives::traits::BareCryptoStorePtr; use prost::Message; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{Block as BlockT, ProvideRuntimeApi}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, ProvideRuntimeApi}; type Interval = Box + Unpin + Send + Sync>; @@ -472,13 +472,13 @@ fn interval_at(start: Instant, duration: Duration) -> Interval { #[cfg(test)] mod tests { use super::*; - use sr_api::{ApiExt, Core, RuntimeVersion, StorageProof}; + use sp_api::{ApiExt, Core, RuntimeVersion, StorageProof}; use futures::channel::mpsc::channel; use futures::executor::block_on; use futures::future::poll_fn; use primitives::{ExecutionContext, NativeOrEncoded, testing::KeyStore}; - use sr_primitives::traits::Zero; - use sr_primitives::traits::{ApiRef, Block as BlockT, NumberFor, ProvideRuntimeApi}; + use sp_runtime::traits::Zero; + use sp_runtime::traits::{ApiRef, Block as BlockT, NumberFor, ProvideRuntimeApi}; use std::sync::{Arc, Mutex}; use test_client::runtime::Block; diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index c284f4b2ee7eb..3f4cbb0bc61c9 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-basic-authorship" +name = "sc-basic-authority" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -8,16 +8,16 @@ edition = "2018" log = "0.4.8" futures = "0.3.1" codec = { package = "parity-scale-codec", version = "1.0.0" } -sr-primitives = { path = "../../primitives/sr-primitives" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +sp-runtime = { path = "../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../primitives/core" } sp-blockchain = { path = "../../primitives/blockchain" } -client = { package = "substrate-client", path = "../" } -client-api = { package = "substrate-client-api", path = "../api" } -consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents" } -substrate-telemetry = { path = "../telemetry" } +client = { package = "sc-client", path = "../" } +client-api = { package = "sc-client-api", path = "../api" } +consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" } +inherents = { package = "sp-inherents", path = "../../primitives/inherents" } +sc-telemetry = { path = "../telemetry" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } -block-builder = { package = "substrate-block-builder", path = "../block-builder" } +block-builder = { package = "sc-block-builder", path = "../block-builder" } tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] } [dev-dependencies] diff --git a/client/basic-authorship/src/basic_authorship.rs b/client/basic-authorship/src/basic_authorship.rs index abffe8ee4007d..131a4e9f2d908 100644 --- a/client/basic-authorship/src/basic_authorship.rs +++ b/client/basic-authorship/src/basic_authorship.rs @@ -16,7 +16,7 @@ //! A consensus proposer for "basic" chains which use the primitive inherent-data. -// FIXME #1021 move this into substrate-consensus-common +// FIXME #1021 move this into sp-consensus use std::{time, sync::Arc}; use client_api::CallExecutor; @@ -27,14 +27,14 @@ use consensus_common::{evaluation}; use inherents::InherentData; use log::{error, info, debug, trace}; use primitives::{H256, Blake2Hasher, ExecutionContext}; -use sr_primitives::{ +use sp_runtime::{ traits::{ Block as BlockT, Hash as HashT, Header as HeaderT, ProvideRuntimeApi, DigestFor, BlakeTwo256 }, generic::BlockId, }; use txpool_api::{TransactionPool, InPoolTransaction}; -use substrate_telemetry::{telemetry, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_INFO}; use block_builder::BlockBuilderApi; /// Proposer factory. diff --git a/client/basic-authorship/src/lib.rs b/client/basic-authorship/src/lib.rs index de4a8af93b61c..f27ce9cb52e91 100644 --- a/client/basic-authorship/src/lib.rs +++ b/client/basic-authorship/src/lib.rs @@ -19,9 +19,9 @@ //! # Example //! //! ``` -//! # use substrate_basic_authorship::ProposerFactory; +//! # use sc_basic_authority::ProposerFactory; //! # use consensus_common::{Environment, Proposer}; -//! # use sr_primitives::generic::BlockId; +//! # use sp_runtime::generic::BlockId; //! # use std::{sync::Arc, time::Duration}; //! # use test_client::{self, runtime::{Extrinsic, Transfer}, AccountKeyring}; //! # use txpool::{BasicPool, FullChainApi}; diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index 7b39643aa5e80..1854d499fb987 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "substrate-block-builder" +name = "sc-block-builder" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } -sr-primitives = { path = "../../primitives/sr-primitives" } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } +sp-runtime = { path = "../../primitives/sr-primitives" } sp-blockchain = { path = "../../primitives/blockchain" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] } -runtime_api = { package = "substrate-block-builder-runtime-api", path = "../../primitives/block-builder/runtime-api" } -sr-api = { path = "../../primitives/sr-api" } +runtime_api = { package = "sp-block-builder", path = "../../primitives/block-builder/runtime-api" } +sp-api = { path = "../../primitives/sr-api" } diff --git a/client/block-builder/src/lib.rs b/client/block-builder/src/lib.rs index 69784736454f4..c378bede38983 100644 --- a/client/block-builder/src/lib.rs +++ b/client/block-builder/src/lib.rs @@ -26,7 +26,7 @@ use codec::Encode; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{ Header as HeaderT, Hash, Block as BlockT, HashFor, ProvideRuntimeApi, ApiRef, DigestFor, @@ -36,7 +36,7 @@ use sr_primitives::{ use sp_blockchain::{ApplyExtrinsicFailed, Error}; use primitives::ExecutionContext; use state_machine::StorageProof; -use sr_api::{Core, ApiExt, ApiErrorFor}; +use sp_api::{Core, ApiExt, ApiErrorFor}; pub use runtime_api::BlockBuilder as BlockBuilderApi; diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index da9543e398774..3e67a6cd48587 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "substrate-chain-spec" +name = "sc-chain-spec" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -substrate-chain-spec-derive = { path = "./derive" } +sc-chain-spec-derive = { path = "./derive" } impl-trait-for-tuples = "0.1.3" -network = { package = "substrate-network", path = "../network" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +network = { package = "sc-network", path = "../network" } +primitives = { package = "sp-core", path = "../../primitives/core" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" -sr-primitives = { path = "../../primitives/sr-primitives" } -tel = { package = "substrate-telemetry", path = "../telemetry" } +sp-runtime = { path = "../../primitives/sr-primitives" } +tel = { package = "sc-telemetry", path = "../telemetry" } diff --git a/client/chain-spec/derive/Cargo.toml b/client/chain-spec/derive/Cargo.toml index 9fb8eabc60844..108644066496f 100644 --- a/client/chain-spec/derive/Cargo.toml +++ b/client/chain-spec/derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-chain-spec-derive" +name = "sc-chain-spec-derive" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/chain-spec/derive/src/impls.rs b/client/chain-spec/derive/src/impls.rs index cdc27aef0b9c6..fb16823151bd8 100644 --- a/client/chain-spec/derive/src/impls.rs +++ b/client/chain-spec/derive/src/impls.rs @@ -19,7 +19,7 @@ use quote::quote; use syn::{DeriveInput, Ident, Error}; use proc_macro_crate::crate_name; -const CRATE_NAME: &str = "substrate-chain-spec"; +const CRATE_NAME: &str = "sc-chain-spec"; const ATTRIBUTE_NAME: &str = "forks"; /// Implements `Extension's` `Group` accessor. diff --git a/client/chain-spec/src/chain_spec.rs b/client/chain-spec/src/chain_spec.rs index 0f69654b9e8f6..2ebd814c03275 100644 --- a/client/chain-spec/src/chain_spec.rs +++ b/client/chain-spec/src/chain_spec.rs @@ -23,7 +23,7 @@ use std::path::PathBuf; use std::rc::Rc; use serde::{Serialize, Deserialize}; use primitives::storage::{StorageKey, StorageData}; -use sr_primitives::{BuildStorage, StorageOverlay, ChildrenStorageOverlay}; +use sp_runtime::{BuildStorage, StorageOverlay, ChildrenStorageOverlay}; use serde_json as json; use crate::RuntimeGenesis; use network::Multiaddr; diff --git a/client/chain-spec/src/extension.rs b/client/chain-spec/src/extension.rs index 6b999281607ec..8a42408fba96b 100644 --- a/client/chain-spec/src/extension.rs +++ b/client/chain-spec/src/extension.rs @@ -253,9 +253,9 @@ impl Extension for Forks where #[cfg(test)] mod tests { use super::*; - use substrate_chain_spec_derive::{ChainSpecGroup, ChainSpecExtension}; + use sc_chain_spec_derive::{ChainSpecGroup, ChainSpecExtension}; // Make the proc macro work for tests and doc tests. - use crate as substrate_chain_spec; + use crate as sc_chain_spec; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup)] #[serde(deny_unknown_fields)] diff --git a/client/chain-spec/src/lib.rs b/client/chain-spec/src/lib.rs index 8c35c22d9b2b3..d8876e8aa88a6 100644 --- a/client/chain-spec/src/lib.rs +++ b/client/chain-spec/src/lib.rs @@ -30,7 +30,7 @@ //! ```rust //! use std::collections::HashMap; //! use serde::{Serialize, Deserialize}; -//! use substrate_chain_spec::{ChainSpec, ChainSpecExtension}; +//! use sc_chain_spec::{ChainSpec, ChainSpecExtension}; //! //! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecExtension)] //! pub struct MyExtension { @@ -49,7 +49,7 @@ //! //! ```rust //! use serde::{Serialize, Deserialize}; -//! use substrate_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension}; +//! use sc_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension}; //! //! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecGroup)] //! pub struct ClientParams { @@ -84,7 +84,7 @@ //! //! ```rust //! use serde::{Serialize, Deserialize}; -//! use substrate_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension}; +//! use sc_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension}; //! //! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecGroup)] //! pub struct ClientParams { @@ -113,10 +113,10 @@ mod extension; pub use chain_spec::{ChainSpec, Properties, NoExtension}; pub use extension::{Group, Fork, Forks, Extension}; -pub use substrate_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup}; +pub use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup}; use serde::{Serialize, de::DeserializeOwned}; -use sr_primitives::BuildStorage; +use sp_runtime::BuildStorage; /// A set of traits for the runtime genesis config. pub trait RuntimeGenesis: Serialize + DeserializeOwned + BuildStorage {} diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 976242d24dae6..7c8677475c6f1 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-cli" +name = "sc-cli" version = "2.0.0" authors = ["Parity Technologies "] description = "Substrate CLI interface." @@ -21,20 +21,20 @@ futures = { version = "0.3.1", features = ["compat"] } futures01 = "0.1.29" fdlimit = "0.1.1" serde_json = "1.0.41" -panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" } -client-api = { package = "substrate-client-api", path = "../api" } +panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" } +client-api = { package = "sc-client-api", path = "../api" } sp-blockchain = { path = "../../primitives/blockchain" } -network = { package = "substrate-network", path = "../network" } -sr-primitives = { path = "../../primitives/sr-primitives" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -service = { package = "substrate-service", path = "../service", default-features = false } -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } -substrate-telemetry = { path = "../telemetry" } -keyring = { package = "substrate-keyring", path = "../../primitives/keyring" } +network = { package = "sc-network", path = "../network" } +sp-runtime = { path = "../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../primitives/core" } +service = { package = "sc-service", path = "../service", default-features = false } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } +sc-telemetry = { path = "../telemetry" } +keyring = { package = "sp-keyring", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.3" rpassword = "4.0.1" -substrate-tracing = { package = "substrate-tracing", path = "../tracing" } +sc-transaction = { package = "sc-transaction", path = "../tracing" } [dev-dependencies] tempfile = "3.1.0" diff --git a/client/cli/src/informant.rs b/client/cli/src/informant.rs index 46dca3e54c19c..169fb2a66094c 100644 --- a/client/cli/src/informant.rs +++ b/client/cli/src/informant.rs @@ -19,7 +19,7 @@ use client_api::BlockchainEvents; use futures::{StreamExt, TryStreamExt, FutureExt, future, compat::Stream01CompatExt}; use log::{info, warn}; -use sr_primitives::traits::Header; +use sp_runtime::traits::Header; use service::AbstractService; use std::time::Duration; diff --git a/client/cli/src/informant/display.rs b/client/cli/src/informant/display.rs index 76d326047253a..e91b41b2272ed 100644 --- a/client/cli/src/informant/display.rs +++ b/client/cli/src/informant/display.rs @@ -18,7 +18,7 @@ use ansi_term::Colour; use client_api::ClientInfo; use log::info; use network::SyncState; -use sr_primitives::traits::{Block as BlockT, CheckedDiv, NumberFor, Zero, Saturating}; +use sp_runtime::traits::{Block as BlockT, CheckedDiv, NumberFor, Zero, Saturating}; use service::NetworkStatus; use std::{convert::{TryFrom, TryInto}, fmt, time}; diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index c7b256c15f743..14bae2613e2d5 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -63,9 +63,9 @@ use log::info; use lazy_static::lazy_static; use futures::{Future, FutureExt, TryFutureExt}; use futures01::{Async, Future as _}; -use substrate_telemetry::TelemetryEndpoints; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::Block as BlockT; +use sc_telemetry::TelemetryEndpoints; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::Block as BlockT; /// default sub directory to store network config const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; @@ -970,8 +970,8 @@ fn init_logger(pattern: &str) { builder.filter(Some("ws"), log::LevelFilter::Off); builder.filter(Some("hyper"), log::LevelFilter::Warn); builder.filter(Some("cranelift_wasm"), log::LevelFilter::Warn); - // Always log the special target `substrate_tracing`, overrides global level - builder.filter(Some("substrate_tracing"), log::LevelFilter::Info); + // Always log the special target `sc_transaction`, overrides global level + builder.filter(Some("sc_transaction"), log::LevelFilter::Info); // Enable info for others. builder.filter(None, log::LevelFilter::Info); diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 2ad6a9ea55a0a..a8c6417c44df9 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -311,12 +311,12 @@ arg_enum! { } } -impl Into for TracingReceiver { - fn into(self) -> substrate_tracing::TracingReceiver { +impl Into for TracingReceiver { + fn into(self) -> sc_transaction::TracingReceiver { match self { - TracingReceiver::Log => substrate_tracing::TracingReceiver::Log, - TracingReceiver::Telemetry => substrate_tracing::TracingReceiver::Telemetry, - TracingReceiver::Grafana => substrate_tracing::TracingReceiver::Grafana, + TracingReceiver::Log => sc_transaction::TracingReceiver::Log, + TracingReceiver::Telemetry => sc_transaction::TracingReceiver::Telemetry, + TracingReceiver::Grafana => sc_transaction::TracingReceiver::Grafana, } } } diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 7345a63ddeb42..29c2914d2806f 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -1,41 +1,41 @@ [package] -name = "substrate-consensus-aura" +name = "sc-consensus-aura" version = "2.0.0" authors = ["Parity Technologies "] description = "Aura consensus algorithm for substrate" edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" } -aura_primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura" } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" } -client = { package = "substrate-client", path = "../../" } -client-api = { package = "substrate-client-api", path = "../../api" } +app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" } +aura_primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura" } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" } +client = { package = "sc-client", path = "../../" } +client-api = { package = "sc-client-api", path = "../../api" } codec = { package = "parity-scale-codec", version = "1.0.0" } -consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } +consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } derive_more = "0.99.2" futures = { version = "0.3.1", features = ["compat"] } futures01 = { package = "futures", version = "0.1" } futures-timer = "0.4.0" -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } -keystore = { package = "substrate-keystore", path = "../../keystore" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } +keystore = { package = "sc-keystore", path = "../../keystore" } log = "0.4.8" parking_lot = "0.9.0" -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } +primitives = { package = "sp-core", path = "../../../primitives/core" } sp-blockchain = { path = "../../../primitives/blockchain" } -runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" } -runtime_version = { package = "sr-version", path = "../../../primitives/sr-version" } -slots = { package = "substrate-consensus-slots", path = "../slots" } -sr-api = { path = "../../../primitives/sr-api" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" } +runtime_version = { package = "sp-version", path = "../../../primitives/sr-version" } +slots = { package = "sc-consensus-slots", path = "../slots" } +sp-api = { path = "../../../primitives/sr-api" } +sp-runtime = { path = "../../../primitives/sr-primitives" } sp-timestamp = { path = "../../../primitives/timestamp" } -substrate-telemetry = { path = "../../telemetry" } +sc-telemetry = { path = "../../telemetry" } [dev-dependencies] -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" } -substrate-executor = { path = "../../executor" } -network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]} -service = { package = "substrate-service", path = "../../service" } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring" } +sc-executor = { path = "../../executor" } +network = { package = "sc-network", path = "../../network", features = ["test-helpers"]} +service = { package = "sc-service", path = "../../service" } test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" } tokio = "0.1.22" env_logger = "0.7.0" diff --git a/client/consensus/aura/src/digest.rs b/client/consensus/aura/src/digest.rs index 3baa18587bc7c..e788586616648 100644 --- a/client/consensus/aura/src/digest.rs +++ b/client/consensus/aura/src/digest.rs @@ -21,7 +21,7 @@ use primitives::Pair; use aura_primitives::AURA_ENGINE_ID; -use sr_primitives::generic::{DigestItem, OpaqueDigestItemId}; +use sp_runtime::generic::{DigestItem, OpaqueDigestItemId}; use codec::{Encode, Codec}; use std::fmt::Debug; diff --git a/client/consensus/aura/src/lib.rs b/client/consensus/aura/src/lib.rs index 2e8ec1317c4be..7653be725940e 100644 --- a/client/consensus/aura/src/lib.rs +++ b/client/consensus/aura/src/lib.rs @@ -48,8 +48,8 @@ use sp_blockchain::{ use block_builder_api::BlockBuilder as BlockBuilderApi; -use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification}; -use sr_primitives::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member}; +use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification}; +use sp_runtime::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member}; use primitives::crypto::Pair; use inherents::{InherentDataProviders, InherentData}; @@ -63,14 +63,14 @@ use sp_timestamp::{ TimestampInherentData, InherentType as TimestampInherent, InherentError as TIError }; -use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO}; use slots::{CheckedHeader, SlotData, SlotWorker, SlotInfo, SlotCompatible}; use slots::check_equivocation; use keystore::KeyStorePtr; -use sr_api::ApiExt; +use sp_api::ApiExt; pub use aura_primitives::{ ConsensusLog, AuraApi, AURA_ENGINE_ID, @@ -256,7 +256,7 @@ impl slots::SimpleSlotWorker for AuraWorker Vec> { + fn pre_digest_data(&self, slot_number: u64, _claim: &Self::Claim) -> Vec> { vec![ as CompatibleDigestItem

>::aura_pre_digest(slot_number), ] @@ -720,7 +720,7 @@ mod tests { use consensus_common::NoNetwork as DummyOracle; use network::test::*; use network::test::{Block as TestBlock, PeersClient, PeersFullClient}; - use sr_primitives::traits::{Block as BlockT, DigestFor}; + use sp_runtime::traits::{Block as BlockT, DigestFor}; use network::config::ProtocolConfig; use parking_lot::Mutex; use tokio::runtime::current_thread; diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index a9dd0c5890dff..c7931d82b9f76 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-consensus-babe" +name = "sc-consensus-babe" version = "2.0.0" authors = ["Parity Technologies "] description = "BABE consensus algorithm for substrate" @@ -7,27 +7,27 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -babe_primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" } +babe_primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" } num-bigint = "0.2.3" num-rational = "0.2.2" num-traits = "0.2.8" -runtime-version = { package = "sr-version", path = "../../../primitives/sr-version" } -runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } +runtime-version = { package = "sp-version", path = "../../../primitives/sr-version" } +runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } sp-timestamp = { path = "../../../primitives/timestamp" } -substrate-telemetry = { path = "../../telemetry" } -keystore = { package = "substrate-keystore", path = "../../keystore" } -client-api = { package = "substrate-client-api", path = "../../api" } -client = { package = "substrate-client", path = "../../" } -sr-api = { path = "../../../primitives/sr-api" } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" } +sc-telemetry = { path = "../../telemetry" } +keystore = { package = "sc-keystore", path = "../../keystore" } +client-api = { package = "sc-client-api", path = "../../api" } +client = { package = "sc-client", path = "../../" } +sp-api = { path = "../../../primitives/sr-api" } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" } sp-blockchain = { path = "../../../primitives/blockchain" } -consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } -uncles = { package = "substrate-consensus-uncles", path = "../uncles" } -slots = { package = "substrate-consensus-slots", path = "../slots" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } +uncles = { package = "sc-consensus-uncles", path = "../uncles" } +slots = { package = "sc-consensus-slots", path = "../slots" } +sp-runtime = { path = "../../../primitives/sr-primitives" } fork-tree = { path = "../../../utils/fork-tree" } futures = { version = "0.3.1", features = ["compat"] } futures01 = { package = "futures", version = "0.1" } @@ -41,12 +41,12 @@ pdqselect = "0.1.0" derive_more = "0.99.2" [dev-dependencies] -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" } -substrate-executor = { path = "../../executor" } -network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]} -service = { package = "substrate-service", path = "../../service" } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring" } +sc-executor = { path = "../../executor" } +network = { package = "sc-network", path = "../../network", features = ["test-helpers"]} +service = { package = "sc-service", path = "../../service" } test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" } -block-builder = { package = "substrate-block-builder", path = "../../block-builder" } +block-builder = { package = "sc-block-builder", path = "../../block-builder" } tokio = "0.1.22" env_logger = "0.7.0" tempfile = "3.1.0" diff --git a/client/consensus/babe/src/aux_schema.rs b/client/consensus/babe/src/aux_schema.rs index 288f20db97fc0..f90c3e233a97f 100644 --- a/client/consensus/babe/src/aux_schema.rs +++ b/client/consensus/babe/src/aux_schema.rs @@ -21,7 +21,7 @@ use codec::{Decode, Encode}; use client_api::backend::AuxStore; use sp_blockchain::{Result as ClientResult, Error as ClientError}; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; use babe_primitives::BabeBlockWeight; use super::{epoch_changes::EpochChangesFor, SharedEpochChanges}; diff --git a/client/consensus/babe/src/epoch_changes.rs b/client/consensus/babe/src/epoch_changes.rs index a07235c4ffc7d..5cb1c4f6077e9 100644 --- a/client/consensus/babe/src/epoch_changes.rs +++ b/client/consensus/babe/src/epoch_changes.rs @@ -23,7 +23,7 @@ use std::sync::Arc; use babe_primitives::{Epoch, SlotNumber, NextEpochDescriptor}; use fork_tree::ForkTree; use parking_lot::{Mutex, MutexGuard}; -use sr_primitives::traits::{Block as BlockT, NumberFor, One, Zero}; +use sp_runtime::traits::{Block as BlockT, NumberFor, One, Zero}; use codec::{Encode, Decode}; use client_api::utils::is_descendent_of; use sp_blockchain::{HeaderMetadata, HeaderBackend, Error as ClientError}; diff --git a/client/consensus/babe/src/lib.rs b/client/consensus/babe/src/lib.rs index 026a49a160827..de0efbbcc8980 100644 --- a/client/consensus/babe/src/lib.rs +++ b/client/consensus/babe/src/lib.rs @@ -69,8 +69,8 @@ use consensus_common::{ImportResult, CanAuthorWith}; use consensus_common::import_queue::{ BoxJustificationImport, BoxFinalityProofImport, }; -use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification}; -use sr_primitives::traits::{ +use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification}; +use sp_runtime::traits::{ Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, }; @@ -78,7 +78,7 @@ use keystore::KeyStorePtr; use parking_lot::Mutex; use primitives::{Blake2Hasher, H256, Pair}; use inherents::{InherentDataProviders, InherentData}; -use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG}; +use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG}; use consensus_common::{ self, BlockImport, Environment, Proposer, BlockCheckParams, ForkChoiceStrategy, BlockImportParams, BlockOrigin, Error as ConsensusError, @@ -107,7 +107,7 @@ use sp_blockchain::{ }; use schnorrkel::SignatureError; -use sr_api::ApiExt; +use sp_api::ApiExt; mod aux_schema; mod verification; @@ -411,7 +411,7 @@ impl slots::SimpleSlotWorker for BabeWorker Vec> { + fn pre_digest_data(&self, _slot_number: u64, claim: &Self::Claim) -> Vec> { vec![ as CompatibleDigestItem>::babe_pre_digest(claim.0.clone()), ] diff --git a/client/consensus/babe/src/tests.rs b/client/consensus/babe/src/tests.rs index 405443bc13926..56482ef5fdbb7 100644 --- a/client/consensus/babe/src/tests.rs +++ b/client/consensus/babe/src/tests.rs @@ -31,7 +31,7 @@ use consensus_common::import_queue::{ use network::test::*; use network::test::{Block as TestBlock, PeersClient}; use network::config::BoxFinalityProofRequestBuilder; -use sr_primitives::{generic::DigestItem, traits::{Block as BlockT, DigestFor}}; +use sp_runtime::{generic::DigestItem, traits::{Block as BlockT, DigestFor}}; use network::config::ProtocolConfig; use tokio::runtime::current_thread; use client_api::BlockchainEvents; @@ -540,7 +540,7 @@ fn propose_and_import_block( parent_pre_digest.slot_number() + 1 }); - let pre_digest = sr_primitives::generic::Digest { + let pre_digest = sp_runtime::generic::Digest { logs: vec![ Item::babe_pre_digest( BabePreDigest::Secondary { diff --git a/client/consensus/babe/src/verification.rs b/client/consensus/babe/src/verification.rs index 36e34dfb9578b..353fed808c0c7 100644 --- a/client/consensus/babe/src/verification.rs +++ b/client/consensus/babe/src/verification.rs @@ -16,7 +16,7 @@ //! Verification for BABE headers. use schnorrkel::vrf::{VRFOutput, VRFProof}; -use sr_primitives::{traits::Header, traits::DigestItemFor}; +use sp_runtime::{traits::Header, traits::DigestItemFor}; use primitives::{Pair, Public}; use babe_primitives::{Epoch, BabePreDigest, CompatibleDigestItem, AuthorityId}; use babe_primitives::{AuthoritySignature, SlotNumber, AuthorityIndex, AuthorityPair}; diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index acdfb9e843c8f..9ee579620a53e 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-consensus-pow" +name = "sc-consensus-pow" version = "2.0.0" authors = ["Parity Technologies "] description = "PoW consensus algorithm for substrate" @@ -7,14 +7,14 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } +primitives = { package = "sp-core", path = "../../../primitives/core" } sp-blockchain = { path = "../../../primitives/blockchain" } -sr-primitives = { path = "../../../primitives/sr-primitives" } -client-api = { package = "substrate-client-api", path = "../../api" } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } -pow-primitives = { package = "substrate-consensus-pow-primitives", path = "../../../primitives/consensus/pow" } -consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } +sp-runtime = { path = "../../../primitives/sr-primitives" } +client-api = { package = "sc-client-api", path = "../../api" } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } +pow-primitives = { package = "sp-consensus-pow", path = "../../../primitives/consensus/pow" } +consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } log = "0.4.8" futures = { version = "0.3.1", features = ["compat"] } sp-timestamp = { path = "../../../primitives/timestamp" } diff --git a/client/consensus/pow/src/lib.rs b/client/consensus/pow/src/lib.rs index 914d484da7332..c2029ec72001d 100644 --- a/client/consensus/pow/src/lib.rs +++ b/client/consensus/pow/src/lib.rs @@ -35,9 +35,9 @@ use std::collections::HashMap; use client_api::{BlockOf, backend::AuxStore}; use sp_blockchain::{HeaderBackend, ProvideCache, well_known_cache_keys::Id as CacheKeyId}; use block_builder_api::BlockBuilder as BlockBuilderApi; -use sr_primitives::{Justification, RuntimeString}; -use sr_primitives::generic::{BlockId, Digest, DigestItem}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi}; +use sp_runtime::{Justification, RuntimeString}; +use sp_runtime::generic::{BlockId, Digest, DigestItem}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi}; use sp_timestamp::{TimestampInherentData, InherentError as TIError}; use pow_primitives::{Seal, TotalDifficulty, POW_ENGINE_ID}; use primitives::H256; diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index 083ecdae11cf7..3881906dadf49 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-consensus-slots" +name = "sc-consensus-slots" version = "2.0.0" authors = ["Parity Technologies "] description = "Generic slots-based utilities for consensus" @@ -8,13 +8,13 @@ build = "build.rs" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0" } -client-api = { package = "substrate-client-api", path = "../../api" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } +client-api = { package = "sc-client-api", path = "../../api" } +primitives = { package = "sp-core", path = "../../../primitives/core" } sp-blockchain = { path = "../../../primitives/blockchain" } -sr-primitives = { path = "../../../primitives/sr-primitives" } -substrate-telemetry = { path = "../../telemetry" } -consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } +sp-runtime = { path = "../../../primitives/sr-primitives" } +sc-telemetry = { path = "../../telemetry" } +consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } futures = "0.3.1" futures-timer = "2.0" parking_lot = "0.9.0" diff --git a/client/consensus/slots/src/aux_schema.rs b/client/consensus/slots/src/aux_schema.rs index 21e4d1256f9eb..76f165e8d5709 100644 --- a/client/consensus/slots/src/aux_schema.rs +++ b/client/consensus/slots/src/aux_schema.rs @@ -19,7 +19,7 @@ use codec::{Encode, Decode}; use client_api::backend::AuxStore; use sp_blockchain::{Result as ClientResult, Error as ClientError}; -use sr_primitives::traits::Header; +use sp_runtime::traits::Header; const SLOT_HEADER_MAP_KEY: &[u8] = b"slot_header_map"; const SLOT_HEADER_START: &[u8] = b"slot_header_start"; @@ -153,7 +153,7 @@ pub fn check_equivocation( mod test { use primitives::{sr25519, Pair}; use primitives::hash::H256; - use sr_primitives::testing::{Header as HeaderTest, Digest as DigestTest}; + use sp_runtime::testing::{Header as HeaderTest, Digest as DigestTest}; use test_client; use super::{MAX_SLOT_CAPACITY, PRUNING_BOUND, check_equivocation}; diff --git a/client/consensus/slots/src/lib.rs b/client/consensus/slots/src/lib.rs index 56d44d13b4b9b..744942e1079e1 100644 --- a/client/consensus/slots/src/lib.rs +++ b/client/consensus/slots/src/lib.rs @@ -36,10 +36,10 @@ use futures::{prelude::*, future::{self, Either}}; use futures_timer::Delay; use inherents::{InherentData, InherentDataProviders}; use log::{debug, error, info, warn}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi}; use std::{fmt::Debug, ops::Deref, pin::Pin, sync::Arc, time::{Instant, Duration}}; -use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO}; use parking_lot::Mutex; use client_api; @@ -94,7 +94,7 @@ pub trait SimpleSlotWorker { ) -> Option; /// Return the pre digest data to include in a block authored with the given claim. - fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec>; + fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec>; /// Returns a function which produces a `BlockImportParams`. fn block_import_params(&self) -> Box { // deadline our production to approx. the end of the slot let proposing = proposer.propose( slot_info.inherent_data, - sr_primitives::generic::Digest { + sp_runtime::generic::Digest { logs, }, slot_remaining_duration, @@ -448,7 +448,7 @@ impl SlotDuration { }) }), None => { - use sr_primitives::traits::Zero; + use sp_runtime::traits::Zero; let genesis_slot_duration = cb(client.runtime_api(), &BlockId::number(Zero::zero()))?; diff --git a/client/consensus/uncles/Cargo.toml b/client/consensus/uncles/Cargo.toml index 01e81ef198a3d..b136c35ee24cf 100644 --- a/client/consensus/uncles/Cargo.toml +++ b/client/consensus/uncles/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "substrate-consensus-uncles" +name = "sc-consensus-uncles" version = "2.0.0" authors = ["Parity Technologies "] description = "Generic uncle inclusion utilities for consensus" edition = "2018" [dependencies] -client-api = { package = "substrate-client-api", path = "../../api" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +client-api = { package = "sc-client-api", path = "../../api" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +sp-runtime = { path = "../../../primitives/sr-primitives" } sp-authorship = { path = "../../../primitives/authorship" } -consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" } +consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents" } log = "0.4.8" diff --git a/client/consensus/uncles/src/lib.rs b/client/consensus/uncles/src/lib.rs index abbd6d2b65d99..f7b1a8fa844ed 100644 --- a/client/consensus/uncles/src/lib.rs +++ b/client/consensus/uncles/src/lib.rs @@ -23,7 +23,7 @@ use consensus_common::SelectChain; use inherents::{InherentDataProviders}; use log::warn; use client_api::ProvideUncles; -use sr_primitives::traits::{Block as BlockT, Header}; +use sp_runtime::traits::{Block as BlockT, Header}; use std::sync::Arc; use sp_authorship; diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index d406298e0b846..d8ad48f9b4ad8 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-client-db" +name = "sc-client-db" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -12,20 +12,20 @@ kvdb-rocksdb = { version = "0.2", optional = true } kvdb-memorydb = "0.1.2" linked-hash-map = "0.5.2" hash-db = "0.15.2" -client-api = { package = "substrate-client-api", path = "../api" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -sr-primitives = { path = "../../primitives/sr-primitives" } -client = { package = "substrate-client", path = "../" } -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } +client-api = { package = "sc-client-api", path = "../api" } +primitives = { package = "sp-core", path = "../../primitives/core" } +sp-runtime = { path = "../../primitives/sr-primitives" } +client = { package = "sc-client", path = "../" } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -executor = { package = "substrate-executor", path = "../executor" } -state_db = { package = "substrate-state-db", path = "../state-db" } -trie = { package = "substrate-trie", path = "../../primitives/trie" } -consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } +executor = { package = "sc-executor", path = "../executor" } +state_db = { package = "sc-state-db", path = "../state-db" } +trie = { package = "sp-trie", path = "../../primitives/trie" } +consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" } sp-blockchain = { path = "../../primitives/blockchain" } [dev-dependencies] -substrate-keyring = { path = "../../primitives/keyring" } +sp-keyring = { path = "../../primitives/keyring" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } env_logger = "0.7.0" quickcheck = "0.9" diff --git a/client/db/src/cache/list_cache.rs b/client/db/src/cache/list_cache.rs index a36321df16563..36219d479a7ef 100644 --- a/client/db/src/cache/list_cache.rs +++ b/client/db/src/cache/list_cache.rs @@ -44,7 +44,7 @@ use std::collections::{BTreeSet, BTreeMap}; use log::warn; use sp_blockchain::{Error as ClientError, Result as ClientResult}; -use sr_primitives::traits::{ +use sp_runtime::traits::{ Block as BlockT, NumberFor, Zero, Bounded, CheckedSub }; @@ -651,7 +651,7 @@ pub fn destroy_fork, Tx: Stor /// Blockchain related functions. mod chain { - use sr_primitives::traits::Header as HeaderT; + use sp_runtime::traits::Header as HeaderT; use super::*; /// Is the block1 connected both ends of the range. @@ -725,8 +725,8 @@ fn read_forks>( #[cfg(test)] pub mod tests { use test_client::runtime::H256; - use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper}; - use sr_primitives::traits::Header as HeaderT; + use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::traits::Header as HeaderT; use crate::cache::list_storage::tests::{DummyStorage, FaultyStorage, DummyTransaction}; use super::*; diff --git a/client/db/src/cache/list_entry.rs b/client/db/src/cache/list_entry.rs index b596863061152..e00da3b57c11e 100644 --- a/client/db/src/cache/list_entry.rs +++ b/client/db/src/cache/list_entry.rs @@ -17,7 +17,7 @@ //! List-cache storage entries. use sp_blockchain::Result as ClientResult; -use sr_primitives::traits::{Block as BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use codec::{Encode, Decode}; use crate::cache::{CacheItemT, ComplexBlockId}; diff --git a/client/db/src/cache/list_storage.rs b/client/db/src/cache/list_storage.rs index 0615ae6aee1b5..236feac88aed2 100644 --- a/client/db/src/cache/list_storage.rs +++ b/client/db/src/cache/list_storage.rs @@ -22,8 +22,8 @@ use kvdb::{KeyValueDB, DBTransaction}; use sp_blockchain::{Error as ClientError, Result as ClientResult}; use codec::{Encode, Decode}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use crate::utils::{self, db_err, meta_keys}; use crate::cache::{CacheItemT, ComplexBlockId}; diff --git a/client/db/src/cache/mod.rs b/client/db/src/cache/mod.rs index 068acb37ec3c0..0087d34d192b1 100644 --- a/client/db/src/cache/mod.rs +++ b/client/db/src/cache/mod.rs @@ -24,8 +24,8 @@ use kvdb::{KeyValueDB, DBTransaction}; use client_api::blockchain::{well_known_cache_keys::{self, Id as CacheKeyId}, Cache as BlockchainCache}; use sp_blockchain::Result as ClientResult; use codec::{Encode, Decode}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero}; use crate::utils::{self, COLUMN_META, db_err}; use self::list_cache::{ListCache, PruningStrategy}; diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index 253b48e6fa15f..d9365ce4bfba7 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -53,11 +53,11 @@ use trie::{MemoryDB, PrefixedMemoryDB, prefixed_key}; use parking_lot::{Mutex, RwLock}; use primitives::{H256, Blake2Hasher, ChangesTrieConfiguration, convert_hash, traits::CodeExecutor}; use primitives::storage::well_known_keys; -use sr_primitives::{ +use sp_runtime::{ generic::{BlockId, DigestItem}, Justification, StorageOverlay, ChildrenStorageOverlay, BuildStorage, }; -use sr_primitives::traits::{ +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, NumberFor, Zero, One, SaturatedConversion }; use executor::RuntimeInfo; @@ -1561,8 +1561,8 @@ mod tests { use crate::columns; use client_api::backend::{Backend as BTrait, BlockImportOperation as Op}; use client::blockchain::Backend as BLBTrait; - use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper}; - use sr_primitives::traits::{Hash, BlakeTwo256}; + use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::traits::{Hash, BlakeTwo256}; use state_machine::{TrieMut, TrieDBMut, ChangesTrieRootsStorage, ChangesTrieStorage}; use sp_blockchain::{lowest_common_ancestor, tree_route}; @@ -1593,7 +1593,7 @@ mod tests { changes: Vec<(Vec, Vec)>, extrinsics_root: H256, ) -> H256 { - use sr_primitives::testing::Digest; + use sp_runtime::testing::Digest; let (changes_root, changes_trie_update) = prepare_changes(changes); let digest = Digest { logs: vec![ diff --git a/client/db/src/light.rs b/client/db/src/light.rs index 72f0d96986ba1..9267a96b2f4cf 100644 --- a/client/db/src/light.rs +++ b/client/db/src/light.rs @@ -36,8 +36,8 @@ use sp_blockchain::{ use client::light::blockchain::Storage as LightBlockchainStorage; use codec::{Decode, Encode}; use primitives::Blake2Hasher; -use sr_primitives::generic::{DigestItem, BlockId}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor}; +use sp_runtime::generic::{DigestItem, BlockId}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor}; use crate::cache::{DbCacheSync, DbCache, ComplexBlockId, EntryType as CacheEntryType}; use crate::utils::{self, meta_keys, Meta, db_err, read_db, block_id_to_lookup_key, read_meta}; use crate::DatabaseSettings; @@ -560,8 +560,8 @@ fn cht_key>(cht_type: u8, block: N) -> ClientResult<[u8; 5]> { #[cfg(test)] pub(crate) mod tests { use client::cht; - use sr_primitives::generic::DigestItem; - use sr_primitives::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::generic::DigestItem; + use sp_runtime::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper}; use sp_blockchain::{lowest_common_ancestor, tree_route}; use super::*; diff --git a/client/db/src/storage_cache.rs b/client/db/src/storage_cache.rs index 38848577868aa..99266c7b61882 100644 --- a/client/db/src/storage_cache.rs +++ b/client/db/src/storage_cache.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use parking_lot::{Mutex, RwLock, RwLockUpgradableReadGuard}; use linked_hash_map::{LinkedHashMap, Entry}; use hash_db::Hasher; -use sr_primitives::traits::{Block as BlockT, Header}; +use sp_runtime::traits::{Block as BlockT, Header}; use primitives::hexdisplay::HexDisplay; use state_machine::{backend::Backend as StateBackend, TrieBackend}; use log::trace; @@ -596,7 +596,7 @@ impl, B: BlockT> StateBackend for CachingState< #[cfg(test)] mod tests { use super::*; - use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; use state_machine::backend::InMemory; use primitives::Blake2Hasher; @@ -844,7 +844,7 @@ mod qc { use quickcheck::{quickcheck, TestResult, Arbitrary}; use super::*; - use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; use state_machine::backend::InMemory; use primitives::Blake2Hasher; diff --git a/client/db/src/utils.rs b/client/db/src/utils.rs index b16a7ecdaa310..5db1ff8d6635b 100644 --- a/client/db/src/utils.rs +++ b/client/db/src/utils.rs @@ -27,8 +27,8 @@ use log::debug; use codec::Decode; use trie::DBValue; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{ +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, Zero, UniqueSaturatedFrom, UniqueSaturatedInto, }; @@ -184,7 +184,7 @@ pub fn block_id_to_lookup_key( id: BlockId ) -> Result>, sp_blockchain::Error> where Block: BlockT, - ::sr_primitives::traits::NumberFor: UniqueSaturatedFrom + UniqueSaturatedInto, + ::sp_runtime::traits::NumberFor: UniqueSaturatedFrom + UniqueSaturatedInto, { let res = match id { BlockId::Number(n) => db.get( @@ -357,7 +357,7 @@ pub fn read_meta(db: &dyn KeyValueDB, col_meta: Option, col_header: #[cfg(test)] mod tests { use super::*; - use sr_primitives::testing::{Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper}; type Block = RawBlock>; #[test] diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index 9aa201ce963cf..dff872dbc43d8 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-executor" +name = "sc-executor" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -7,18 +7,18 @@ edition = "2018" [dependencies] derive_more = "0.99.2" codec = { package = "parity-scale-codec", version = "1.0.0" } -runtime_io = { package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -trie = { package = "substrate-trie", path = "../../primitives/trie" } -serializer = { package = "substrate-serializer", path = "../../primitives/serializer" } -runtime_version = { package = "sr-version", path = "../../primitives/sr-version" } -panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" } +runtime_io = { package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } +trie = { package = "sp-trie", path = "../../primitives/trie" } +serializer = { package = "sp-serializer", path = "../../primitives/serializer" } +runtime_version = { package = "sp-version", path = "../../primitives/sr-version" } +panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" } wasmi = "0.6.2" parity-wasm = "0.41.0" lazy_static = "1.4.0" -wasm-interface = { package = "substrate-wasm-interface", path = "../../primitives/wasm-interface" } -runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" } -externalities = { package = "substrate-externalities", path = "../../primitives/externalities" } +wasm-interface = { package = "sp-wasm-interface", path = "../../primitives/wasm-interface" } +runtime-interface = { package = "sp-runtime-interface", path = "../../primitives/runtime-interface" } +externalities = { package = "sp-externalities", path = "../../primitives/externalities" } parking_lot = "0.9.0" log = "0.4.8" libsecp256k1 = "0.3.2" @@ -36,12 +36,12 @@ wasmtime-runtime = { version = "0.8", optional = true } assert_matches = "1.3.0" wabt = "0.9.2" hex-literal = "0.2.1" -runtime-test = { package = "substrate-runtime-test", path = "runtime-test" } +runtime-test = { package = "sc-runtime-test", path = "runtime-test" } test-runtime = { package = "substrate-test-runtime", path = "../../test/utils/runtime" } -runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" } -client-api = { package = "substrate-client-api", path = "../api" } -substrate-offchain = { path = "../offchain/" } -state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } +runtime-interface = { package = "sp-runtime-interface", path = "../../primitives/runtime-interface" } +client-api = { package = "sc-client-api", path = "../api" } +sc-offchain = { path = "../offchain/" } +state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } test-case = "0.3.3" [features] diff --git a/client/executor/runtime-test/Cargo.toml b/client/executor/runtime-test/Cargo.toml index 610db4545800e..597417a17fb15 100644 --- a/client/executor/runtime-test/Cargo.toml +++ b/client/executor/runtime-test/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "substrate-runtime-test" +name = "sc-runtime-test" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" [dependencies] -rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false } -sandbox = { package = "sr-sandbox", path = "../../../primitives/sr-sandbox", default-features = false } -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } -sr-primitives = { package = "sr-primitives", path = "../../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false } +runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false } +sandbox = { package = "sp-sandbox", path = "../../../primitives/sr-sandbox", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } +sp-runtime = { package = "sp-runtime", path = "../../../primitives/sr-primitives", default-features = false } [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" } diff --git a/client/executor/runtime-test/src/lib.rs b/client/executor/runtime-test/src/lib.rs index 63f89fca57508..15b515d6c4881 100644 --- a/client/executor/runtime-test/src/lib.rs +++ b/client/executor/runtime-test/src/lib.rs @@ -14,7 +14,7 @@ use runtime_io::{ crypto::{ed25519_verify, sr25519_verify}, }; #[cfg(not(feature = "std"))] -use sr_primitives::{print, traits::{BlakeTwo256, Hash}}; +use sp_runtime::{print, traits::{BlakeTwo256, Hash}}; #[cfg(not(feature = "std"))] use primitives::{ed25519, sr25519}; diff --git a/client/executor/src/deprecated_host_interface.rs b/client/executor/src/deprecated_host_interface.rs index f74a9597e57fb..e7f91443c04d3 100644 --- a/client/executor/src/deprecated_host_interface.rs +++ b/client/executor/src/deprecated_host_interface.rs @@ -79,13 +79,13 @@ impl_wasm_host_interface! { impl SubstrateExternals where context { ext_malloc(size: WordSize) -> Pointer { let r = context.allocate_memory(size)?; - debug_trace!(target: "sr-io", "malloc {} bytes at {:?}", size, r); + debug_trace!(target: "sp-io", "malloc {} bytes at {:?}", size, r); Ok(r) } ext_free(addr: Pointer) { context.deallocate_memory(addr)?; - debug_trace!(target: "sr-io", "free {:?}", addr); + debug_trace!(target: "sp-io", "free {:?}", addr); Ok(()) } diff --git a/client/executor/src/native_executor.rs b/client/executor/src/native_executor.rs index f5d02f274aa88..5a9bba7b526a0 100644 --- a/client/executor/src/native_executor.rs +++ b/client/executor/src/native_executor.rs @@ -265,7 +265,7 @@ impl CodeExecutor for NativeExecutor { /// # Example /// /// ``` -/// substrate_executor::native_executor_instance!( +/// sc_executor::native_executor_instance!( /// pub MyExecutor, /// test_runtime::api::dispatch, /// test_runtime::native_version, @@ -287,7 +287,7 @@ impl CodeExecutor for NativeExecutor { /// } /// } /// -/// substrate_executor::native_executor_instance!( +/// sc_executor::native_executor_instance!( /// pub MyExecutor, /// test_runtime::api::dispatch, /// test_runtime::native_version, diff --git a/client/executor/src/wasmi_execution.rs b/client/executor/src/wasmi_execution.rs index 7f480695798fa..2593de68c255f 100644 --- a/client/executor/src/wasmi_execution.rs +++ b/client/executor/src/wasmi_execution.rs @@ -206,7 +206,7 @@ impl<'a> Sandbox for FunctionExecutor<'a> { return_val_len: WordSize, state: u32, ) -> WResult { - trace!(target: "sr-sandbox", "invoke, instance_idx={}", instance_id); + trace!(target: "sp-sandbox", "invoke, instance_idx={}", instance_id); // Deserialize arguments and convert them into wasmi types. let args = Vec::::decode(&mut &args[..]) diff --git a/client/executor/src/wasmtime/function_executor.rs b/client/executor/src/wasmtime/function_executor.rs index 5dc8f42b280c4..34a30076893f6 100644 --- a/client/executor/src/wasmtime/function_executor.rs +++ b/client/executor/src/wasmtime/function_executor.rs @@ -283,7 +283,7 @@ impl<'a> Sandbox for FunctionExecutor<'a> { return_val_len: u32, state: u32, ) -> WResult { - trace!(target: "sr-sandbox", "invoke, instance_idx={}", instance_id); + trace!(target: "sp-sandbox", "invoke, instance_idx={}", instance_id); // Deserialize arguments and convert them into wasmi types. let args = Vec::::decode(&mut &args[..]) diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 71460966ad087..8b053fcda6e54 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-finality-grandpa" +name = "sc-finality-grandpa" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -14,29 +14,29 @@ tokio-executor = "0.1.8" tokio-timer = "0.2.11" rand = "0.7.2" codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -sr-primitives = { path = "../../primitives/sr-primitives" } -consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -substrate-telemetry = { path = "../telemetry" } -keystore = { package = "substrate-keystore", path = "../keystore" } +sp-runtime = { path = "../../primitives/sr-primitives" } +consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" } +primitives = { package = "sp-core", path = "../../primitives/core" } +sc-telemetry = { path = "../telemetry" } +keystore = { package = "sc-keystore", path = "../keystore" } serde_json = "1.0.41" -client-api = { package = "substrate-client-api", path = "../api" } -client = { package = "substrate-client", path = "../" } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents" } +client-api = { package = "sc-client-api", path = "../api" } +client = { package = "sc-client", path = "../" } +inherents = { package = "sp-inherents", path = "../../primitives/inherents" } sp-blockchain = { path = "../../primitives/blockchain" } -network = { package = "substrate-network", path = "../network" } +network = { package = "sc-network", path = "../network" } sp-finality-tracker = { path = "../../primitives/finality-tracker" } -fg_primitives = { package = "substrate-finality-grandpa-primitives", path = "../../primitives/finality-grandpa" } +fg_primitives = { package = "sp-finality-granpda", path = "../../primitives/finality-grandpa" } grandpa = { package = "finality-grandpa", version = "0.10.1", features = ["derive-codec"] } [dev-dependencies] grandpa = { package = "finality-grandpa", version = "0.10.1", features = ["derive-codec", "test-helpers"] } -network = { package = "substrate-network", path = "../network", features = ["test-helpers"] } -keyring = { package = "substrate-keyring", path = "../../primitives/keyring" } +network = { package = "sc-network", path = "../network", features = ["test-helpers"] } +keyring = { package = "sp-keyring", path = "../../primitives/keyring" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client"} -babe_primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" } -state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } +babe_primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe" } +state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } env_logger = "0.7.0" tokio = "0.1.22" tempfile = "3.1.0" -sr-api = { path = "../../primitives/sr-api" } +sp-api = { path = "../../primitives/sr-api" } diff --git a/client/finality-grandpa/src/authorities.rs b/client/finality-grandpa/src/authorities.rs index 263f2dc076e39..4bc4e3c7b8d49 100644 --- a/client/finality-grandpa/src/authorities.rs +++ b/client/finality-grandpa/src/authorities.rs @@ -21,7 +21,7 @@ use parking_lot::RwLock; use grandpa::voter_set::VoterSet; use codec::{Encode, Decode}; use log::{debug, info}; -use substrate_telemetry::{telemetry, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_INFO}; use fg_primitives::{AuthorityId, AuthorityList}; use std::cmp::Ord; diff --git a/client/finality-grandpa/src/aux_schema.rs b/client/finality-grandpa/src/aux_schema.rs index beb2103ec4272..3e171a9441fd7 100644 --- a/client/finality-grandpa/src/aux_schema.rs +++ b/client/finality-grandpa/src/aux_schema.rs @@ -23,7 +23,7 @@ use client_api::backend::AuxStore; use sp_blockchain::{Result as ClientResult, Error as ClientError}; use fork_tree::ForkTree; use grandpa::round::State as RoundState; -use sr_primitives::traits::{Block as BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use log::{info, warn}; use fg_primitives::{AuthorityList, SetId, RoundNumber}; diff --git a/client/finality-grandpa/src/communication/gossip.rs b/client/finality-grandpa/src/communication/gossip.rs index bd1b6197eaa88..9795121882bed 100644 --- a/client/finality-grandpa/src/communication/gossip.rs +++ b/client/finality-grandpa/src/communication/gossip.rs @@ -82,13 +82,13 @@ //! //! We only send polite messages to peers, -use sr_primitives::traits::{NumberFor, Block as BlockT, Zero}; +use sp_runtime::traits::{NumberFor, Block as BlockT, Zero}; use network::consensus_gossip::{self as network_gossip, MessageIntent, ValidatorContext}; use network::{config::Roles, PeerId}; use codec::{Encode, Decode}; use fg_primitives::AuthorityId; -use substrate_telemetry::{telemetry, CONSENSUS_DEBUG}; +use sc_telemetry::{telemetry, CONSENSUS_DEBUG}; use log::{trace, debug, warn}; use futures::prelude::*; use futures::sync::mpsc; diff --git a/client/finality-grandpa/src/communication/mod.rs b/client/finality-grandpa/src/communication/mod.rs index 247f9efd2df18..8354d41bb004a 100644 --- a/client/finality-grandpa/src/communication/mod.rs +++ b/client/finality-grandpa/src/communication/mod.rs @@ -39,8 +39,8 @@ use network::{consensus_gossip as network_gossip, NetworkService}; use network_gossip::ConsensusMessage; use codec::{Encode, Decode}; use primitives::Pair; -use sr_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor}; -use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_INFO}; +use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor}; +use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_INFO}; use tokio_executor::Executor; use crate::{ diff --git a/client/finality-grandpa/src/communication/periodic.rs b/client/finality-grandpa/src/communication/periodic.rs index 9dd662ce43461..7db5fb692e191 100644 --- a/client/finality-grandpa/src/communication/periodic.rs +++ b/client/finality-grandpa/src/communication/periodic.rs @@ -25,7 +25,7 @@ use log::{debug, warn}; use tokio_timer::Delay; use network::PeerId; -use sr_primitives::traits::{NumberFor, Block as BlockT}; +use sp_runtime::traits::{NumberFor, Block as BlockT}; use super::{gossip::{NeighborPacket, GossipMessage}, Network}; // how often to rebroadcast, if no other diff --git a/client/finality-grandpa/src/communication/tests.rs b/client/finality-grandpa/src/communication/tests.rs index e8b399aef39b6..2d08ecbde7928 100644 --- a/client/finality-grandpa/src/communication/tests.rs +++ b/client/finality-grandpa/src/communication/tests.rs @@ -25,7 +25,7 @@ use tokio::runtime::current_thread; use std::sync::Arc; use keyring::Ed25519Keyring; use codec::Encode; -use sr_primitives::traits::NumberFor; +use sp_runtime::traits::NumberFor; use crate::environment::SharedVoterSetState; use fg_primitives::AuthorityList; diff --git a/client/finality-grandpa/src/environment.rs b/client/finality-grandpa/src/environment.rs index 0f70ac531d774..52e1bea3e72ff 100644 --- a/client/finality-grandpa/src/environment.rs +++ b/client/finality-grandpa/src/environment.rs @@ -41,11 +41,11 @@ use grandpa::{ voter, voter_set::VoterSet, }; use primitives::{Blake2Hasher, H256, Pair}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{ +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, NumberFor, One, Zero, }; -use substrate_telemetry::{telemetry, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_INFO}; use crate::{ CommandOrError, Commit, Config, Error, Network, Precommit, Prevote, diff --git a/client/finality-grandpa/src/finality_proof.rs b/client/finality-grandpa/src/finality_proof.rs index 209eb974b0073..0420320e0b8f9 100644 --- a/client/finality-grandpa/src/finality_proof.rs +++ b/client/finality-grandpa/src/finality_proof.rs @@ -46,12 +46,12 @@ use client_api::{ use client::Client; use codec::{Encode, Decode}; use grandpa::BlockNumberOps; -use sr_primitives::{ +use sp_runtime::{ Justification, generic::BlockId, traits::{NumberFor, Block as BlockT, Header as HeaderT, One}, }; use primitives::{H256, Blake2Hasher, storage::StorageKey}; -use substrate_telemetry::{telemetry, CONSENSUS_INFO}; +use sc_telemetry::{telemetry, CONSENSUS_INFO}; use fg_primitives::{AuthorityId, AuthorityList, VersionedAuthorityList, GRANDPA_AUTHORITIES_KEY}; use crate::justification::GrandpaJustification; diff --git a/client/finality-grandpa/src/import.rs b/client/finality-grandpa/src/import.rs index 2c18600ae926f..e7cfa46d4a073 100644 --- a/client/finality-grandpa/src/import.rs +++ b/client/finality-grandpa/src/import.rs @@ -30,9 +30,9 @@ use consensus_common::{ SelectChain, }; use fg_primitives::{GRANDPA_ENGINE_ID, ScheduledChange, ConsensusLog}; -use sr_primitives::Justification; -use sr_primitives::generic::{BlockId, OpaqueDigestItemId}; -use sr_primitives::traits::{ +use sp_runtime::Justification; +use sp_runtime::generic::{BlockId, OpaqueDigestItemId}; +use sp_runtime::traits::{ Block as BlockT, DigestFor, Header as HeaderT, NumberFor, Zero, }; use primitives::{H256, Blake2Hasher}; diff --git a/client/finality-grandpa/src/justification.rs b/client/finality-grandpa/src/justification.rs index 807a785ca81b3..2851fa21322b6 100644 --- a/client/finality-grandpa/src/justification.rs +++ b/client/finality-grandpa/src/justification.rs @@ -22,8 +22,8 @@ use sp_blockchain::Error as ClientError; use codec::{Encode, Decode}; use grandpa::voter_set::VoterSet; use grandpa::{Error as GrandpaError}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{NumberFor, Block as BlockT, Header as HeaderT}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{NumberFor, Block as BlockT, Header as HeaderT}; use primitives::{H256, Blake2Hasher}; use fg_primitives::AuthorityId; diff --git a/client/finality-grandpa/src/lib.rs b/client/finality-grandpa/src/lib.rs index 2b83488d5990b..29311b1e91048 100644 --- a/client/finality-grandpa/src/lib.rs +++ b/client/finality-grandpa/src/lib.rs @@ -59,13 +59,13 @@ use client_api::{BlockchainEvents, CallExecutor, backend::Backend, ExecutionStra use sp_blockchain::{HeaderBackend, Error as ClientError}; use client::Client; use codec::{Decode, Encode}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{NumberFor, Block as BlockT, DigestFor, Zero}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{NumberFor, Block as BlockT, DigestFor, Zero}; use keystore::KeyStorePtr; use inherents::InherentDataProviders; use consensus_common::SelectChain; use primitives::{H256, Blake2Hasher, Pair}; -use substrate_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG, CONSENSUS_WARN}; +use sc_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG, CONSENSUS_WARN}; use serde_json; use sp_finality_tracker; diff --git a/client/finality-grandpa/src/light_import.rs b/client/finality-grandpa/src/light_import.rs index 579043751ba80..344c6110cc329 100644 --- a/client/finality-grandpa/src/light_import.rs +++ b/client/finality-grandpa/src/light_import.rs @@ -28,10 +28,10 @@ use consensus_common::{ BlockCheckParams, Error as ConsensusError, }; use network::config::{BoxFinalityProofRequestBuilder, FinalityProofRequestBuilder}; -use sr_primitives::Justification; -use sr_primitives::traits::{NumberFor, Block as BlockT, Header as HeaderT, DigestFor}; +use sp_runtime::Justification; +use sp_runtime::traits::{NumberFor, Block as BlockT, Header as HeaderT, DigestFor}; use fg_primitives::{self, AuthorityList}; -use sr_primitives::generic::BlockId; +use sp_runtime::generic::BlockId; use primitives::{H256, Blake2Hasher}; use crate::GenesisAuthoritySetProvider; diff --git a/client/finality-grandpa/src/observer.rs b/client/finality-grandpa/src/observer.rs index 83c2fac275ba6..2061764ac49e0 100644 --- a/client/finality-grandpa/src/observer.rs +++ b/client/finality-grandpa/src/observer.rs @@ -27,7 +27,7 @@ use log::{debug, info, warn}; use consensus_common::SelectChain; use client_api::{CallExecutor, backend::Backend}; use client::Client; -use sr_primitives::traits::{NumberFor, Block as BlockT}; +use sp_runtime::traits::{NumberFor, Block as BlockT}; use primitives::{H256, Blake2Hasher}; use crate::{ diff --git a/client/finality-grandpa/src/tests.rs b/client/finality-grandpa/src/tests.rs index 2ea15d90228de..256c211e8bcb5 100644 --- a/client/finality-grandpa/src/tests.rs +++ b/client/finality-grandpa/src/tests.rs @@ -27,15 +27,15 @@ use tokio::runtime::current_thread; use keyring::Ed25519Keyring; use client::LongestChain; use sp_blockchain::Result; -use sr_api::{Core, RuntimeVersion, ApiExt, StorageProof}; +use sp_api::{Core, RuntimeVersion, ApiExt, StorageProof}; use test_client::{self, runtime::BlockNumber}; use consensus_common::{BlockOrigin, ForkChoiceStrategy, ImportedAux, BlockImportParams, ImportResult}; use consensus_common::import_queue::{BoxBlockImport, BoxJustificationImport, BoxFinalityProofImport}; use std::collections::{HashMap, HashSet}; use std::result; use codec::Decode; -use sr_primitives::traits::{ApiRef, ProvideRuntimeApi, Header as HeaderT}; -use sr_primitives::generic::{BlockId, DigestItem}; +use sp_runtime::traits::{ApiRef, ProvideRuntimeApi, Header as HeaderT}; +use sp_runtime::generic::{BlockId, DigestItem}; use primitives::{NativeOrEncoded, ExecutionContext, crypto::Public}; use fg_primitives::{GRANDPA_ENGINE_ID, AuthorityList, GrandpaApi}; use state_machine::{backend::InMemory, prove_read, read_proof_check}; diff --git a/client/finality-grandpa/src/until_imported.rs b/client/finality-grandpa/src/until_imported.rs index fca67ab195e54..7e209e13b8ea2 100644 --- a/client/finality-grandpa/src/until_imported.rs +++ b/client/finality-grandpa/src/until_imported.rs @@ -35,7 +35,7 @@ use futures::stream::Fuse; use futures03::{StreamExt as _, TryStreamExt as _}; use grandpa::voter; use parking_lot::Mutex; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; use tokio_timer::Interval; use std::collections::{HashMap, VecDeque}; diff --git a/client/finality-grandpa/src/voting_rule.rs b/client/finality-grandpa/src/voting_rule.rs index 7907515074466..cfa28d03fedef 100644 --- a/client/finality-grandpa/src/voting_rule.rs +++ b/client/finality-grandpa/src/voting_rule.rs @@ -23,8 +23,8 @@ use std::sync::Arc; use client_api::blockchain::HeaderBackend; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{Block as BlockT, Header, NumberFor, One, Zero}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, Header, NumberFor, One, Zero}; /// A trait for custom voting rules in GRANDPA. pub trait VotingRule: Send + Sync where diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 2d006b13140af..0dd33a62da5e4 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "substrate-keystore" +name = "sc-keystore" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] derive_more = "0.99.2" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" } +primitives = { package = "sp-core", path = "../../primitives/core" } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto" } hex = "0.4.0" rand = "0.7.2" serde_json = "1.0.41" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 1362747f7152f..1872645d55cf3 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -1,6 +1,6 @@ [package] description = "Substrate network protocol" -name = "substrate-network" +name = "sc-network" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] @@ -24,16 +24,16 @@ rustc-hex = "2.0.1" rand = "0.7.2" libp2p = { version = "0.13.0", default-features = false, features = ["libp2p-websocket"] } fork-tree = { path = "../../utils/fork-tree" } -consensus = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } -client = { package = "substrate-client", path = "../" } -client-api = { package = "substrate-client-api", path = "../api" } +consensus = { package = "sp-consensus", path = "../../primitives/consensus/common" } +client = { package = "sc-client", path = "../" } +client-api = { package = "sc-client-api", path = "../api" } sp-blockchain = { path = "../../primitives/blockchain" } -sr-primitives = { path = "../../primitives/sr-primitives" } -sr-arithmetic = { path = "../../primitives/sr-arithmetic" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -block-builder = { package = "substrate-block-builder", path = "../block-builder" } +sp-runtime = { path = "../../primitives/sr-primitives" } +sp-arithmetic = { path = "../../primitives/sr-arithmetic" } +primitives = { package = "sp-core", path = "../../primitives/core" } +block-builder = { package = "sc-block-builder", path = "../block-builder" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -peerset = { package = "substrate-peerset", path = "../peerset" } +peerset = { package = "sc-peerset", path = "../peerset" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } @@ -42,17 +42,17 @@ smallvec = "0.6.10" tokio-io = "0.1.12" tokio = { version = "0.1.22", optional = true } unsigned-varint = { version = "0.2.2", features = ["codec"] } -keyring = { package = "substrate-keyring", path = "../../primitives/keyring", optional = true } +keyring = { package = "sp-keyring", path = "../../primitives/keyring", optional = true } test_client = { package = "substrate-test-client", path = "../../test/utils/client", optional = true } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client", optional = true } erased-serde = "0.3.9" void = "1.0.2" zeroize = "1.0.0" -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" } +babe-primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe" } [dev-dependencies] env_logger = "0.7.0" -keyring = { package = "substrate-keyring", path = "../../primitives/keyring" } +keyring = { package = "sp-keyring", path = "../../primitives/keyring" } quickcheck = "0.9.0" rand = "0.7.2" test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } diff --git a/client/network/src/behaviour.rs b/client/network/src/behaviour.rs index a0299bc340ce2..fb1f39726a3f2 100644 --- a/client/network/src/behaviour.rs +++ b/client/network/src/behaviour.rs @@ -27,7 +27,7 @@ use libp2p::kad::record; use libp2p::swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess}; use libp2p::core::{nodes::Substream, muxing::StreamMuxerBox}; use log::{debug, warn}; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; use std::iter; use void; diff --git a/client/network/src/chain.rs b/client/network/src/chain.rs index ac883987cd326..671bdb27ca8c4 100644 --- a/client/network/src/chain.rs +++ b/client/network/src/chain.rs @@ -20,9 +20,9 @@ use client::Client as SubstrateClient; use sp_blockchain::Error; use client_api::{ChangesProof, StorageProof, ClientInfo, CallExecutor}; use consensus::{BlockImport, BlockStatus, Error as ConsensusError}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT}; -use sr_primitives::generic::{BlockId}; -use sr_primitives::Justification; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; +use sp_runtime::generic::{BlockId}; +use sp_runtime::Justification; use primitives::{H256, Blake2Hasher, storage::StorageKey}; /// Local client abstraction for the network. diff --git a/client/network/src/config.rs b/client/network/src/config.rs index 85e3e36cf6040..a59ab97887296 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -27,7 +27,7 @@ use crate::on_demand_layer::OnDemand; use crate::service::{ExHashT, TransactionPool}; use bitflags::bitflags; use consensus::{block_validation::BlockAnnounceValidator, import_queue::ImportQueue}; -use sr_primitives::traits::{Block as BlockT}; +use sp_runtime::traits::{Block as BlockT}; use libp2p::identity::{Keypair, ed25519}; use libp2p::wasm_ext; use libp2p::{PeerId, Multiaddr, multiaddr}; @@ -171,7 +171,7 @@ impl ProtocolId { /// # Example /// /// ``` -/// # use substrate_network::{Multiaddr, PeerId, config::parse_str_addr}; +/// # use sc_network::{Multiaddr, PeerId, config::parse_str_addr}; /// let (peer_id, addr) = parse_str_addr( /// "/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV" /// ).unwrap(); diff --git a/client/network/src/lib.rs b/client/network/src/lib.rs index 96efd49958763..9b25992dd930d 100644 --- a/client/network/src/lib.rs +++ b/client/network/src/lib.rs @@ -118,7 +118,7 @@ //! if necessary and open a unique substream for Substrate-based communications. If the PSM decides //! that we should disconnect a node, then that substream is closed. //! -//! For more information about the PSM, see the *substrate-peerset* crate. +//! For more information about the PSM, see the *sc-peerset* crate. //! //! Note that at the moment there is no mechanism in place to solve the issues that arise where the //! two sides of a connection open the unique substream simultaneously. In order to not run into @@ -151,7 +151,7 @@ //! //! # Usage //! -//! Using the `substrate-network` crate is done through the [`NetworkWorker`] struct. Create this +//! Using the `sc-network` crate is done through the [`NetworkWorker`] struct. Create this //! struct by passing a [`config::Params`], then poll it as if it was a `Future`. You can extract an //! `Arc` from the `NetworkWorker`, which can be shared amongst multiple places //! in order to give orders to the networking. @@ -202,7 +202,7 @@ pub use on_demand_layer::{OnDemand, RemoteResponse}; // Used by the `construct_simple_protocol!` macro. #[doc(hidden)] -pub use sr_primitives::traits::Block as BlockT; +pub use sp_runtime::traits::Block as BlockT; use libp2p::core::ConnectedPoint; use serde::{Deserialize, Serialize}; diff --git a/client/network/src/on_demand_layer.rs b/client/network/src/on_demand_layer.rs index 82c5ed6940401..91c8464b78f5f 100644 --- a/client/network/src/on_demand_layer.rs +++ b/client/network/src/on_demand_layer.rs @@ -26,7 +26,7 @@ use sp_blockchain::Error as ClientError; use client_api::{Fetcher, FetchChecker, RemoteHeaderRequest, RemoteCallRequest, RemoteReadRequest, RemoteChangesRequest, RemoteReadChildRequest, RemoteBodyRequest}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; /// Implements the `Fetcher` trait of the client. Makes it possible for the light client to perform /// network requests for some state. diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index 35e3d2453fcb9..6b9c0755c0230 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -31,11 +31,11 @@ use consensus::{ import_queue::{BlockImportResult, BlockImportError, IncomingBlock, Origin} }; use codec::{Decode, Encode}; -use sr_primitives::{generic::BlockId, ConsensusEngineId, Justification}; -use sr_primitives::traits::{ +use sp_runtime::{generic::BlockId, ConsensusEngineId, Justification}; +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, NumberFor, One, Zero, CheckedSub }; -use sr_arithmetic::traits::SaturatedConversion; +use sp_arithmetic::traits::SaturatedConversion; use message::{BlockAnnounce, BlockAttributes, Direction, FromBlock, Message, RequestId}; use message::generic::{Message as GenericMessage, ConsensusMessage}; use consensus_gossip::{ConsensusGossip, MessageRecipient as GossipMessageRecipient}; diff --git a/client/network/src/protocol/consensus_gossip.rs b/client/network/src/protocol/consensus_gossip.rs index 8cde3c66feb81..3062047952c0d 100644 --- a/client/network/src/protocol/consensus_gossip.rs +++ b/client/network/src/protocol/consensus_gossip.rs @@ -51,8 +51,8 @@ use log::{trace, debug}; use futures03::channel::mpsc; use lru::LruCache; use libp2p::PeerId; -use sr_primitives::traits::{Block as BlockT, Hash, HashFor}; -use sr_primitives::ConsensusEngineId; +use sp_runtime::traits::{Block as BlockT, Hash, HashFor}; +use sp_runtime::ConsensusEngineId; pub use crate::message::generic::{Message, ConsensusMessage}; use crate::protocol::Context; use crate::config::Roles; @@ -632,7 +632,7 @@ impl Validator for DiscardAll { #[cfg(test)] mod tests { use std::sync::Arc; - use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper}; use futures03::executor::block_on_stream; use super::*; diff --git a/client/network/src/protocol/light_dispatch.rs b/client/network/src/protocol/light_dispatch.rs index afc7ac563b7d5..7d37b49b6c671 100644 --- a/client/network/src/protocol/light_dispatch.rs +++ b/client/network/src/protocol/light_dispatch.rs @@ -32,7 +32,7 @@ use client_api::{FetchChecker, RemoteHeaderRequest, use crate::message::{self, BlockAttributes, Direction, FromBlock, RequestId}; use libp2p::PeerId; use crate::config::Roles; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; /// Remote request timeout. const REQUEST_TIMEOUT: Duration = Duration::from_secs(15); @@ -676,7 +676,7 @@ pub mod tests { use std::sync::Arc; use std::time::Instant; use futures::{Future, sync::oneshot}; - use sr_primitives::traits::{Block as BlockT, NumberFor, Header as HeaderT}; + use sp_runtime::traits::{Block as BlockT, NumberFor, Header as HeaderT}; use sp_blockchain::{Error as ClientError, Result as ClientResult}; use client_api::{FetchChecker, RemoteHeaderRequest, ChangesProof, RemoteCallRequest, RemoteReadRequest, diff --git a/client/network/src/protocol/message.rs b/client/network/src/protocol/message.rs index 847c03f680d7c..a05a254f16817 100644 --- a/client/network/src/protocol/message.rs +++ b/client/network/src/protocol/message.rs @@ -17,7 +17,7 @@ //! Network packet message types. These get serialized and put into the lower level protocol payload. use bitflags::bitflags; -use sr_primitives::{ConsensusEngineId, traits::{Block as BlockT, Header as HeaderT}}; +use sp_runtime::{ConsensusEngineId, traits::{Block as BlockT, Header as HeaderT}}; use codec::{Encode, Decode, Input, Output, Error}; pub use self::generic::{ BlockAnnounce, RemoteCallRequest, RemoteReadRequest, @@ -138,7 +138,7 @@ pub struct RemoteReadResponse { /// Generic types. pub mod generic { use codec::{Encode, Decode, Input, Output}; - use sr_primitives::Justification; + use sp_runtime::Justification; use crate::config::Roles; use super::{ RemoteReadResponse, Transactions, Direction, diff --git a/client/network/src/protocol/specialization.rs b/client/network/src/protocol/specialization.rs index 1a15c47c87d3a..7ccd38740a921 100644 --- a/client/network/src/protocol/specialization.rs +++ b/client/network/src/protocol/specialization.rs @@ -20,7 +20,7 @@ pub use crate::protocol::event::{DhtEvent, Event}; use crate::protocol::Context; use libp2p::PeerId; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; /// A specialization of the substrate network protocol. Handles events and sends messages. pub trait NetworkSpecialization: Send + Sync + 'static { diff --git a/client/network/src/protocol/sync.rs b/client/network/src/protocol/sync.rs index affa8cae1eba7..01f36bd4da7cf 100644 --- a/client/network/src/protocol/sync.rs +++ b/client/network/src/protocol/sync.rs @@ -43,7 +43,7 @@ use either::Either; use extra_requests::ExtraRequests; use libp2p::PeerId; use log::{debug, trace, warn, info, error}; -use sr_primitives::{ +use sp_runtime::{ Justification, generic::BlockId, traits::{Block as BlockT, Header, NumberFor, Zero, One, CheckedSub, SaturatedConversion} diff --git a/client/network/src/protocol/sync/blocks.rs b/client/network/src/protocol/sync/blocks.rs index 70e9889e1e83f..f89772a8e7b25 100644 --- a/client/network/src/protocol/sync/blocks.rs +++ b/client/network/src/protocol/sync/blocks.rs @@ -21,7 +21,7 @@ use std::collections::{HashMap, BTreeMap}; use std::collections::hash_map::Entry; use log::trace; use libp2p::PeerId; -use sr_primitives::traits::{Block as BlockT, NumberFor, One}; +use sp_runtime::traits::{Block as BlockT, NumberFor, One}; use crate::message; /// Block data with origin. @@ -215,7 +215,7 @@ impl BlockCollection { mod test { use super::{BlockCollection, BlockData, BlockRangeState}; use crate::{message, PeerId}; - use sr_primitives::testing::{Block as RawBlock, ExtrinsicWrapper}; + use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper}; use primitives::H256; type Block = RawBlock>; diff --git a/client/network/src/protocol/sync/extra_requests.rs b/client/network/src/protocol/sync/extra_requests.rs index a96f855776cf6..21a29975c02ad 100644 --- a/client/network/src/protocol/sync/extra_requests.rs +++ b/client/network/src/protocol/sync/extra_requests.rs @@ -19,7 +19,7 @@ use crate::protocol::sync::{PeerSync, PeerSyncState}; use fork_tree::ForkTree; use libp2p::PeerId; use log::{debug, warn}; -use sr_primitives::traits::{Block as BlockT, NumberFor, Zero}; +use sp_runtime::traits::{Block as BlockT, NumberFor, Zero}; use std::collections::{HashMap, HashSet, VecDeque}; use std::time::{Duration, Instant}; diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 437e978f4bd47..4a60c3def79a1 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Main entry point of the substrate-network crate. +//! Main entry point of the sc-network crate. //! //! There are two main structs in this module: [`NetworkWorker`] and [`NetworkService`]. //! The [`NetworkWorker`] *is* the network and implements the `Future` trait. It must be polled in @@ -38,7 +38,7 @@ use libp2p::core::{transport::boxed::Boxed, muxing::StreamMuxerBox}; use libp2p::swarm::NetworkBehaviour; use parking_lot::Mutex; use peerset::PeersetHandle; -use sr_primitives::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; +use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId}; use crate::{behaviour::{Behaviour, BehaviourOut}, config::{parse_str_addr, parse_addr}}; use crate::{NetworkState, NetworkStateNotConnectedPeer, NetworkStatePeer}; @@ -607,7 +607,7 @@ pub trait NetworkStateInfo { impl NetworkStateInfo for NetworkService where - B: sr_primitives::traits::Block, + B: sp_runtime::traits::Block, S: NetworkSpecialization, H: ExHashT, { diff --git a/client/network/src/test/block_import.rs b/client/network/src/test/block_import.rs index 16114667ed4a8..5cb7b6b606e0f 100644 --- a/client/network/src/test/block_import.rs +++ b/client/network/src/test/block_import.rs @@ -22,7 +22,7 @@ use consensus::import_queue::{ }; use test_client::{self, prelude::*}; use test_client::runtime::{Block, Hash}; -use sr_primitives::generic::BlockId; +use sp_runtime::generic::BlockId; use super::*; fn prepare_good_block() -> (TestClient, Hash, u64, PeerId, IncomingBlock) { diff --git a/client/network/src/test/mod.rs b/client/network/src/test/mod.rs index 31b45d4efe069..d0cac918e7a65 100644 --- a/client/network/src/test/mod.rs +++ b/client/network/src/test/mod.rs @@ -55,9 +55,9 @@ use libp2p::PeerId; use parking_lot::Mutex; use primitives::H256; use crate::protocol::{Context, ProtocolConfig}; -use sr_primitives::generic::{BlockId, OpaqueDigestItemId}; -use sr_primitives::traits::{Block as BlockT, Header, NumberFor}; -use sr_primitives::Justification; +use sp_runtime::generic::{BlockId, OpaqueDigestItemId}; +use sp_runtime::traits::{Block as BlockT, Header, NumberFor}; +use sp_runtime::Justification; use crate::service::TransactionPool; use crate::specialization::NetworkSpecialization; use test_client::{self, AccountKeyring}; diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index d7e0ba1e98ba4..1b30c2fcfff56 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -1,6 +1,6 @@ [package] description = "Substrate offchain workers" -name = "substrate-offchain" +name = "sc-offchain" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] @@ -8,8 +8,8 @@ edition = "2018" [dependencies] bytes = "0.4.12" -client-api = { package = "substrate-client-api", path = "../api" } -sr-api = { path = "../../primitives/sr-api" } +client-api = { package = "sc-client-api", path = "../api" } +sp-api = { path = "../../primitives/sr-api" } fnv = "1.0.6" futures01 = { package = "futures", version = "0.1" } futures = "0.3.1" @@ -17,21 +17,21 @@ futures-timer = "2.0" log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" -offchain-primitives = { package = "substrate-offchain-primitives", path = "../../primitives/offchain" } +offchain-primitives = { package = "sp-offchain", path = "../../primitives/offchain" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.9.0" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } rand = "0.7.2" -sr-primitives = { path = "../../primitives/sr-primitives" } -network = { package = "substrate-network", path = "../network" } -keystore = { package = "substrate-keystore", path = "../keystore" } +sp-runtime = { path = "../../primitives/sr-primitives" } +network = { package = "sc-network", path = "../network" } +keystore = { package = "sc-keystore", path = "../keystore" } [target.'cfg(not(target_os = "unknown"))'.dependencies] hyper = "0.12.35" hyper-rustls = "0.17.1" [dev-dependencies] -client-db = { package = "substrate-client-db", path = "../db/", default-features = true } +client-db = { package = "sc-client-db", path = "../db/", default-features = true } env_logger = "0.7.0" test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } tokio = "0.1.22" diff --git a/client/offchain/src/lib.rs b/client/offchain/src/lib.rs index bf7965d308412..174aee89d9b52 100644 --- a/client/offchain/src/lib.rs +++ b/client/offchain/src/lib.rs @@ -37,12 +37,12 @@ use std::{fmt, marker::PhantomData, sync::Arc}; use parking_lot::Mutex; use threadpool::ThreadPool; -use sr_api::ApiExt; +use sp_api::ApiExt; use futures::future::Future; use log::{debug, warn}; use network::NetworkStateInfo; use primitives::{offchain::{self, OffchainStorage}, ExecutionContext}; -use sr_primitives::{generic::BlockId, traits::{self, ProvideRuntimeApi}}; +use sp_runtime::{generic::BlockId, traits::{self, ProvideRuntimeApi}}; mod api; @@ -169,7 +169,7 @@ mod tests { fn submit_at( &self, at: &BlockId, - extrinsic: ::Extrinsic, + extrinsic: ::Extrinsic, ) -> Result<(), ()> { futures::executor::block_on(self.0.submit_one(&at, extrinsic)) .map(|_| ()) diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 16a71b5f6d6b5..31de04c497437 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -2,7 +2,7 @@ description = "Connectivity manager based on reputation" homepage = "http://parity.io" license = "GPL-3.0" -name = "substrate-peerset" +name = "sc-peerset" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/peerset/tests/fuzz.rs b/client/peerset/tests/fuzz.rs index be29916c34f20..604bbcc83126e 100644 --- a/client/peerset/tests/fuzz.rs +++ b/client/peerset/tests/fuzz.rs @@ -19,7 +19,7 @@ use libp2p::PeerId; use rand::distributions::{Distribution, Uniform, WeightedIndex}; use rand::seq::IteratorRandom; use std::{collections::HashMap, collections::HashSet, iter, pin::Pin, task::Poll}; -use substrate_peerset::{IncomingIndex, Message, PeersetConfig, Peerset}; +use sc_peerset::{IncomingIndex, Message, PeersetConfig, Peerset}; #[test] fn run() { diff --git a/client/rpc-servers/Cargo.toml b/client/rpc-servers/Cargo.toml index c3b9802f567cf..5fd4d0d8eb844 100644 --- a/client/rpc-servers/Cargo.toml +++ b/client/rpc-servers/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-rpc-servers" +name = "sc-rpc-server" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -10,7 +10,7 @@ pubsub = { package = "jsonrpc-pubsub", version = "14.0.3" } log = "0.4.8" serde = "1.0.101" serde_json = "1.0.41" -sr-primitives = { path = "../../primitives/sr-primitives" } +sp-runtime = { path = "../../primitives/sr-primitives" } [target.'cfg(not(target_os = "unknown"))'.dependencies] http = { package = "jsonrpc-http-server", version = "14.0.3" } diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index afc79ed026595..5bb947eb0c15d 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -1,28 +1,28 @@ [package] -name = "substrate-rpc" +name = "sc-rpc" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] api = { package = "sc-rpc-api", path = "./api" } -client-api = { package = "substrate-client-api", path = "../api" } -client = { package = "substrate-client", path = "../" } -sr-api = { path = "../../primitives/sr-api" } +client-api = { package = "sc-client-api", path = "../api" } +client = { package = "sc-client", path = "../" } +sp-api = { path = "../../primitives/sr-api" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "14.0.3" log = "0.4.8" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } rpc = { package = "jsonrpc-core", version = "14.0.3" } -runtime_version = { package = "sr-version", path = "../../primitives/sr-version" } +runtime_version = { package = "sp-version", path = "../../primitives/sr-version" } serde_json = "1.0.41" -session = { package = "substrate-session", path = "../../primitives/session" } -sr-primitives = { path = "../../primitives/sr-primitives" } -rpc-primitives = { package = "substrate-rpc-primitives", path = "../../primitives/rpc" } -state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } -substrate-executor = { path = "../executor" } -substrate-keystore = { path = "../keystore" } +session = { package = "sp-sesssion", path = "../../primitives/session" } +sp-runtime = { path = "../../primitives/sr-primitives" } +rpc-primitives = { package = "sp-rpc", path = "../../primitives/rpc" } +state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } +sc-executor = { path = "../executor" } +sc-keystore = { path = "../keystore" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } sp-blockchain = { path = "../../primitives/blockchain" } hash-db = { version = "0.15.2", default-features = false } @@ -31,9 +31,9 @@ parking_lot = { version = "0.9.0" } [dev-dependencies] assert_matches = "1.3.0" futures01 = { package = "futures", version = "0.1.29" } -network = { package = "substrate-network", path = "../network" } +network = { package = "sc-network", path = "../network" } rustc-hex = "2.0.1" -sr-io = { path = "../../primitives/sr-io" } +sp-io = { path = "../../primitives/sr-io" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } tokio = "0.1.22" txpool = { package = "sc-transaction-pool", path = "../transaction-pool" } diff --git a/client/rpc/api/Cargo.toml b/client/rpc/api/Cargo.toml index acc4aa1c008b1..533744ae843d1 100644 --- a/client/rpc/api/Cargo.toml +++ b/client/rpc/api/Cargo.toml @@ -14,9 +14,9 @@ jsonrpc-derive = "14.0.3" jsonrpc-pubsub = "14.0.3" log = "0.4.8" parking_lot = "0.9.0" -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -runtime_version = { package = "sr-version", path = "../../../primitives/sr-version" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +runtime_version = { package = "sp-version", path = "../../../primitives/sr-version" } serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0.41" txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" } -rpc-primitives = { package = "substrate-rpc-primitives", path = "../../../primitives/rpc" } +rpc-primitives = { package = "sp-rpc", path = "../../../primitives/rpc" } diff --git a/client/rpc/src/author/mod.rs b/client/rpc/src/author/mod.rs index 9380bc46f5bd5..2c101e3a807de 100644 --- a/client/rpc/src/author/mod.rs +++ b/client/rpc/src/author/mod.rs @@ -35,8 +35,8 @@ use api::Subscriptions; use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; use codec::{Encode, Decode}; use primitives::{Bytes, Blake2Hasher, H256, traits::BareCryptoStorePtr}; -use sr_api::ConstructRuntimeApi; -use sr_primitives::{generic, traits::{self, ProvideRuntimeApi}}; +use sp_api::ConstructRuntimeApi; +use sp_runtime::{generic, traits::{self, ProvideRuntimeApi}}; use txpool_api::{ TransactionPool, InPoolTransaction, TransactionStatus, BlockHash, TxHash, TransactionFor, IntoPoolError, diff --git a/client/rpc/src/chain/chain_full.rs b/client/rpc/src/chain/chain_full.rs index 945ed19838db2..aa11481a3e9b9 100644 --- a/client/rpc/src/chain/chain_full.rs +++ b/client/rpc/src/chain/chain_full.rs @@ -23,7 +23,7 @@ use api::Subscriptions; use client_api::{CallExecutor, backend::Backend}; use client::Client; use primitives::{H256, Blake2Hasher}; -use sr_primitives::{ +use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{Block as BlockT}, }; diff --git a/client/rpc/src/chain/chain_light.rs b/client/rpc/src/chain/chain_light.rs index 94afc7a9d347d..63cb067619db2 100644 --- a/client/rpc/src/chain/chain_light.rs +++ b/client/rpc/src/chain/chain_light.rs @@ -29,7 +29,7 @@ use client::{ }, }; use primitives::{H256, Blake2Hasher}; -use sr_primitives::{ +use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{Block as BlockT}, }; diff --git a/client/rpc/src/chain/mod.rs b/client/rpc/src/chain/mod.rs index 8c35df0bf7b55..42e04936a2d58 100644 --- a/client/rpc/src/chain/mod.rs +++ b/client/rpc/src/chain/mod.rs @@ -38,7 +38,7 @@ use client::{ use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId}; use primitives::{H256, Blake2Hasher}; use rpc_primitives::{number::NumberOrHex, list::ListOrValue}; -use sr_primitives::{ +use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{Block as BlockT, Header, NumberFor}, }; diff --git a/client/rpc/src/state/mod.rs b/client/rpc/src/state/mod.rs index 491ea33969e90..df9a6709b9bca 100644 --- a/client/rpc/src/state/mod.rs +++ b/client/rpc/src/state/mod.rs @@ -33,11 +33,11 @@ use primitives::{ storage::{StorageKey, StorageData, StorageChangeSet}, }; use runtime_version::RuntimeVersion; -use sr_primitives::{ +use sp_runtime::{ traits::{Block as BlockT, ProvideRuntimeApi}, }; -use sr_api::Metadata; +use sp_api::Metadata; use self::error::{Error, FutureResult}; diff --git a/client/rpc/src/state/state_full.rs b/client/rpc/src/state/state_full.rs index 55b6e65d484df..698d42f101d8e 100644 --- a/client/rpc/src/state/state_full.rs +++ b/client/rpc/src/state/state_full.rs @@ -38,12 +38,12 @@ use primitives::{ }; use runtime_version::RuntimeVersion; use state_machine::ExecutionStrategy; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, Header, NumberFor, ProvideRuntimeApi, SaturatedConversion}, }; -use sr_api::Metadata; +use sp_api::Metadata; use super::{StateBackend, error::{FutureResult, Error, Result}, client_err}; diff --git a/client/rpc/src/state/state_light.rs b/client/rpc/src/state/state_light.rs index c246312749051..62d3404d8e001 100644 --- a/client/rpc/src/state/state_light.rs +++ b/client/rpc/src/state/state_light.rs @@ -53,7 +53,7 @@ use primitives::{ storage::{StorageKey, StorageData, StorageChangeSet}, }; use runtime_version::RuntimeVersion; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::Block as BlockT, }; diff --git a/client/rpc/src/state/tests.rs b/client/rpc/src/state/tests.rs index f6658b272a426..b77e5a82911c4 100644 --- a/client/rpc/src/state/tests.rs +++ b/client/rpc/src/state/tests.rs @@ -22,7 +22,7 @@ use std::sync::Arc; use assert_matches::assert_matches; use futures01::stream::Stream; use primitives::storage::well_known_keys; -use sr_io::hashing::blake2_256; +use sp_io::hashing::blake2_256; use test_client::{ prelude::*, consensus::BlockOrigin, diff --git a/client/rpc/src/system/mod.rs b/client/rpc/src/system/mod.rs index 88d2938665528..d77b2583a5f97 100644 --- a/client/rpc/src/system/mod.rs +++ b/client/rpc/src/system/mod.rs @@ -21,7 +21,7 @@ mod tests; use futures::{channel::{mpsc, oneshot}, compat::Compat}; use api::Receiver; -use sr_primitives::traits::{self, Header as HeaderT}; +use sp_runtime::traits::{self, Header as HeaderT}; use self::error::Result; pub use api::system::*; diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index bf9491add3949..cb499cccc13d6 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-service" +name = "sc-service" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -10,7 +10,7 @@ default = ["rocksdb"] # a path to a database, an error will be produced at runtime. rocksdb = ["client_db/kvdb-rocksdb"] wasmtime = [ - "substrate-executor/wasmtime", + "sc-executor/wasmtime", ] [dependencies] @@ -28,37 +28,37 @@ serde = "1.0.101" serde_json = "1.0.41" sysinfo = "0.9.5" target_info = "0.1.0" -keystore = { package = "substrate-keystore", path = "../keystore" } -sr-io = { path = "../../primitives/sr-io" } -sr-primitives = { path = "../../primitives/sr-primitives" } +keystore = { package = "sc-keystore", path = "../keystore" } +sp-io = { path = "../../primitives/sr-io" } +sp-runtime = { path = "../../primitives/sr-primitives" } sp-blockchain = { path = "../../primitives/blockchain" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -session = { package = "substrate-session", path = "../../primitives/session" } -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" } -consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" } -network = { package = "substrate-network", path = "../network" } -chain-spec = { package = "substrate-chain-spec", path = "../chain-spec" } -client-api = { package = "substrate-client-api", path = "../api" } -client = { package = "substrate-client", path = "../" } -sr-api = { path = "../../primitives/sr-api" } +primitives = { package = "sp-core", path = "../../primitives/core" } +session = { package = "sp-sesssion", path = "../../primitives/session" } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto" } +consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" } +network = { package = "sc-network", path = "../network" } +chain-spec = { package = "sc-chain-spec", path = "../chain-spec" } +client-api = { package = "sc-client-api", path = "../api" } +client = { package = "sc-client", path = "../" } +sp-api = { path = "../../primitives/sr-api" } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../primitives/transaction-pool/runtime-api" } -client_db = { package = "substrate-client-db", path = "../db" } +client_db = { package = "sc-client-db", path = "../db" } codec = { package = "parity-scale-codec", version = "1.0.0" } -substrate-executor = { path = "../executor" } +sc-executor = { path = "../executor" } txpool = { package = "sc-transaction-pool", path = "../transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } -rpc-servers = { package = "substrate-rpc-servers", path = "../rpc-servers" } -rpc = { package = "substrate-rpc", path = "../rpc" } -tel = { package = "substrate-telemetry", path = "../telemetry" } -offchain = { package = "substrate-offchain", path = "../offchain" } +rpc-servers = { package = "sc-rpc-server", path = "../rpc-servers" } +rpc = { package = "sc-rpc", path = "../rpc" } +tel = { package = "sc-telemetry", path = "../telemetry" } +offchain = { package = "sc-offchain", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } grafana-data-source = { path = "../grafana-data-source" } -substrate-tracing = { package = "substrate-tracing", path = "../tracing" } +sc-transaction = { package = "sc-transaction", path = "../tracing" } tracing = "0.1.10" [dev-dependencies] substrate-test-runtime-client = { path = "../../test/utils/runtime/client" } -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" } -grandpa = { package = "substrate-finality-grandpa", path = "../finality-grandpa" } -grandpa-primitives = { package = "substrate-finality-grandpa-primitives", path = "../../primitives/finality-grandpa" } +babe-primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe" } +grandpa = { package = "sc-finality-grandpa", path = "../finality-grandpa" } +grandpa-primitives = { package = "sp-finality-granpda", path = "../../primitives/finality-grandpa" } tokio = "0.1" diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 2f6774833744c..36ce01275295e 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -40,12 +40,12 @@ use network::{config::BoxFinalityProofRequestBuilder, specialization::NetworkSpe use parking_lot::{Mutex, RwLock}; use primitives::{Blake2Hasher, H256, Hasher}; use rpc; -use sr_api::ConstructRuntimeApi; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{ +use sp_api::ConstructRuntimeApi; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{ Block as BlockT, ProvideRuntimeApi, NumberFor, Header, SaturatedConversion, }; -use substrate_executor::{NativeExecutor, NativeExecutionDispatch}; +use sc_executor::{NativeExecutor, NativeExecutionDispatch}; use std::{ io::{Read, Write, Seek}, marker::PhantomData, sync::Arc, time::SystemTime @@ -712,11 +712,11 @@ ServiceBuilder< > where Client: ProvideRuntimeApi, as ProvideRuntimeApi>::Api: - sr_api::Metadata + + sp_api::Metadata + offchain::OffchainWorkerApi + txpool_runtime_api::TaggedTransactionQueue + session::SessionKeys + - sr_api::ApiExt, + sp_api::ApiExt, TBl: BlockT::Out>, TRtApi: ConstructRuntimeApi> + 'static + Send + Sync, TCfg: Default, @@ -1119,7 +1119,7 @@ ServiceBuilder< // Instrumentation if let Some(tracing_targets) = config.tracing_targets.as_ref() { - let subscriber = substrate_tracing::ProfilingSubscriber::new( + let subscriber = sc_transaction::ProfilingSubscriber::new( config.tracing_receiver, tracing_targets ); match tracing::subscriber::set_global_default(subscriber) { diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index 239d8df71db27..742167069a7bf 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -26,10 +26,10 @@ use futures03::{ TryFutureExt as _, }; use primitives::{Blake2Hasher, Hasher}; -use sr_primitives::traits::{ +use sp_runtime::traits::{ Block as BlockT, NumberFor, One, Zero, Header, SaturatedConversion }; -use sr_primitives::generic::{BlockId, SignedBlock}; +use sp_runtime::generic::{BlockId, SignedBlock}; use codec::{Decode, Encode, IoReader}; use client::Client; use consensus_common::import_queue::{IncomingBlock, Link, BlockImportError, BlockImportResult, ImportQueue}; diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 6ef2aa46ac270..05d3f1ab45956 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -19,7 +19,7 @@ pub use client::ExecutionStrategies; pub use client_db::{kvdb::KeyValueDB, PruningMode}; pub use network::config::{ExtTransport, NetworkConfiguration, Roles}; -pub use substrate_executor::WasmExecutionMethod; +pub use sc_executor::WasmExecutionMethod; use std::{path::PathBuf, net::SocketAddr, sync::Arc}; pub use txpool::txpool::Options as TransactionPoolOptions; @@ -103,7 +103,7 @@ pub struct Configuration { /// Tracing targets pub tracing_targets: Option, /// Tracing receiver - pub tracing_receiver: substrate_tracing::TracingReceiver, + pub tracing_receiver: sc_transaction::TracingReceiver, } /// Configuration of the database of the client. diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 2115fd50a7167..1a86e05b88062 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -49,8 +49,8 @@ use network::{ use log::{log, warn, debug, error, Level}; use codec::{Encode, Decode}; use primitives::{Blake2Hasher, H256}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{NumberFor, Block as BlockT}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{NumberFor, Block as BlockT}; pub use self::error::Error; pub use self::builder::{ServiceBuilder, ServiceBuilderCommand}; @@ -595,7 +595,7 @@ fn transactions_to_propagate(pool: &Pool) where Pool: TransactionPool, B: BlockT, - H: std::hash::Hash + Eq + sr_primitives::traits::Member + sr_primitives::traits::MaybeSerialize, + H: std::hash::Hash + Eq + sp_runtime::traits::Member + sp_runtime::traits::MaybeSerialize, E: IntoPoolError + From, { pool.ready() @@ -614,7 +614,7 @@ where C: network::ClientHandle + Send + Sync, Pool: 'static + TransactionPool, B: BlockT, - H: std::hash::Hash + Eq + sr_primitives::traits::Member + sr_primitives::traits::MaybeSerialize, + H: std::hash::Hash + Eq + sp_runtime::traits::Member + sp_runtime::traits::MaybeSerialize, E: 'static + IntoPoolError + From, { fn transactions(&self) -> Vec<(H, ::Extrinsic)> { @@ -678,7 +678,7 @@ mod tests { use super::*; use futures03::executor::block_on; use consensus_common::SelectChain; - use sr_primitives::traits::BlindCheckable; + use sp_runtime::traits::BlindCheckable; use substrate_test_runtime_client::{prelude::*, runtime::{Extrinsic, Transfer}}; use txpool::{BasicPool, FullChainApi}; diff --git a/client/service/test/Cargo.toml b/client/service/test/Cargo.toml index fa7f834efa69f..b337521d9625a 100644 --- a/client/service/test/Cargo.toml +++ b/client/service/test/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-service-test" +name = "sc-service-test" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -12,10 +12,10 @@ log = "0.4.8" env_logger = "0.7.0" fdlimit = "0.1.1" futures03 = { package = "futures", version = "0.3.1", features = ["compat"] } -service = { package = "substrate-service", path = "../../service", default-features = false } -network = { package = "substrate-network", path = "../../network" } -consensus = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } -client = { package = "substrate-client", path = "../../" } -sr-primitives = { path = "../../../primitives/sr-primitives" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } +service = { package = "sc-service", path = "../../service", default-features = false } +network = { package = "sc-network", path = "../../network" } +consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" } +client = { package = "sc-client", path = "../../" } +sp-runtime = { path = "../../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../../primitives/core" } txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" } diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 73dc5518005b9..d9a5d417c4694 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -35,7 +35,7 @@ use service::{ }; use network::{multiaddr, Multiaddr}; use network::config::{NetworkConfiguration, TransportConfig, NodeKeyConfig, Secret, NonReservedPeerMode}; -use sr_primitives::{generic::BlockId, traits::Block as BlockT}; +use sp_runtime::{generic::BlockId, traits::Block as BlockT}; use txpool_api::TransactionPool; /// Maximum duration of single wait call. diff --git a/client/src/call_executor.rs b/client/src/call_executor.rs index 2a2fc3ad5506c..e0698850473f7 100644 --- a/client/src/call_executor.rs +++ b/client/src/call_executor.rs @@ -16,7 +16,7 @@ use std::{sync::Arc, panic::UnwindSafe, result, cell::RefCell}; use codec::{Encode, Decode}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::Block as BlockT, traits::NumberFor, }; use state_machine::{ @@ -30,7 +30,7 @@ use primitives::{ H256, Blake2Hasher, NativeOrEncoded, NeverNativeValue, traits::CodeExecutor, }; -use sr_api::{ProofRecorder, InitializeBlock}; +use sp_api::{ProofRecorder, InitializeBlock}; use client_api::{backend, call_executor::CallExecutor}; /// Call executor that executes methods locally, querying all required diff --git a/client/src/cht.rs b/client/src/cht.rs index 7e0552f2f267a..15a3b7718c0a0 100644 --- a/client/src/cht.rs +++ b/client/src/cht.rs @@ -28,7 +28,7 @@ use codec::Encode; use trie; use primitives::{H256, convert_hash}; -use sr_primitives::traits::{Header as HeaderT, SimpleArithmetic, Zero, One}; +use sp_runtime::traits::{Header as HeaderT, SimpleArithmetic, Zero, One}; use state_machine::backend::InMemory as InMemoryState; use state_machine::{MemoryDB, TrieBackend, Backend as StateBackend, StorageProof, prove_read_on_trie_backend, read_proof_check, read_proof_check_on_proving_backend}; diff --git a/client/src/client.rs b/client/src/client.rs index 6d6a690d8416f..88ecfecd2157f 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -31,8 +31,8 @@ use primitives::{ storage::{StorageKey, StorageData, well_known_keys}, traits::CodeExecutor, }; -use substrate_telemetry::{telemetry, SUBSTRATE_INFO}; -use sr_primitives::{ +use sc_telemetry::{telemetry, SUBSTRATE_INFO}; +use sp_runtime::{ Justification, BuildStorage, generic::{BlockId, SignedBlock, DigestItem}, traits::{ @@ -59,7 +59,7 @@ use sp_blockchain::{self as blockchain, HeaderMetadata, CachedHeaderMetadata, }; -use sr_api::{CallRuntimeAt, ConstructRuntimeApi, Core as CoreApi, ProofRecorder, InitializeBlock}; +use sp_api::{CallRuntimeAt, ConstructRuntimeApi, Core as CoreApi, ProofRecorder, InitializeBlock}; use block_builder::BlockBuilderApi; pub use client_api::{ @@ -1313,7 +1313,7 @@ impl ChainHeaderBackend for Client wher } } -impl sr_primitives::traits::BlockIdTo for Client where +impl sp_runtime::traits::BlockIdTo for Client where B: backend::Backend, E: CallExecutor + Send + Sync, Block: BlockT, @@ -1768,7 +1768,7 @@ pub(crate) mod tests { use std::collections::HashMap; use super::*; use primitives::blake2_256; - use sr_primitives::DigestItem; + use sp_runtime::DigestItem; use consensus::{BlockOrigin, SelectChain, BlockImport}; use test_client::{ prelude::*, diff --git a/client/src/genesis.rs b/client/src/genesis.rs index 94822466bbff5..d2743167422aa 100644 --- a/client/src/genesis.rs +++ b/client/src/genesis.rs @@ -16,7 +16,7 @@ //! Tool for creating the genesis block. -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, Zero}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, Zero}; /// Create a genesis block, given the initial storage. pub fn construct_genesis_block< diff --git a/client/src/in_mem.rs b/client/src/in_mem.rs index e6140e6d7442d..e5964669c9aa9 100644 --- a/client/src/in_mem.rs +++ b/client/src/in_mem.rs @@ -23,9 +23,9 @@ use primitives::{ChangesTrieConfiguration, storage::well_known_keys}; use primitives::offchain::storage::{ InMemOffchainStorage as OffchainStorage }; -use sr_primitives::generic::{BlockId, DigestItem}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Zero, NumberFor}; -use sr_primitives::{Justification, StorageOverlay, ChildrenStorageOverlay}; +use sp_runtime::generic::{BlockId, DigestItem}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, NumberFor}; +use sp_runtime::{Justification, StorageOverlay, ChildrenStorageOverlay}; use state_machine::backend::{Backend as StateBackend, InMemory}; use state_machine::{self, InMemoryChangesTrieStorage, ChangesTrieAnchorBlockId, ChangesTrieTransaction}; use hash_db::{Hasher, Prefix}; diff --git a/client/src/leaves.rs b/client/src/leaves.rs index 83cfa598969cb..91ea00a2f37b5 100644 --- a/client/src/leaves.rs +++ b/client/src/leaves.rs @@ -19,7 +19,7 @@ use std::collections::BTreeMap; use std::cmp::Reverse; use kvdb::{KeyValueDB, DBTransaction}; -use sr_primitives::traits::SimpleArithmetic; +use sp_runtime::traits::SimpleArithmetic; use codec::{Encode, Decode}; use sp_blockchain::{Error, Result}; diff --git a/client/src/lib.rs b/client/src/lib.rs index 1bbfbe0270f16..00a0d8c26900c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -28,7 +28,7 @@ //! Creating a [`Client`] is done by calling the `new` method and passing to it a //! [`Backend`](backend::Backend) and an [`Executor`](CallExecutor). //! -//! The former is typically provided by the `substrate-client-db` crate. +//! The former is typically provided by the `sc-client-db` crate. //! //! The latter typically requires passing one of: //! @@ -46,9 +46,9 @@ //! //! ``` //! use std::sync::Arc; -//! use substrate_client::{Client, in_mem::Backend, LocalCallExecutor}; +//! use sc_client::{Client, in_mem::Backend, LocalCallExecutor}; //! use primitives::Blake2Hasher; -//! use sr_primitives::{StorageOverlay, ChildrenStorageOverlay}; +//! use sp_runtime::{StorageOverlay, ChildrenStorageOverlay}; //! use executor::{NativeExecutor, WasmExecutionMethod}; //! //! // In this example, we're using the `Block` and `RuntimeApi` types from the diff --git a/client/src/light/backend.rs b/client/src/light/backend.rs index 2077713ba5481..b8dc0c34d7e35 100644 --- a/client/src/light/backend.rs +++ b/client/src/light/backend.rs @@ -25,8 +25,8 @@ use state_machine::{ Backend as StateBackend, TrieBackend, backend::InMemory as InMemoryState, ChangesTrieTransaction }; use primitives::offchain::storage::InMemOffchainStorage; -use sr_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay}; -use sr_primitives::traits::{Block as BlockT, NumberFor, Zero, Header}; +use sp_runtime::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay}; +use sp_runtime::traits::{Block as BlockT, NumberFor, Zero, Header}; use crate::in_mem::{self, check_genesis_storage}; use sp_blockchain::{ Error as ClientError, Result as ClientResult }; use client_api::{ diff --git a/client/src/light/blockchain.rs b/client/src/light/blockchain.rs index 11982e45291c8..03ee035031acb 100644 --- a/client/src/light/blockchain.rs +++ b/client/src/light/blockchain.rs @@ -20,8 +20,8 @@ use std::future::Future; use std::sync::Arc; -use sr_primitives::{Justification, generic::BlockId}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero}; +use sp_runtime::{Justification, generic::BlockId}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero}; use sp_blockchain::{ HeaderMetadata, CachedHeaderMetadata, diff --git a/client/src/light/call_executor.rs b/client/src/light/call_executor.rs index c998ac0e454e6..8571c331b2fd5 100644 --- a/client/src/light/call_executor.rs +++ b/client/src/light/call_executor.rs @@ -25,7 +25,7 @@ use primitives::{ H256, Blake2Hasher, convert_hash, NativeOrEncoded, traits::CodeExecutor, }; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{One, Block as BlockT, Header as HeaderT, NumberFor}, }; use externalities::Extensions; @@ -36,7 +36,7 @@ use state_machine::{ }; use hash_db::Hasher; -use sr_api::{ProofRecorder, InitializeBlock}; +use sp_api::{ProofRecorder, InitializeBlock}; use sp_blockchain::{Error as ClientError, Result as ClientResult}; @@ -460,7 +460,7 @@ mod tests { let remote_client = test_client::new(); for i in 1u32..3u32 { let mut digest = Digest::default(); - digest.push(sr_primitives::generic::DigestItem::Other::(i.to_le_bytes().to_vec())); + digest.push(sp_runtime::generic::DigestItem::Other::(i.to_le_bytes().to_vec())); remote_client.import_justified( BlockOrigin::Own, remote_client.new_block(digest).unwrap().bake().unwrap(), diff --git a/client/src/light/fetcher.rs b/client/src/light/fetcher.rs index 9db6dda172d1b..9b2c308668531 100644 --- a/client/src/light/fetcher.rs +++ b/client/src/light/fetcher.rs @@ -23,7 +23,7 @@ use std::marker::PhantomData; use hash_db::{HashDB, Hasher, EMPTY_PREFIX}; use codec::{Decode, Encode}; use primitives::{convert_hash, traits::CodeExecutor, H256}; -use sr_primitives::traits::{ +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, Hash, HashFor, NumberFor, SimpleArithmetic, CheckedConversion, Zero, }; @@ -340,7 +340,7 @@ pub mod tests { use crate::light::blockchain::tests::{DummyStorage, DummyBlockchain}; use primitives::{blake2_256, Blake2Hasher, H256}; use primitives::storage::{well_known_keys, StorageKey}; - use sr_primitives::generic::BlockId; + use sp_runtime::generic::BlockId; use state_machine::Backend; use super::*; diff --git a/client/src/light/mod.rs b/client/src/light/mod.rs index e9dec286f6e9b..bd8040d22b3df 100644 --- a/client/src/light/mod.rs +++ b/client/src/light/mod.rs @@ -25,8 +25,8 @@ use std::sync::Arc; use executor::RuntimeInfo; use primitives::{H256, Blake2Hasher, traits::CodeExecutor}; -use sr_primitives::BuildStorage; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::BuildStorage; +use sp_runtime::traits::Block as BlockT; use sp_blockchain::Result as ClientResult; use crate::call_executor::LocalCallExecutor; diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index d2752c14dd9c8..175b38f7f0fdb 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-state-db" +name = "sc-state-db" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -7,7 +7,7 @@ edition = "2018" [dependencies] parking_lot = "0.9.0" log = "0.4.8" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } [dev-dependencies] diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 07a296b02f8e0..bb18268275b0d 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-telemetry" +name = "sc-telemetry" version = "2.0.0" authors = ["Parity Technologies "] description = "Telemetry utils" diff --git a/client/telemetry/src/lib.rs b/client/telemetry/src/lib.rs index 768fc2df84e6a..b4cc756bf0159 100644 --- a/client/telemetry/src/lib.rs +++ b/client/telemetry/src/lib.rs @@ -37,8 +37,8 @@ //! ```no_run //! use futures::prelude::*; //! -//! let telemetry = substrate_telemetry::init_telemetry(substrate_telemetry::TelemetryConfig { -//! endpoints: substrate_telemetry::TelemetryEndpoints::new(vec![ +//! let telemetry = sc_telemetry::init_telemetry(sc_telemetry::TelemetryConfig { +//! endpoints: sc_telemetry::TelemetryEndpoints::new(vec![ //! // The `0` is the maximum verbosity level of messages to send to this endpoint. //! ("wss://example.com".into(), 0) //! ]), @@ -52,7 +52,7 @@ //! }); //! //! // Sends a message on the telemetry. -//! substrate_telemetry::telemetry!(substrate_telemetry::SUBSTRATE_INFO; "test"; +//! sc_telemetry::telemetry!(sc_telemetry::SUBSTRATE_INFO; "test"; //! "foo" => "bar", //! ) //! ``` @@ -124,7 +124,7 @@ pub struct Telemetry { /// Behind the `Mutex` in `Telemetry`. /// /// Note that ideally we wouldn't have to make the `Telemetry` clonable, as that would remove the -/// need for a `Mutex`. However there is currently a weird hack in place in `substrate-service` +/// need for a `Mutex`. However there is currently a weird hack in place in `sc-service` /// where we extract the telemetry registration so that it continues running during the shutdown /// process. struct TelemetryInner { diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index 013135486ad81..9ebd3dddad472 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-tracing" +name = "sc-transaction" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] @@ -14,7 +14,7 @@ serde_json = "1.0.41" slog = { version = "2.5.2", features = ["nested-values"] } tracing-core = "0.1.7" -substrate-telemetry = { path = "../telemetry" } +sc-telemetry = { path = "../telemetry" } grafana-data-source = { path = "../grafana-data-source" } [dev-dependencies] diff --git a/client/tracing/src/lib.rs b/client/tracing/src/lib.rs index 1ab293114702c..b87273bdaae20 100644 --- a/client/tracing/src/lib.rs +++ b/client/tracing/src/lib.rs @@ -54,7 +54,7 @@ use tracing_core::{ }; use grafana_data_source::{self, record_metrics}; -use substrate_telemetry::{telemetry, SUBSTRATE_INFO}; +use sc_telemetry::{telemetry, SUBSTRATE_INFO}; /// Used to configure how to receive the metrics #[derive(Debug, Clone)] diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 3f1c80c2de4af..9ae87d50ed68c 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -10,15 +10,15 @@ derive_more = "0.99.2" futures = { version = "0.3.1", features = ["compat", "compat"] } log = "0.4.8" parking_lot = "0.9.0" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -sr-api = { path = "../../primitives/sr-api" } -sr-primitives = { path = "../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../primitives/core" } +sp-api = { path = "../../primitives/sr-api" } +sp-runtime = { path = "../../primitives/sr-primitives" } txpool = { package = "sc-transaction-graph", path = "./graph" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../primitives/transaction-pool/runtime-api" } -client-api = { package = "substrate-client-api", path = "../api" } +client-api = { package = "sc-client-api", path = "../api" } sp-blockchain = { path = "../../primitives/blockchain" } [dev-dependencies] -keyring = { package = "substrate-keyring", path = "../../primitives/keyring" } +keyring = { package = "sp-keyring", path = "../../primitives/keyring" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index c9dd98d8ba8f4..392a39ab6d459 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -10,8 +10,8 @@ futures = "0.3.1" log = "0.4.8" parking_lot = "0.9.0" serde = { version = "1.0.101", features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +sp-runtime = { path = "../../../primitives/sr-primitives" } txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" } [dev-dependencies] diff --git a/client/transaction-pool/graph/benches/basics.rs b/client/transaction-pool/graph/benches/basics.rs index 920facaa2cfd7..884cffea74afa 100644 --- a/client/transaction-pool/graph/benches/basics.rs +++ b/client/transaction-pool/graph/benches/basics.rs @@ -18,10 +18,10 @@ use criterion::{criterion_group, criterion_main, Criterion}; use futures::executor::block_on; use sc_transaction_graph::*; -use sr_primitives::transaction_validity::{ValidTransaction, InvalidTransaction}; +use sp_runtime::transaction_validity::{ValidTransaction, InvalidTransaction}; use codec::Encode; use test_runtime::{Block, Extrinsic, Transfer, H256, AccountId}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, transaction_validity::{TransactionValidity, TransactionTag as Tag}, }; diff --git a/client/transaction-pool/graph/src/base_pool.rs b/client/transaction-pool/graph/src/base_pool.rs index ed2a5e2f6c205..77ba175963dbe 100644 --- a/client/transaction-pool/graph/src/base_pool.rs +++ b/client/transaction-pool/graph/src/base_pool.rs @@ -28,8 +28,8 @@ use std::{ use log::{trace, debug, warn}; use serde::Serialize; use primitives::hexdisplay::HexDisplay; -use sr_primitives::traits::Member; -use sr_primitives::transaction_validity::{ +use sp_runtime::traits::Member; +use sp_runtime::transaction_validity::{ TransactionTag as Tag, TransactionLongevity as Longevity, TransactionPriority as Priority, diff --git a/client/transaction-pool/graph/src/error.rs b/client/transaction-pool/graph/src/error.rs index 79006461c6e37..76a276bb49fa2 100644 --- a/client/transaction-pool/graph/src/error.rs +++ b/client/transaction-pool/graph/src/error.rs @@ -16,7 +16,7 @@ //! Transaction pool errors. -use sr_primitives::transaction_validity::{ +use sp_runtime::transaction_validity::{ TransactionPriority as Priority, InvalidTransaction, UnknownTransaction, }; diff --git a/client/transaction-pool/graph/src/future.rs b/client/transaction-pool/graph/src/future.rs index 8b01e9d654144..1c653cc6e676e 100644 --- a/client/transaction-pool/graph/src/future.rs +++ b/client/transaction-pool/graph/src/future.rs @@ -23,7 +23,7 @@ use std::{ }; use primitives::hexdisplay::HexDisplay; -use sr_primitives::transaction_validity::{ +use sp_runtime::transaction_validity::{ TransactionTag as Tag, }; diff --git a/client/transaction-pool/graph/src/listener.rs b/client/transaction-pool/graph/src/listener.rs index f9b71555e264f..c6a90b0c5bc5b 100644 --- a/client/transaction-pool/graph/src/listener.rs +++ b/client/transaction-pool/graph/src/listener.rs @@ -22,7 +22,7 @@ use std::{ }; use serde::Serialize; use crate::watcher; -use sr_primitives::traits; +use sp_runtime::traits; use log::{debug, trace, warn}; /// Extrinsic pool default listener. diff --git a/client/transaction-pool/graph/src/pool.rs b/client/transaction-pool/graph/src/pool.rs index 7d91ebaf4a71e..cf5c7a5292b4b 100644 --- a/client/transaction-pool/graph/src/pool.rs +++ b/client/transaction-pool/graph/src/pool.rs @@ -29,7 +29,7 @@ use futures::{ channel::mpsc, future::{Either, ready, join_all}, }; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{self, SaturatedConversion}, transaction_validity::{TransactionValidity, TransactionTag as Tag, TransactionValidityError}, @@ -441,7 +441,7 @@ mod tests { use futures::executor::block_on; use super::*; use txpool_api::TransactionStatus; - use sr_primitives::transaction_validity::{ValidTransaction, InvalidTransaction}; + use sp_runtime::transaction_validity::{ValidTransaction, InvalidTransaction}; use codec::Encode; use test_runtime::{Block, Extrinsic, Transfer, H256, AccountId}; use assert_matches::assert_matches; diff --git a/client/transaction-pool/graph/src/ready.rs b/client/transaction-pool/graph/src/ready.rs index 81c370625c2f3..11354e68712e2 100644 --- a/client/transaction-pool/graph/src/ready.rs +++ b/client/transaction-pool/graph/src/ready.rs @@ -24,8 +24,8 @@ use std::{ use serde::Serialize; use log::debug; use parking_lot::RwLock; -use sr_primitives::traits::Member; -use sr_primitives::transaction_validity::{ +use sp_runtime::traits::Member; +use sp_runtime::transaction_validity::{ TransactionTag as Tag, }; use txpool_api::error; diff --git a/client/transaction-pool/graph/src/validated_pool.rs b/client/transaction-pool/graph/src/validated_pool.rs index f46c2b0cf659c..e32dac88ebedf 100644 --- a/client/transaction-pool/graph/src/validated_pool.rs +++ b/client/transaction-pool/graph/src/validated_pool.rs @@ -31,7 +31,7 @@ use log::{debug, warn}; use futures::channel::mpsc; use parking_lot::{Mutex, RwLock}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{self, SaturatedConversion}, transaction_validity::TransactionTag as Tag, diff --git a/client/transaction-pool/src/api.rs b/client/transaction-pool/src/api.rs index 87b494201d5e3..434a317d67439 100644 --- a/client/transaction-pool/src/api.rs +++ b/client/transaction-pool/src/api.rs @@ -25,7 +25,7 @@ use client_api::{ light::{Fetcher, RemoteCallRequest} }; use primitives::{H256, Blake2Hasher, Hasher}; -use sr_primitives::{generic::BlockId, traits::{self, Block as BlockT}, transaction_validity::TransactionValidity}; +use sp_runtime::{generic::BlockId, traits::{self, Block as BlockT}, transaction_validity::TransactionValidity}; use txpool_runtime_api::TaggedTransactionQueue; use crate::error::{self, Error}; @@ -58,7 +58,7 @@ impl txpool::ChainApi for FullChainApi where Block: BlockT, T: traits::ProvideRuntimeApi + traits::BlockIdTo + 'static + Send + Sync, T::Api: TaggedTransactionQueue, - sr_api::ApiErrorFor: Send, + sp_api::ApiErrorFor: Send, { type Block = Block; type Hash = H256; diff --git a/client/transaction-pool/src/lib.rs b/client/transaction-pool/src/lib.rs index 1499ab26d4bfc..62e88af74ed63 100644 --- a/client/transaction-pool/src/lib.rs +++ b/client/transaction-pool/src/lib.rs @@ -33,7 +33,7 @@ pub use crate::maintainer::{FullBasicPoolMaintainer, LightBasicPoolMaintainer}; use std::{collections::HashMap, sync::Arc}; use futures::{Future, FutureExt}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::Block as BlockT, }; diff --git a/client/transaction-pool/src/maintainer.rs b/client/transaction-pool/src/maintainer.rs index f5eeb90b8506c..7c5d07e0f1e6b 100644 --- a/client/transaction-pool/src/maintainer.rs +++ b/client/transaction-pool/src/maintainer.rs @@ -31,7 +31,7 @@ use client_api::{ light::{Fetcher, RemoteBodyRequest}, }; use primitives::{Blake2Hasher, H256}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, Extrinsic, Header, NumberFor, ProvideRuntimeApi, SimpleArithmetic}, }; @@ -384,8 +384,8 @@ mod tests { let fetcher = Arc::new(test_client::new_light_fetcher() .with_remote_body(Some(Box::new(move |_| Ok(vec![fetcher_transaction.clone()])))) .with_remote_call(Some(Box::new(move |_| { - let validity: sr_primitives::transaction_validity::TransactionValidity = - Ok(sr_primitives::transaction_validity::ValidTransaction { + let validity: sp_runtime::transaction_validity::TransactionValidity = + Ok(sp_runtime::transaction_validity::ValidTransaction { priority: 0, requires: Vec::new(), provides: vec![vec![42]], @@ -449,7 +449,7 @@ mod tests { #[test] fn should_revalidate_transactions_at_light_pool() { use std::sync::atomic; - use sr_primitives::transaction_validity::*; + use sp_runtime::transaction_validity::*; let build_fetcher = || { let validated = Arc::new(atomic::AtomicBool::new(false)); diff --git a/client/transaction-pool/src/tests.rs b/client/transaction-pool/src/tests.rs index 60a9e0562fce3..65ca06c2c3ec1 100644 --- a/client/transaction-pool/src/tests.rs +++ b/client/transaction-pool/src/tests.rs @@ -21,7 +21,7 @@ use codec::Encode; use futures::executor::block_on; use txpool::{self, Pool}; use test_client::{runtime::{AccountId, Block, Hash, Index, Extrinsic, Transfer}, AccountKeyring::{self, *}}; -use sr_primitives::{ +use sp_runtime::{ generic::{self, BlockId}, traits::{Hash as HashT, BlakeTwo256}, transaction_validity::{TransactionValidity, ValidTransaction}, diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index e24a3b187a2d2..6cca26c6218e9 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -8,23 +8,23 @@ edition = "2018" serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } # Needed for various traits. In our case, `OnFinalize`. -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } # Needed for type-safe access to storage DB. support = { package = "frame-support", path = "../support", default-features = false } # `system` module provides us with all sorts of useful stuff and macros depend on it being around. system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -rstd = { package = "sr-std", path = "../../primitives/sr-std" } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } +rstd = { package = "sp-std", path = "../../primitives/sr-std" } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io" } [features] default = ["std"] std = [ "serde", "codec/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", ] diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 314a8d456940f..7810b75305a90 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -131,9 +131,9 @@ #![cfg_attr(not(feature = "std"), no_std)] use support::{Parameter, decl_module, decl_event, decl_storage, ensure}; -use sr_primitives::traits::{Member, SimpleArithmetic, Zero, StaticLookup}; +use sp_runtime::traits::{Member, SimpleArithmetic, Zero, StaticLookup}; use system::ensure_signed; -use sr_primitives::traits::One; +use sp_runtime::traits::One; /// The module configuration trait. pub trait Trait: system::Trait { @@ -244,7 +244,7 @@ mod tests { use primitives::H256; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. - use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; + use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; impl_outer_origin! { pub enum Origin for Test {} diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index a6700dbaf8296..8c53f871cc50a 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -5,17 +5,17 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } serde = { version = "1.0.101", optional = true } session = { package = "pallet-session", path = "../session", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } -substrate-consensus-aura-primitives = { path = "../../primitives/consensus/aura", default-features = false} +sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false} system = { package = "frame-system", path = "../system", default-features = false } sp-timestamp = { package = "sp-timestamp", path = "../../primitives/timestamp", default-features = false } pallet-timestamp = { package = "pallet-timestamp", path = "../timestamp", default-features = false } @@ -35,9 +35,9 @@ std = [ "primitives/std", "rstd/std", "serde", - "sr-primitives/std", + "sp-runtime/std", "support/std", - "substrate-consensus-aura-primitives/std", + "sp-consensus-aura/std", "system/std", "sp-timestamp/std", "pallet-timestamp/std", diff --git a/frame/aura/src/lib.rs b/frame/aura/src/lib.rs index f1ae121e00be1..59fe2dbd218b9 100644 --- a/frame/aura/src/lib.rs +++ b/frame/aura/src/lib.rs @@ -40,8 +40,8 @@ //! //! If you're interested in hacking on this module, it is useful to understand the interaction with //! `substrate/primitives/inherents/src/lib.rs` and, specifically, the required implementation of -//! [`ProvideInherent`](../substrate_inherents/trait.ProvideInherent.html) and -//! [`ProvideInherentData`](../substrate_inherents/trait.ProvideInherentData.html) to create and check inherents. +//! [`ProvideInherent`](../sp_inherents/trait.ProvideInherent.html) and +//! [`ProvideInherentData`](../sp_inherents/trait.ProvideInherentData.html) to create and check inherents. #![cfg_attr(not(feature = "std"), no_std)] @@ -53,13 +53,13 @@ use support::{ decl_storage, decl_module, Parameter, traits::{Get, FindAuthor}, ConsensusEngineId, }; -use sr_primitives::{ +use sp_runtime::{ RuntimeAppPublic, traits::{SaturatedConversion, Saturating, Zero, Member, IsMember}, generic::DigestItem, }; use sp_timestamp::OnTimestampSet; use inherents::{InherentIdentifier, InherentData, ProvideInherent, MakeFatalError}; -use substrate_consensus_aura_primitives::{ +use sp_consensus_aura::{ AURA_ENGINE_ID, ConsensusLog, AuthorityIndex, inherents::{INHERENT_IDENTIFIER, AuraInherentData}, }; @@ -109,7 +109,7 @@ impl Module { } } -impl sr_primitives::BoundToRuntimeAppPublic for Module { +impl sp_runtime::BoundToRuntimeAppPublic for Module { type Public = T::AuthorityId; } diff --git a/frame/aura/src/mock.rs b/frame/aura/src/mock.rs index c95a36e131518..49351ad159d91 100644 --- a/frame/aura/src/mock.rs +++ b/frame/aura/src/mock.rs @@ -19,8 +19,8 @@ #![cfg(test)] use crate::{Trait, Module, GenesisConfig}; -use substrate_consensus_aura_primitives::ed25519::AuthorityId; -use sr_primitives::{ +use sp_consensus_aura::ed25519::AuthorityId; +use sp_runtime::{ traits::IdentityLookup, Perbill, testing::{Header, UintAuthorityId}, }; @@ -50,7 +50,7 @@ impl system::Trait for Test { type BlockNumber = u64; type Call = (); type Hash = H256; - type Hashing = ::sr_primitives::traits::BlakeTwo256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index c0961671d8b6c..84da66f12b05e 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -5,20 +5,20 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../primitives/authority-discovery", default-features = false } -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto", default-features = false } +authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../primitives/authority-discovery", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } serde = { version = "1.0.101", optional = true } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } session = { package = "pallet-session", path = "../session", default-features = false, features = [ "historical" ] } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } [features] default = ["std"] @@ -31,7 +31,7 @@ std = [ "runtime-io/std", "serde", "session/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", ] diff --git a/frame/authority-discovery/src/lib.rs b/frame/authority-discovery/src/lib.rs index 6c9e316252d9b..b24fe5e0eba8e 100644 --- a/frame/authority-discovery/src/lib.rs +++ b/frame/authority-discovery/src/lib.rs @@ -59,7 +59,7 @@ impl Module { } } -impl sr_primitives::BoundToRuntimeAppPublic for Module { +impl sp_runtime::BoundToRuntimeAppPublic for Module { type Public = AuthorityId; } @@ -96,7 +96,7 @@ mod tests { use app_crypto::Pair; use primitives::{crypto::key_types, H256}; use runtime_io::TestExternalities; - use sr_primitives::{ + use sp_runtime::{ testing::{Header, UintAuthorityId}, traits::{ConvertInto, IdentityLookup, OpaqueKeys}, Perbill, KeyTypeId, }; @@ -155,7 +155,7 @@ mod tests { type BlockNumber = BlockNumber; type Call = (); type Hash = H256; - type Hashing = ::sr_primitives::traits::BlakeTwo256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AuthorityId; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index 508df216ae3c5..e8e82cc4d89c3 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -6,15 +6,15 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } sp-authorship = { path = "../../primitives/authorship", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } impl-trait-for-tuples = "0.1.3" [features] @@ -23,7 +23,7 @@ std = [ "codec/std", "primitives/std", "inherents/std", - "sr-primitives/std", + "sp-runtime/std", "rstd/std", "support/std", "system/std", diff --git a/frame/authorship/src/lib.rs b/frame/authorship/src/lib.rs index de7a07520ebbd..1f918e093a2f1 100644 --- a/frame/authorship/src/lib.rs +++ b/frame/authorship/src/lib.rs @@ -27,7 +27,7 @@ use support::traits::{FindAuthor, VerifySeal, Get}; use support::dispatch::Result as DispatchResult; use codec::{Encode, Decode}; use system::ensure_none; -use sr_primitives::traits::{Header as HeaderT, One, Zero}; +use sp_runtime::traits::{Header as HeaderT, One, Zero}; use support::weights::SimpleDispatchInfo; use inherents::{InherentIdentifier, ProvideInherent, InherentData, MakeFatalError}; use sp_authorship::{ @@ -144,7 +144,7 @@ where } } -#[derive(Encode, Decode, sr_primitives::RuntimeDebug)] +#[derive(Encode, Decode, sp_runtime::RuntimeDebug)] #[cfg_attr(any(feature = "std", test), derive(PartialEq))] enum UncleEntryItem { InclusionHeight(BlockNumber), @@ -362,7 +362,7 @@ impl ProvideInherent for Module { mod tests { use super::*; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup}, testing::Header, generic::DigestItem, Perbill, }; use support::{parameter_types, impl_outer_origin, ConsensusEngineId, weights::Weight}; diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 0ca099b84550d..c60b055b911f6 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -8,23 +8,23 @@ edition = "2018" hex-literal = "0.2.1" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } timestamp = { package = "pallet-timestamp", path = "../timestamp", default-features = false } sp-timestamp = { path = "../../primitives/timestamp", default-features = false } session = { package = "pallet-session", path = "../session", default-features = false } -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } +babe-primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } [dev-dependencies] lazy_static = "1.4.0" parking_lot = "0.9.0" -sr-version = { path = "../../primitives/sr-version", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +sp-version = { path = "../../primitives/sr-version", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core" } test-runtime = { package = "substrate-test-runtime", path = "../../test/utils/runtime" } [features] @@ -34,8 +34,8 @@ std = [ "codec/std", "rstd/std", "support/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "system/std", "timestamp/std", "sp-timestamp/std", diff --git a/frame/babe/src/lib.rs b/frame/babe/src/lib.rs index d0585b340f798..73a7adaaa388c 100644 --- a/frame/babe/src/lib.rs +++ b/frame/babe/src/lib.rs @@ -26,9 +26,9 @@ use sp_timestamp; use rstd::{result, prelude::*}; use support::{decl_storage, decl_module, traits::FindAuthor, traits::Get}; use sp_timestamp::OnTimestampSet; -use sr_primitives::{generic::DigestItem, ConsensusEngineId, Perbill}; -use sr_primitives::traits::{IsMember, SaturatedConversion, Saturating, RandomnessBeacon}; -use sr_staking_primitives::{ +use sp_runtime::{generic::DigestItem, ConsensusEngineId, Perbill}; +use sp_runtime::traits::{IsMember, SaturatedConversion, Saturating, RandomnessBeacon}; +use sp_staking::{ SessionIndex, offence::{Offence, Kind}, }; @@ -306,7 +306,7 @@ impl Module { // epoch 0 as having started at the slot of block 1. We want to use // the same randomness and validator set as signalled in the genesis, // so we don't rotate the epoch. - now != sr_primitives::traits::One::one() && { + now != sp_runtime::traits::One::one() && { let diff = CurrentSlot::get().saturating_sub(Self::current_epoch_start()); diff >= T::EpochDuration::get() } @@ -472,7 +472,7 @@ impl OnTimestampSet for Module { fn on_timestamp_set(_moment: T::Moment) { } } -impl sr_primitives::BoundToRuntimeAppPublic for Module { +impl sp_runtime::BoundToRuntimeAppPublic for Module { type Public = AuthorityId; } diff --git a/frame/babe/src/mock.rs b/frame/babe/src/mock.rs index 847b2a75e1c26..4ca52e27e3e82 100644 --- a/frame/babe/src/mock.rs +++ b/frame/babe/src/mock.rs @@ -19,10 +19,10 @@ use super::{Trait, Module, GenesisConfig}; use babe_primitives::AuthorityId; -use sr_primitives::{ +use sp_runtime::{ traits::IdentityLookup, Perbill, testing::{Header, UintAuthorityId}, impl_opaque_keys, }; -use sr_version::RuntimeVersion; +use sp_version::RuntimeVersion; use support::{impl_outer_origin, parameter_types, weights::Weight}; use runtime_io; use primitives::{H256, Blake2Hasher}; @@ -56,7 +56,7 @@ impl system::Trait for Test { type Call = (); type Hash = H256; type Version = Version; - type Hashing = sr_primitives::traits::BlakeTwo256; + type Hashing = sp_runtime::traits::BlakeTwo256; type AccountId = DummyValidatorId; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/babe/src/tests.rs b/frame/babe/src/tests.rs index f860375de487a..7ce256b43b8b1 100644 --- a/frame/babe/src/tests.rs +++ b/frame/babe/src/tests.rs @@ -18,7 +18,7 @@ use super::*; use mock::{new_test_ext, Babe, Test}; -use sr_primitives::{traits::OnFinalize, testing::{Digest, DigestItem}}; +use sp_runtime::{traits::OnFinalize, testing::{Digest, DigestItem}}; use session::ShouldEndSession; const EMPTY_RANDOMNESS: [u8; 32] = [ diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index a2a69902b038e..f6042ab33f0dc 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -8,14 +8,14 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -runtime-io = { package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } transaction-payment = { package = "pallet-transaction-payment", path = "../transaction-payment" } [features] @@ -26,6 +26,6 @@ std = [ "codec/std", "rstd/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "system/std", ] diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index 553592364b7b1..d32d8551d92e7 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -122,7 +122,7 @@ //! //! ``` //! use support::traits::{WithdrawReasons, LockableCurrency}; -//! use sr_primitives::traits::Bounded; +//! use sp_runtime::traits::Bounded; //! pub trait Trait: system::Trait { //! type Currency: LockableCurrency; //! } @@ -172,7 +172,7 @@ use support::{ weights::SimpleDispatchInfo, dispatch::Result, }; -use sr_primitives::{ +use sp_runtime::{ RuntimeDebug, traits::{ Zero, SimpleArithmetic, StaticLookup, Member, CheckedAdd, CheckedSub, MaybeSerializeDeserialize, @@ -328,7 +328,7 @@ decl_storage! { // Total genesis `balance` minus `liquid` equals funds locked for vesting let locked = balance.saturating_sub(liquid); // Number of units unlocked per block after `begin` - let per_block = locked / length.max(sr_primitives::traits::One::one()); + let per_block = locked / length.max(sp_runtime::traits::One::one()); (who.clone(), VestingSchedule { locked: locked, diff --git a/frame/balances/src/mock.rs b/frame/balances/src/mock.rs index 1756c77ce20e5..029beb5cd2f33 100644 --- a/frame/balances/src/mock.rs +++ b/frame/balances/src/mock.rs @@ -16,7 +16,7 @@ //! Test utilities -use sr_primitives::{Perbill, traits::{ConvertInto, IdentityLookup}, testing::Header}; +use sp_runtime::{Perbill, traits::{ConvertInto, IdentityLookup}, testing::Header}; use primitives::H256; use runtime_io; use support::{impl_outer_origin, parameter_types}; @@ -65,7 +65,7 @@ impl system::Trait for Runtime { type BlockNumber = u64; type Call = (); type Hash = H256; - type Hashing = ::sr_primitives::traits::BlakeTwo256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/balances/src/tests.rs b/frame/balances/src/tests.rs index 3849df676425f..b26ac5c691675 100644 --- a/frame/balances/src/tests.rs +++ b/frame/balances/src/tests.rs @@ -18,7 +18,7 @@ use super::*; use mock::{Balances, ExtBuilder, Runtime, System, info_from_weight, CALL}; -use sr_primitives::traits::SignedExtension; +use sp_runtime::traits::SignedExtension; use support::{ assert_noop, assert_ok, assert_err, traits::{LockableCurrency, LockIdentifier, WithdrawReason, WithdrawReasons, diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index ed1244ff237cc..2208e6e604374 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -8,10 +8,10 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } @@ -29,6 +29,6 @@ std = [ "serde", "runtime-io/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "system/std", ] diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index dec87da2465a0..6ecaf3045f305 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -25,8 +25,8 @@ use rstd::{prelude::*, result}; use primitives::u32_trait::Value as U32; -use sr_primitives::RuntimeDebug; -use sr_primitives::traits::{Hash, EnsureOrigin}; +use sp_runtime::RuntimeDebug; +use sp_runtime::traits::{Hash, EnsureOrigin}; use support::weights::SimpleDispatchInfo; use support::{ dispatch::{Dispatchable, Parameter}, codec::{Encode, Decode}, @@ -382,7 +382,7 @@ mod tests { use system::{EventRecord, Phase}; use hex_literal::hex; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ Perbill, traits::{BlakeTwo256, IdentityLookup, Block as BlockT}, testing::Header, BuildStorage, }; @@ -422,8 +422,8 @@ mod tests { type Event = Event; } - pub type Block = sr_primitives::generic::Block; - pub type UncheckedExtrinsic = sr_primitives::generic::UncheckedExtrinsic; + pub type Block = sp_runtime::generic::Block; + pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; support::construct_runtime!( pub enum Test where diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 4a870b18e44da..90e2f57091f5a 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -10,11 +10,11 @@ pwasm-utils = { version = "0.12.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } parity-wasm = { version = "0.41.0", default-features = false } wasmi-validation = { version = "0.3.0", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sandbox = { package = "sr-sandbox", path = "../../primitives/sr-sandbox", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sandbox = { package = "sp-sandbox", path = "../../primitives/sr-sandbox", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } @@ -32,7 +32,7 @@ std = [ "serde", "codec/std", "primitives/std", - "sr-primitives/std", + "sp-runtime/std", "runtime-io/std", "rstd/std", "sandbox/std", diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index a06353831c67d..64b2318d08896 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -10,8 +10,8 @@ jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" sp-blockchain = { path = "../../../primitives/blockchain" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -rpc-primitives = { package = "substrate-rpc-primitives", path = "../../../primitives/rpc" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +rpc-primitives = { package = "sp-rpc", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } pallet-contracts-rpc-runtime-api = { path = "./runtime-api" } diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index 87749fcd194fb..ae71345488427 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -5,18 +5,18 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../../../../primitives/sr-api", default-features = false } +sp-api = { path = "../../../../primitives/sr-api", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../../../primitives/sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../../../primitives/sr-std", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sr-primitives = { path = "../../../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../../../primitives/sr-primitives", default-features = false } [features] default = ["std"] std = [ - "sr-api/std", + "sp-api/std", "codec/std", "rstd/std", "serde", - "sr-primitives/std", + "sp-runtime/std", ] diff --git a/frame/contracts/rpc/runtime-api/src/lib.rs b/frame/contracts/rpc/runtime-api/src/lib.rs index 6d9c4a27b1feb..2d3385d6d7767 100644 --- a/frame/contracts/rpc/runtime-api/src/lib.rs +++ b/frame/contracts/rpc/runtime-api/src/lib.rs @@ -24,7 +24,7 @@ use rstd::vec::Vec; use codec::{Encode, Decode, Codec}; -use sr_primitives::RuntimeDebug; +use sp_runtime::RuntimeDebug; /// A result of execution of a contract. #[derive(Eq, PartialEq, Encode, Decode, RuntimeDebug)] @@ -59,7 +59,7 @@ pub enum GetStorageError { IsTombstone, } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The API to interact with contracts without using executive. pub trait ContractsApi where AccountId: Codec, diff --git a/frame/contracts/rpc/src/lib.rs b/frame/contracts/rpc/src/lib.rs index 6f357f53b8558..3deee80cc3021 100644 --- a/frame/contracts/rpc/src/lib.rs +++ b/frame/contracts/rpc/src/lib.rs @@ -25,7 +25,7 @@ use jsonrpc_derive::rpc; use primitives::{H256, Bytes}; use rpc_primitives::number; use serde::{Deserialize, Serialize}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, ProvideRuntimeApi}, }; diff --git a/frame/contracts/src/account_db.rs b/frame/contracts/src/account_db.rs index 5aa3a64fd9bc8..77732db871cdd 100644 --- a/frame/contracts/src/account_db.rs +++ b/frame/contracts/src/account_db.rs @@ -25,7 +25,7 @@ use rstd::cell::RefCell; use rstd::collections::btree_map::{BTreeMap, Entry}; use rstd::prelude::*; use runtime_io::hashing::blake2_256; -use sr_primitives::traits::{Bounded, Zero}; +use sp_runtime::traits::{Bounded, Zero}; use support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome}; use support::{storage::child, StorageMap}; use system; diff --git a/frame/contracts/src/exec.rs b/frame/contracts/src/exec.rs index b71f54b18bd95..12f71251e2bc7 100644 --- a/frame/contracts/src/exec.rs +++ b/frame/contracts/src/exec.rs @@ -21,7 +21,7 @@ use crate::gas::{Gas, GasMeter, Token, approx_gas_for_balance}; use crate::rent; use rstd::prelude::*; -use sr_primitives::traits::{Bounded, CheckedAdd, CheckedSub, Zero}; +use sp_runtime::traits::{Bounded, CheckedAdd, CheckedSub, Zero}; use support::{ storage::unhashed, traits::{WithdrawReason, Currency, Time, Randomness}, @@ -64,7 +64,7 @@ impl ExecReturnValue { /// VM-specific errors during execution (eg. division by 0, OOB access, failure to satisfy some /// precondition of a system call, etc.) or errors with the orchestration (eg. out-of-gas errors, a /// non-existent destination contract, etc.). -#[cfg_attr(test, derive(sr_primitives::RuntimeDebug))] +#[cfg_attr(test, derive(sp_runtime::RuntimeDebug))] pub struct ExecError { pub reason: &'static str, /// This is an allocated buffer that may be reused. The buffer must be cleared explicitly @@ -239,7 +239,7 @@ impl Token for ExecFeeToken { } #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq, Clone))] -#[derive(sr_primitives::RuntimeDebug)] +#[derive(sp_runtime::RuntimeDebug)] pub enum DeferredAction { DepositEvent { /// A list of topics this event will be deposited with. diff --git a/frame/contracts/src/gas.rs b/frame/contracts/src/gas.rs index 64997fbe81fdf..b791a4681ba26 100644 --- a/frame/contracts/src/gas.rs +++ b/frame/contracts/src/gas.rs @@ -16,7 +16,7 @@ use crate::{GasSpent, Module, Trait, BalanceOf, NegativeImbalanceOf}; use rstd::convert::TryFrom; -use sr_primitives::traits::{ +use sp_runtime::traits::{ CheckedMul, Zero, SaturatedConversion, SimpleArithmetic, UniqueSaturatedInto, }; use support::{ diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index e84214a0195b5..166ee467b1636 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -112,7 +112,7 @@ use primitives::crypto::UncheckedFrom; use rstd::{prelude::*, marker::PhantomData, fmt::Debug}; use codec::{Codec, Encode, Decode}; use runtime_io::hashing::blake2_256; -use sr_primitives::{ +use sp_runtime::{ traits::{Hash, StaticLookup, Zero, MaybeSerializeDeserialize, Member, SignedExtension}, transaction_validity::{ ValidTransaction, InvalidTransaction, TransactionValidity, TransactionValidityError, diff --git a/frame/contracts/src/rent.rs b/frame/contracts/src/rent.rs index e286ce307fcc8..00bf4bf911c4b 100644 --- a/frame/contracts/src/rent.rs +++ b/frame/contracts/src/rent.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . use crate::{BalanceOf, ContractInfo, ContractInfoOf, TombstoneContractInfo, Trait, AliveContractInfo}; -use sr_primitives::traits::{Bounded, CheckedDiv, CheckedMul, Saturating, Zero, +use sp_runtime::traits::{Bounded, CheckedDiv, CheckedMul, Saturating, Zero, SaturatedConversion}; use support::traits::{Currency, ExistenceRequirement, Get, WithdrawReason, OnUnbalanced}; use support::StorageMap; diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 6129784d41e35..e2e45ef9c04b1 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -27,7 +27,7 @@ use crate::{ use assert_matches::assert_matches; use hex_literal::*; use codec::{Decode, Encode, KeyedVec}; -use sr_primitives::{ +use sp_runtime::{ Perbill, BuildStorage, transaction_validity::{InvalidTransaction, ValidTransaction}, traits::{BlakeTwo256, Hash, IdentityLookup, SignedExtension}, testing::{Digest, DigestItem, Header, UintAuthorityId, H256}, diff --git a/frame/contracts/src/wasm/code_cache.rs b/frame/contracts/src/wasm/code_cache.rs index e6702d29cf5c7..2c5bd492e2dce 100644 --- a/frame/contracts/src/wasm/code_cache.rs +++ b/frame/contracts/src/wasm/code_cache.rs @@ -30,7 +30,7 @@ use crate::gas::{Gas, GasMeter, Token}; use crate::wasm::{prepare, runtime::Env, PrefabWasmModule}; use crate::{CodeHash, CodeStorage, PristineCode, Schedule, Trait}; use rstd::prelude::*; -use sr_primitives::traits::{Hash, Bounded}; +use sp_runtime::traits::{Hash, Bounded}; use support::StorageMap; /// Gas metering token that used for charging storing code into the code storage. diff --git a/frame/contracts/src/wasm/env_def/macros.rs b/frame/contracts/src/wasm/env_def/macros.rs index af83c366233c6..0f36095048d79 100644 --- a/frame/contracts/src/wasm/env_def/macros.rs +++ b/frame/contracts/src/wasm/env_def/macros.rs @@ -195,7 +195,7 @@ macro_rules! define_env { mod tests { use parity_wasm::elements::FunctionType; use parity_wasm::elements::ValueType; - use sr_primitives::traits::Zero; + use sp_runtime::traits::Zero; use sandbox::{self, ReturnValue, TypedValue}; use crate::wasm::tests::MockExt; use crate::wasm::Runtime; diff --git a/frame/contracts/src/wasm/prepare.rs b/frame/contracts/src/wasm/prepare.rs index 41269772a8551..6a443d63e8626 100644 --- a/frame/contracts/src/wasm/prepare.rs +++ b/frame/contracts/src/wasm/prepare.rs @@ -26,7 +26,7 @@ use parity_wasm::elements::{self, Internal, External, MemoryType, Type, ValueTyp use pwasm_utils; use pwasm_utils::rules; use rstd::prelude::*; -use sr_primitives::traits::{SaturatedConversion}; +use sp_runtime::traits::{SaturatedConversion}; struct ContractModule<'a> { /// A deserialized module. The module is valid (this is Guaranteed by `new` method). diff --git a/frame/contracts/src/wasm/runtime.rs b/frame/contracts/src/wasm/runtime.rs index e53cadaf7b23c..2e69d17bc2381 100644 --- a/frame/contracts/src/wasm/runtime.rs +++ b/frame/contracts/src/wasm/runtime.rs @@ -27,7 +27,7 @@ use rstd::prelude::*; use rstd::convert::TryInto; use rstd::mem; use codec::{Decode, Encode}; -use sr_primitives::traits::{Bounded, SaturatedConversion}; +use sp_runtime::traits::{Bounded, SaturatedConversion}; /// The value returned from ext_call and ext_instantiate contract external functions if the call or /// instantiation traps. This value is chosen as if the execution does not trap, the return value @@ -824,7 +824,7 @@ define_env!(Env, , ext_println(ctx, str_ptr: u32, str_len: u32) => { let data = read_sandbox_memory(ctx, str_ptr, str_len)?; if let Ok(utf8) = core::str::from_utf8(&data) { - sr_primitives::print(utf8); + sp_runtime::print(utf8); } Ok(()) }, diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index b607e8af733fb..a9becc0944487 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -8,14 +8,14 @@ edition = "2018" serde = { version = "1.0.101", optional = true, features = ["derive"] } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } balances = { package = "pallet-balances", path = "../balances" } [features] @@ -27,6 +27,6 @@ std = [ "rstd/std", "runtime-io/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "system/std", ] diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 988f82734c449..54044cd1fa818 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -20,7 +20,7 @@ use rstd::prelude::*; use rstd::{result, convert::TryFrom}; -use sr_primitives::{ +use sp_runtime::{ RuntimeDebug, traits::{Zero, Bounded, CheckedMul, CheckedDiv, EnsureOrigin, Hash, Dispatchable, Saturating}, }; @@ -597,7 +597,7 @@ decl_module! { fn on_initialize(n: T::BlockNumber) { if let Err(e) = Self::begin_block(n) { - sr_primitives::print(e); + sp_runtime::print(e); } } @@ -1092,7 +1092,7 @@ mod tests { weights::Weight, }; use primitives::H256; - use sr_primitives::{traits::{BlakeTwo256, IdentityLookup, Bounded}, testing::Header, Perbill}; + use sp_runtime::{traits::{BlakeTwo256, IdentityLookup, Bounded}, testing::Header, Perbill}; use balances::BalanceLock; use system::EnsureSignedBy; diff --git a/frame/democracy/src/vote_threshold.rs b/frame/democracy/src/vote_threshold.rs index 61e7e6535941a..4262f7d7cf605 100644 --- a/frame/democracy/src/vote_threshold.rs +++ b/frame/democracy/src/vote_threshold.rs @@ -19,11 +19,11 @@ #[cfg(feature = "std")] use serde::{Serialize, Deserialize}; use codec::{Encode, Decode}; -use sr_primitives::traits::{Zero, IntegerSquareRoot}; +use sp_runtime::traits::{Zero, IntegerSquareRoot}; use rstd::ops::{Add, Mul, Div, Rem}; /// A means of determining if a vote is past pass threshold. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, sr_primitives::RuntimeDebug)] +#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, sp_runtime::RuntimeDebug)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub enum VoteThreshold { /// A supermajority of approvals is needed to pass this vote. diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index fbbc49380e0a7..9e7039da91185 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -6,17 +6,17 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -phragmen = { package = "substrate-phragmen", path = "../../primitives/phragmen", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +phragmen = { package = "sp-phragmen", path = "../../primitives/phragmen", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } [dev-dependencies] -runtime_io = { package = "sr-io", path = "../../primitives/sr-io" } +runtime_io = { package = "sp-io", path = "../../primitives/sr-io" } hex-literal = "0.2.1" balances = { package = "pallet-balances", path = "../balances" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } substrate-test-utils = { path = "../../test/utils" } serde = { version = "1.0.101" } @@ -25,7 +25,7 @@ default = ["std"] std = [ "codec/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "phragmen/std", "system/std", "rstd/std", diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index 338ceeba52790..fe0ecede156e8 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -83,7 +83,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::prelude::*; -use sr_primitives::{print, traits::{Zero, StaticLookup, Bounded, Convert}}; +use sp_runtime::{print, traits::{Zero, StaticLookup, Bounded, Convert}}; use support::weights::SimpleDispatchInfo; use support::{ decl_storage, decl_event, ensure, decl_module, dispatch, @@ -746,7 +746,7 @@ mod tests { use support::{assert_ok, assert_noop, parameter_types, weights::Weight}; use substrate_test_utils::assert_eq_uvec; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ Perbill, testing::Header, BuildStorage, traits::{BlakeTwo256, IdentityLookup, Block as BlockT}, }; @@ -857,8 +857,8 @@ mod tests { type BadReport = (); } - pub type Block = sr_primitives::generic::Block; - pub type UncheckedExtrinsic = sr_primitives::generic::UncheckedExtrinsic; + pub type Block = sp_runtime::generic::Block; + pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; support::construct_runtime!( pub enum Test where diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index 62986f758dd76..1c0e06ac00911 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -8,10 +8,10 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } @@ -29,6 +29,6 @@ std = [ "serde", "runtime-io/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "system/std", ] diff --git a/frame/elections/src/lib.rs b/frame/elections/src/lib.rs index e4426c22d8109..1a289eb23f8ec 100644 --- a/frame/elections/src/lib.rs +++ b/frame/elections/src/lib.rs @@ -24,7 +24,7 @@ #![recursion_limit="128"] use rstd::prelude::*; -use sr_primitives::{ +use sp_runtime::{ RuntimeDebug, print, traits::{Zero, One, StaticLookup, Bounded, Saturating}, diff --git a/frame/elections/src/mock.rs b/frame/elections/src/mock.rs index 173a45a248586..692d42cc1bcc6 100644 --- a/frame/elections/src/mock.rs +++ b/frame/elections/src/mock.rs @@ -25,7 +25,7 @@ use support::{ weights::Weight, }; use primitives::H256; -use sr_primitives::{ +use sp_runtime::{ Perbill, BuildStorage, testing::Header, traits::{BlakeTwo256, IdentityLookup, Block as BlockT}, }; use crate as elections; @@ -142,8 +142,8 @@ impl elections::Trait for Test { type DecayRatio = DecayRatio; } -pub type Block = sr_primitives::generic::Block; -pub type UncheckedExtrinsic = sr_primitives::generic::UncheckedExtrinsic; +pub type Block = sp_runtime::generic::Block; +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; support::construct_runtime!( pub enum Test where diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index 2318fe59a44cd..9cb59b67841dd 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -11,10 +11,10 @@ support = { package = "frame-support", path = "../support", default-features = f system = { package = "frame-system", path = "../system", default-features = false } timestamp = { package = "pallet-timestamp", path = "../timestamp", default-features = false } balances = { package = "pallet-balances", path = "../balances", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } primitive-types = { version = "0.6", default-features = false, features = ["rlp"] } rlp = { version = "0.4", default-features = false } evm = { version = "0.14", default-features = false } @@ -26,7 +26,7 @@ std = [ "serde", "codec/std", "primitives/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", "balances/std", diff --git a/frame/evm/src/backend.rs b/frame/evm/src/backend.rs index 1f3dfe309b4ee..18d8a011582be 100644 --- a/frame/evm/src/backend.rs +++ b/frame/evm/src/backend.rs @@ -4,7 +4,7 @@ use rstd::vec::Vec; use serde::{Serialize, Deserialize}; use codec::{Encode, Decode}; use primitives::{U256, H256, H160}; -use sr_primitives::traits::UniqueSaturatedInto; +use sp_runtime::traits::UniqueSaturatedInto; use support::storage::{StorageMap, StorageDoubleMap}; use sha3::{Keccak256, Digest}; use evm::Config; diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index 9a602d9077e52..13be83dccf9f8 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -27,9 +27,9 @@ use rstd::vec::Vec; use support::{dispatch::Result, decl_module, decl_storage, decl_event}; use support::traits::{Currency, WithdrawReason, ExistenceRequirement}; use system::ensure_signed; -use sr_primitives::ModuleId; +use sp_runtime::ModuleId; use support::weights::SimpleDispatchInfo; -use sr_primitives::traits::{UniqueSaturatedInto, AccountIdConversion}; +use sp_runtime::traits::{UniqueSaturatedInto, AccountIdConversion}; use primitives::{U256, H256, H160}; use evm::{ExitReason, ExitSucceed, ExitError}; use evm::executor::StackExecutor; diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index bcad107a0764d..e76447b03ab43 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -10,19 +10,19 @@ codec = { package = "parity-scale-codec", version = "1.0.0", default-features = support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } balances = { package = "pallet-balances", path = "../balances", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] std = [ "serde", "codec/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", "balances/std", diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index a73e0d2868884..3e201f7a9b468 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -260,7 +260,7 @@ use support::{ }; use system::{ensure_signed, ensure_root}; use codec::{Encode, Decode}; -use sr_primitives::{ +use sp_runtime::{ traits::{SignedExtension, Bounded, SaturatedConversion}, transaction_validity::{ ValidTransaction, TransactionValidityError, InvalidTransaction, TransactionValidity, @@ -581,7 +581,7 @@ impl Module { // sender of the transaction (if signed) are also provided. // // The full list of hooks that can be added to a signed extension can be found -// [here](https://crates.parity.io/sr_primitives/traits/trait.SignedExtension.html). +// [here](https://crates.parity.io/sp_runtime/traits/trait.SignedExtension.html). // // The signed extensions are aggregated in the runtime file of a substrate chain. All extensions // should be aggregated in a tuple and passed to the `CheckedExtrinsic` and `UncheckedExtrinsic` @@ -630,7 +630,7 @@ impl SignedExtension for WatchDummy { // check for `set_dummy` match call { Call::set_dummy(..) => { - sr_primitives::print("set_dummy was received."); + sp_runtime::print("set_dummy was received."); let mut valid_tx = ValidTransaction::default(); valid_tx.priority = Bounded::max_value(); @@ -649,7 +649,7 @@ mod tests { use primitives::H256; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. - use sr_primitives::{ + use sp_runtime::{ Perbill, testing::Header, traits::{BlakeTwo256, OnInitialize, OnFinalize, IdentityLookup}, }; diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index bc10d71f42594..f4eb4fb76cb54 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -7,15 +7,15 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] hex-literal = "0.2.1" -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } pallet-indices = { path = "../indices" } balances = { package = "pallet-balances", path = "../balances" } transaction-payment = { package = "pallet-transaction-payment", path = "../transaction-payment" } @@ -27,7 +27,7 @@ std = [ "support/std", "serde", "codec/std", - "sr-primitives/std", + "sp-runtime/std", "runtime-io/std", "system/std", ] diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index d5dc5fa135f4b..35d44f53e08c9 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -50,7 +50,7 @@ //! `Executive` type declaration from the node template. //! //! ``` -//! # use sr_primitives::generic; +//! # use sp_runtime::generic; //! # use frame_executive as executive; //! # pub struct UncheckedExtrinsic {}; //! # pub struct Header {}; @@ -59,9 +59,9 @@ //! # pub type Balances = u64; //! # pub type AllModules = u64; //! # pub enum Runtime {}; -//! # use sr_primitives::transaction_validity::{TransactionValidity, UnknownTransaction}; +//! # use sp_runtime::transaction_validity::{TransactionValidity, UnknownTransaction}; //! # #[allow(deprecated)] -//! # use sr_primitives::traits::ValidateUnsigned; +//! # use sp_runtime::traits::ValidateUnsigned; //! # #[allow(deprecated)] //! # impl ValidateUnsigned for Runtime { //! # type Call = (); @@ -78,7 +78,7 @@ use rstd::{prelude::*, marker::PhantomData}; use support::weights::{GetDispatchInfo, WeighBlock, DispatchInfo}; -use sr_primitives::{ +use sp_runtime::{ generic::Digest, ApplyExtrinsicResult, traits::{ self, Header, Zero, One, Checkable, Applyable, CheckEqual, OnFinalize, OnInitialize, @@ -87,7 +87,7 @@ use sr_primitives::{ transaction_validity::TransactionValidity, }; #[allow(deprecated)] -use sr_primitives::traits::ValidateUnsigned; +use sp_runtime::traits::ValidateUnsigned; use codec::{Codec, Encode}; use system::{extrinsics_root, DigestOf}; @@ -243,7 +243,7 @@ where let l = uxt.encode().len(); match Self::apply_extrinsic_with_len(uxt, l, None) { Ok(Ok(())) => (), - Ok(Err(e)) => sr_primitives::print(e), + Ok(Err(e)) => sp_runtime::print(e), Err(e) => { let err: &'static str = e.into(); panic!(err) }, } } @@ -320,7 +320,7 @@ where mod tests { use super::*; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ generic::Era, Perbill, DispatchError, testing::{Digest, Header, Block}, traits::{Bounded, Header as HeaderT, BlakeTwo256, IdentityLookup, ConvertInto}, transaction_validity::{InvalidTransaction, UnknownTransaction, TransactionValidityError}, @@ -468,7 +468,7 @@ mod tests { transaction_payment::ChargeTransactionPayment ); type AllModules = (System, Balances, Custom); - type TestXt = sr_primitives::testing::TestXt; + type TestXt = sp_runtime::testing::TestXt; type Executive = super::Executive, ChainContext, Runtime, AllModules>; fn extra(nonce: u64, fee: u64) -> SignedExtra { @@ -491,7 +491,7 @@ mod tests { balances: vec![(1, 211)], vesting: vec![], }.assimilate_storage(&mut t).unwrap(); - let xt = sr_primitives::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(2, 69))); + let xt = sp_runtime::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(2, 69))); let weight = xt.get_dispatch_info().weight as u64; let mut t = runtime_io::TestExternalities::new(t); t.execute_with(|| { @@ -572,7 +572,7 @@ mod tests { fn bad_extrinsic_not_inserted() { let mut t = new_test_ext(1); // bad nonce check! - let xt = sr_primitives::testing::TestXt(sign_extra(1, 30, 0), Call::Balances(BalancesCall::transfer(33, 69))); + let xt = sp_runtime::testing::TestXt(sign_extra(1, 30, 0), Call::Balances(BalancesCall::transfer(33, 69))); t.execute_with(|| { Executive::initialize_block(&Header::new( 1, @@ -590,7 +590,7 @@ mod tests { fn block_weight_limit_enforced() { let mut t = new_test_ext(10000); // given: TestXt uses the encoded len as fixed Len: - let xt = sr_primitives::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let xt = sp_runtime::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); let encoded = xt.encode(); let encoded_len = encoded.len() as Weight; let limit = AvailableBlockRatio::get() * MaximumBlockWeight::get() - 175; @@ -607,7 +607,7 @@ mod tests { assert_eq!(>::all_extrinsics_weight(), 175); for nonce in 0..=num_to_exhaust_block { - let xt = sr_primitives::testing::TestXt( + let xt = sp_runtime::testing::TestXt( sign_extra(1, nonce.into(), 0), Call::Balances(BalancesCall::transfer(33, 0)), ); let res = Executive::apply_extrinsic(xt); @@ -627,9 +627,9 @@ mod tests { #[test] fn block_weight_and_size_is_stored_per_tx() { - let xt = sr_primitives::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); - let x1 = sr_primitives::testing::TestXt(sign_extra(1, 1, 0), Call::Balances(BalancesCall::transfer(33, 0))); - let x2 = sr_primitives::testing::TestXt(sign_extra(1, 2, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let xt = sp_runtime::testing::TestXt(sign_extra(1, 0, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let x1 = sp_runtime::testing::TestXt(sign_extra(1, 1, 0), Call::Balances(BalancesCall::transfer(33, 0))); + let x2 = sp_runtime::testing::TestXt(sign_extra(1, 2, 0), Call::Balances(BalancesCall::transfer(33, 0))); let len = xt.clone().encode().len() as u32; let mut t = new_test_ext(1); t.execute_with(|| { @@ -653,7 +653,7 @@ mod tests { #[test] fn validate_unsigned() { - let xt = sr_primitives::testing::TestXt(None, Call::Balances(BalancesCall::set_balance(33, 69, 69))); + let xt = sp_runtime::testing::TestXt(None, Call::Balances(BalancesCall::set_balance(33, 69, 69))); let mut t = new_test_ext(1); t.execute_with(|| { @@ -682,7 +682,7 @@ mod tests { Bounded::max_value(), lock, ); - let xt = sr_primitives::testing::TestXt( + let xt = sp_runtime::testing::TestXt( sign_extra(1, 0, 0), Call::System(SystemCall::remark(vec![1u8])), ); diff --git a/frame/finality-tracker/Cargo.toml b/frame/finality-tracker/Cargo.toml index 6fb767f0d0c8a..e3dd7b1428717 100644 --- a/frame/finality-tracker/Cargo.toml +++ b/frame/finality-tracker/Cargo.toml @@ -7,17 +7,17 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } sp-finality-tracker = { path = "../../primitives/finality-tracker", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } frame-system = { path = "../system", default-features = false } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } [features] default = ["std"] @@ -26,7 +26,7 @@ std = [ "codec/std", "rstd/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "frame-system/std", "sp-finality-tracker/std", "inherents/std", diff --git a/frame/finality-tracker/src/lib.rs b/frame/finality-tracker/src/lib.rs index 2be496ab459a2..3cb842de24e68 100644 --- a/frame/finality-tracker/src/lib.rs +++ b/frame/finality-tracker/src/lib.rs @@ -19,7 +19,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use inherents::{InherentIdentifier, ProvideInherent, InherentData, MakeFatalError}; -use sr_primitives::traits::{One, Zero, SaturatedConversion}; +use sp_runtime::traits::{One, Zero, SaturatedConversion}; use rstd::{prelude::*, result, cmp, vec}; use support::{decl_module, decl_storage}; use support::traits::Get; @@ -195,7 +195,7 @@ mod tests { use runtime_io::TestExternalities; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ testing::Header, Perbill, traits::{BlakeTwo256, IdentityLookup, OnFinalize, Header as HeaderT}, }; diff --git a/frame/generic-asset/Cargo.toml b/frame/generic-asset/Cargo.toml index f8ea4c020fb89..210bc7773a25f 100644 --- a/frame/generic-asset/Cargo.toml +++ b/frame/generic-asset/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] @@ -22,7 +22,7 @@ std =[ "serde/std", "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", ] diff --git a/frame/generic-asset/src/lib.rs b/frame/generic-asset/src/lib.rs index a552880a34b62..57942ae186812 100644 --- a/frame/generic-asset/src/lib.rs +++ b/frame/generic-asset/src/lib.rs @@ -153,8 +153,8 @@ use codec::{Decode, Encode, HasCompact, Input, Output, Error}; -use sr_primitives::RuntimeDebug; -use sr_primitives::traits::{ +use sp_runtime::RuntimeDebug; +use sp_runtime::traits::{ CheckedAdd, CheckedSub, MaybeSerializeDeserialize, Member, One, Saturating, SimpleArithmetic, Zero, Bounded, }; diff --git a/frame/generic-asset/src/mock.rs b/frame/generic-asset/src/mock.rs index 36dea84d66d58..28d6f96de116f 100644 --- a/frame/generic-asset/src/mock.rs +++ b/frame/generic-asset/src/mock.rs @@ -20,7 +20,7 @@ #![cfg(test)] -use sr_primitives::{ +use sp_runtime::{ Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup}, diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index f086968a2280d..d463e216ed6a0 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -7,18 +7,18 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -substrate-finality-grandpa-primitives = { path = "../../primitives/finality-grandpa", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +sp-finality-granpda = { path = "../../primitives/finality-grandpa", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } session = { package = "pallet-session", path = "../session", default-features = false } finality-tracker = { package = "pallet-finality-tracker", path = "../finality-tracker", default-features = false } [dev-dependencies] -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io" } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io" } [features] default = ["std"] @@ -26,11 +26,11 @@ std = [ "serde", "codec/std", "primitives/std", - "substrate-finality-grandpa-primitives/std", + "sp-finality-granpda/std", "rstd/std", "support/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "system/std", "session/std", "finality-tracker/std", diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 877521c9746d9..0c4c6b202e53e 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -28,15 +28,15 @@ #![cfg_attr(not(feature = "std"), no_std)] // re-export since this is necessary for `impl_apis` in runtime. -pub use substrate_finality_grandpa_primitives as fg_primitives; +pub use sp_finality_granpda as fg_primitives; use rstd::prelude::*; use codec::{self as codec, Encode, Decode, Error}; use support::{decl_event, decl_storage, decl_module, dispatch::Result, storage}; -use sr_primitives::{ +use sp_runtime::{ generic::{DigestItem, OpaqueDigestItemId}, traits::Zero, Perbill, }; -use sr_staking_primitives::{ +use sp_staking::{ SessionIndex, offence::{Offence, Kind}, }; @@ -400,7 +400,7 @@ impl Module { } } -impl sr_primitives::BoundToRuntimeAppPublic for Module { +impl sp_runtime::BoundToRuntimeAppPublic for Module { type Public = AuthorityId; } diff --git a/frame/grandpa/src/mock.rs b/frame/grandpa/src/mock.rs index 3fdf807f24ad1..75de98cdf9acd 100644 --- a/frame/grandpa/src/mock.rs +++ b/frame/grandpa/src/mock.rs @@ -18,13 +18,13 @@ #![cfg(test)] -use sr_primitives::{Perbill, DigestItem, traits::IdentityLookup, testing::{Header, UintAuthorityId}}; +use sp_runtime::{Perbill, DigestItem, traits::IdentityLookup, testing::{Header, UintAuthorityId}}; use runtime_io; use support::{impl_outer_origin, impl_outer_event, parameter_types, weights::Weight}; use primitives::H256; use codec::{Encode, Decode}; use crate::{AuthorityId, AuthorityList, GenesisConfig, Trait, Module, ConsensusLog}; -use substrate_finality_grandpa_primitives::GRANDPA_ENGINE_ID; +use sp_finality_granpda::GRANDPA_ENGINE_ID; impl_outer_origin!{ pub enum Origin for Test {} @@ -53,7 +53,7 @@ impl system::Trait for Test { type BlockNumber = u64; type Call = (); type Hash = H256; - type Hashing = sr_primitives::traits::BlakeTwo256; + type Hashing = sp_runtime::traits::BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/grandpa/src/tests.rs b/frame/grandpa/src/tests.rs index 3d6a8752c5de3..9ca00fd169f6f 100644 --- a/frame/grandpa/src/tests.rs +++ b/frame/grandpa/src/tests.rs @@ -18,7 +18,7 @@ #![cfg(test)] -use sr_primitives::{testing::Digest, traits::{Header, OnFinalize}}; +use sp_runtime::{testing::Digest, traits::{Header, OnFinalize}}; use crate::mock::*; use system::{EventRecord, Phase}; use codec::{Decode, Encode}; @@ -312,7 +312,7 @@ fn time_slot_have_sane_ord() { #[test] #[cfg(feature = "migrate-authorities")] fn authorities_migration() { - use sr_primitives::traits::OnInitialize; + use sp_runtime::traits::OnInitialize; with_externalities(&mut new_test_ext(vec![]), || { let authorities = to_authorities(vec![(1, 1), (2, 1), (3, 1)]); diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index d0959da892205..3c7acb3b20918 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -5,16 +5,16 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto", default-features = false } authorship = { package = "pallet-authorship", path = "../authorship", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package="substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +primitives = { package="sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } serde = { version = "1.0.101", optional = true } session = { package = "pallet-session", path = "../session", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } @@ -29,8 +29,8 @@ std = [ "serde", "session/std", "runtime-io/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "support/std", "system/std", ] diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index 8f3361186ff5b..7892054b7f7a5 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -76,7 +76,7 @@ use primitives::offchain::{OpaqueNetworkState, StorageKind}; use rstd::prelude::*; use rstd::convert::TryInto; use session::historical::IdentificationTuple; -use sr_primitives::{ +use sp_runtime::{ RuntimeDebug, traits::{Convert, Member, Printable, Saturating}, Perbill, transaction_validity::{ @@ -84,7 +84,7 @@ use sr_primitives::{ TransactionPriority, }, }; -use sr_staking_primitives::{ +use sp_staking::{ SessionIndex, offence::{ReportOffence, Offence, Kind}, }; @@ -509,7 +509,7 @@ impl Module { } } -impl sr_primitives::BoundToRuntimeAppPublic for Module { +impl sp_runtime::BoundToRuntimeAppPublic for Module { type Public = T::AuthorityId; } diff --git a/frame/im-online/src/mock.rs b/frame/im-online/src/mock.rs index 650353e6f9ac3..03cf96cd28742 100644 --- a/frame/im-online/src/mock.rs +++ b/frame/im-online/src/mock.rs @@ -21,10 +21,10 @@ use std::cell::RefCell; use crate::{Module, Trait}; -use sr_primitives::Perbill; -use sr_staking_primitives::{SessionIndex, offence::ReportOffence}; -use sr_primitives::testing::{Header, UintAuthorityId, TestXt}; -use sr_primitives::traits::{IdentityLookup, BlakeTwo256, ConvertInto}; +use sp_runtime::Perbill; +use sp_staking::{SessionIndex, offence::ReportOffence}; +use sp_runtime::testing::{Header, UintAuthorityId, TestXt}; +use sp_runtime::traits::{IdentityLookup, BlakeTwo256, ConvertInto}; use primitives::H256; use support::{impl_outer_origin, impl_outer_dispatch, parameter_types, weights::Weight}; use {runtime_io, system}; diff --git a/frame/im-online/src/tests.rs b/frame/im-online/src/tests.rs index 788956ba6e070..0145b7c4feb21 100644 --- a/frame/im-online/src/tests.rs +++ b/frame/im-online/src/tests.rs @@ -27,7 +27,7 @@ use primitives::offchain::{ testing::{TestOffchainExt, TestTransactionPoolExt}, }; use support::{dispatch, assert_noop}; -use sr_primitives::testing::UintAuthorityId; +use sp_runtime::testing::UintAuthorityId; #[test] fn test_unresponsiveness_slash_fraction() { diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index 17fe99ed92896..2d2a41a55122f 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -8,11 +8,11 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -substrate-keyring = { path = "../../primitives/keyring", optional = true } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } +sp-keyring = { path = "../../primitives/keyring", optional = true } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } @@ -24,12 +24,12 @@ default = ["std"] std = [ "serde", "safe-mix/std", - "substrate-keyring", + "sp-keyring", "codec/std", "primitives/std", "rstd/std", "runtime-io/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "system/std", ] diff --git a/frame/indices/src/address.rs b/frame/indices/src/address.rs index 21ee654cf2e3f..cfc9bcabaa2c7 100644 --- a/frame/indices/src/address.rs +++ b/frame/indices/src/address.rs @@ -24,7 +24,7 @@ use codec::{Encode, Decode, Input, Output, Error}; /// An indices-aware address, which can be either a direct `AccountId` or /// an index. -#[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)] #[cfg_attr(feature = "std", derive(Hash))] pub enum Address where AccountId: Member, diff --git a/frame/indices/src/lib.rs b/frame/indices/src/lib.rs index 31aa57276bde9..d53a26f77c216 100644 --- a/frame/indices/src/lib.rs +++ b/frame/indices/src/lib.rs @@ -22,7 +22,7 @@ use rstd::{prelude::*, marker::PhantomData, convert::TryInto}; use codec::{Encode, Codec}; use support::{Parameter, decl_module, decl_event, decl_storage}; -use sr_primitives::traits::{One, SimpleArithmetic, StaticLookup, Member, LookupError}; +use sp_runtime::traits::{One, SimpleArithmetic, StaticLookup, Member, LookupError}; use system::{IsDeadAccount, OnNewAccount}; use self::address::Address as RawAddress; diff --git a/frame/indices/src/mock.rs b/frame/indices/src/mock.rs index 43b009a54491f..880ff5d66e640 100644 --- a/frame/indices/src/mock.rs +++ b/frame/indices/src/mock.rs @@ -20,8 +20,8 @@ use std::collections::HashSet; use ref_thread_local::{ref_thread_local, RefThreadLocal}; -use sr_primitives::testing::Header; -use sr_primitives::Perbill; +use sp_runtime::testing::Header; +use sp_runtime::Perbill; use primitives::H256; use support::{impl_outer_origin, parameter_types, weights::Weight}; use {runtime_io, system}; @@ -77,7 +77,7 @@ impl system::Trait for Runtime { type BlockNumber = u64; type Call = (); type Hash = H256; - type Hashing = ::sr_primitives::traits::BlakeTwo256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = u64; type Lookup = Indices; type Header = Header; diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index 12c81aa741f92..9f8dbdbf06ef7 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -7,21 +7,21 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] std = [ "serde", "codec/std", - "sr-primitives/std", + "sp-runtime/std", "rstd/std", "runtime-io/std", "support/std", diff --git a/frame/membership/src/lib.rs b/frame/membership/src/lib.rs index 0adddc1816d18..d18c107d6630f 100644 --- a/frame/membership/src/lib.rs +++ b/frame/membership/src/lib.rs @@ -29,7 +29,7 @@ use support::{ weights::SimpleDispatchInfo, }; use system::ensure_root; -use sr_primitives::traits::EnsureOrigin; +use sp_runtime::traits::EnsureOrigin; pub trait Trait: system::Trait { /// The overarching event type. @@ -198,7 +198,7 @@ mod tests { use primitives::H256; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried. - use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; + use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; use system::EnsureSignedBy; impl_outer_origin! { diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index 0fc604bea498c..5ed5293633aac 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } [features] default = ["std"] diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index aa2df57af514d..55abb0b27db87 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } balances = { package = "pallet-balances", path = "../balances", default-features = false } [features] @@ -24,7 +24,7 @@ std = [ "codec/std", "rstd/std", "runtime-io/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", ] diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index a82b3d15a99e7..cb35b1dba0c29 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -39,7 +39,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::prelude::*; -use sr_primitives::{ +use sp_runtime::{ traits::{StaticLookup, EnsureOrigin, Zero} }; use support::{ @@ -234,7 +234,7 @@ mod tests { use system::EnsureSignedBy; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. - use sr_primitives::{ + use sp_runtime::{ Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup}, }; diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index 354de90e853c9..56be89d11969b 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -7,16 +7,16 @@ edition = "2018" [dependencies] balances = { package = "pallet-balances", path = "../balances", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } serde = { version = "1.0.101", optional = true } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -runtime-io = { package = "sr-io", path = "../../primitives/sr-io" } -substrate-primitives = { path = "../../primitives/core" } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io" } +sp-core = { path = "../../primitives/core" } [features] default = ["std"] @@ -25,8 +25,8 @@ std = [ "codec/std", "rstd/std", "serde", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "support/std", "system/std", ] diff --git a/frame/offences/src/lib.rs b/frame/offences/src/lib.rs index ce9a1a0a41bae..eb1f2abc3cce3 100644 --- a/frame/offences/src/lib.rs +++ b/frame/offences/src/lib.rs @@ -28,8 +28,8 @@ use rstd::vec::Vec; use support::{ decl_module, decl_event, decl_storage, Parameter, }; -use sr_primitives::traits::Hash; -use sr_staking_primitives::{ +use sp_runtime::traits::Hash; +use sp_staking::{ offence::{Offence, ReportOffence, Kind, OnOffenceHandler, OffenceDetails}, }; use codec::{Encode, Decode}; diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index dc331b3147da3..ad1d0f8b268c4 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -21,14 +21,14 @@ use std::cell::RefCell; use crate::{Module, Trait}; use codec::Encode; -use sr_primitives::Perbill; -use sr_staking_primitives::{ +use sp_runtime::Perbill; +use sp_staking::{ SessionIndex, offence::{self, Kind, OffenceDetails}, }; -use sr_primitives::testing::Header; -use sr_primitives::traits::{IdentityLookup, BlakeTwo256}; -use substrate_primitives::H256; +use sp_runtime::testing::Header; +use sp_runtime::traits::{IdentityLookup, BlakeTwo256}; +use sp_core::H256; use support::{ impl_outer_origin, impl_outer_event, parameter_types, StorageMap, StorageDoubleMap, weights::Weight, diff --git a/frame/offences/src/tests.rs b/frame/offences/src/tests.rs index aa71d1d6206a7..134c7a3cb06da 100644 --- a/frame/offences/src/tests.rs +++ b/frame/offences/src/tests.rs @@ -23,7 +23,7 @@ use crate::mock::{ Offences, System, Offence, TestEvent, KIND, new_test_ext, with_on_offence_fractions, offence_reports, }; -use sr_primitives::Perbill; +use sp_runtime::Perbill; use system::{EventRecord, Phase}; #[test] diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index b76f908500197..291a321776373 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dependencies] safe-mix = { version = "1.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io" } [features] default = ["std"] @@ -23,6 +23,6 @@ std = [ "system/std", "codec/std", "support/std", - "sr-primitives/std", + "sp-runtime/std", "rstd/std", ] diff --git a/frame/randomness-collective-flip/src/lib.rs b/frame/randomness-collective-flip/src/lib.rs index ba5f0f79f4717..1a719ac915537 100644 --- a/frame/randomness-collective-flip/src/lib.rs +++ b/frame/randomness-collective-flip/src/lib.rs @@ -53,7 +53,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::{prelude::*, convert::TryInto}; -use sr_primitives::traits::Hash; +use sp_runtime::traits::Hash; use support::{decl_module, decl_storage, traits::Randomness}; use safe_mix::TripletMix; use codec::Encode; @@ -153,7 +153,7 @@ impl Randomness for Module { mod tests { use super::*; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ Perbill, traits::{BlakeTwo256, OnInitialize, Header as _, IdentityLookup}, testing::Header, }; use support::{impl_outer_origin, parameter_types, weights::Weight, traits::Randomness}; diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index cebb071003204..2dd64dfb923a3 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -7,15 +7,15 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] balances = { package = "pallet-balances", path = "../balances" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] @@ -23,7 +23,7 @@ std = [ "codec/std", "serde", "runtime-io/std", - "sr-primitives/std", + "sp-runtime/std", "rstd/std", "support/std", "system/std", diff --git a/frame/scored-pool/src/lib.rs b/frame/scored-pool/src/lib.rs index 39cffdb77f8e7..8a2bfb9051a57 100644 --- a/frame/scored-pool/src/lib.rs +++ b/frame/scored-pool/src/lib.rs @@ -98,7 +98,7 @@ use support::{ traits::{ChangeMembers, InitializeMembers, Currency, Get, ReservableCurrency}, }; use system::{self, ensure_root, ensure_signed}; -use sr_primitives::{ +use sp_runtime::{ traits::{EnsureOrigin, SimpleArithmetic, MaybeSerializeDeserialize, Zero, StaticLookup}, }; diff --git a/frame/scored-pool/src/mock.rs b/frame/scored-pool/src/mock.rs index b2e1b29cbf22b..353e71882e936 100644 --- a/frame/scored-pool/src/mock.rs +++ b/frame/scored-pool/src/mock.rs @@ -23,7 +23,7 @@ use support::{impl_outer_origin, parameter_types, weights::Weight}; use primitives::H256; // The testing primitives are very useful for avoiding having to work with signatures // or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried. -use sr_primitives::{ +use sp_runtime::{ Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header, }; use system::EnsureSignedBy; diff --git a/frame/scored-pool/src/tests.rs b/frame/scored-pool/src/tests.rs index 2f47b5da6fe26..20aff6618abd2 100644 --- a/frame/scored-pool/src/tests.rs +++ b/frame/scored-pool/src/tests.rs @@ -20,7 +20,7 @@ use super::*; use mock::*; use support::{assert_ok, assert_noop}; -use sr_primitives::traits::OnInitialize; +use sp_runtime::traits::OnInitialize; type ScoredPool = Module; type System = system::Module; diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index b93111d26266c..62651879126d6 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -8,33 +8,33 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } timestamp = { package = "pallet-timestamp", path = "../timestamp", default-features = false } -substrate-trie = { path = "../../primitives/trie", default-features = false, optional = true } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } +sp-trie = { path = "../../primitives/trie", default-features = false, optional = true } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } -app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" } +primitives = { package = "sp-core", path = "../../primitives/core" } +app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto" } lazy_static = "1.4.0" [features] default = ["std", "historical"] -historical = ["substrate-trie"] +historical = ["sp-trie"] std = [ "serde", "safe-mix/std", "codec/std", "rstd/std", "support/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "timestamp/std", - "substrate-trie/std", + "sp-trie/std", "runtime-io/std", ] diff --git a/frame/session/src/historical.rs b/frame/session/src/historical.rs index 7975da4998324..c693313327723 100644 --- a/frame/session/src/historical.rs +++ b/frame/session/src/historical.rs @@ -27,12 +27,12 @@ use rstd::prelude::*; use codec::{Encode, Decode}; -use sr_primitives::KeyTypeId; -use sr_primitives::traits::{Convert, OpaqueKeys, Hash as HashT}; +use sp_runtime::KeyTypeId; +use sp_runtime::traits::{Convert, OpaqueKeys, Hash as HashT}; use support::{decl_module, decl_storage}; use support::{Parameter, print}; -use substrate_trie::{MemoryDB, Trie, TrieMut, Recorder, EMPTY_PREFIX}; -use substrate_trie::trie_types::{TrieDBMut, TrieDB}; +use sp_trie::{MemoryDB, Trie, TrieMut, Recorder, EMPTY_PREFIX}; +use sp_trie::trie_types::{TrieDBMut, TrieDB}; use super::{SessionIndex, Module as SessionModule}; type ValidatorCount = u32; @@ -214,7 +214,7 @@ impl ProvingTrie { } fn from_nodes(root: T::Hash, nodes: &[Vec]) -> Self { - use substrate_trie::HashDBT; + use sp_trie::HashDBT; let mut memory_db = MemoryDB::default(); for node in nodes { @@ -311,7 +311,7 @@ impl> support::traits::KeyOwnerProofSystem<(KeyTypeId, mod tests { use super::*; use primitives::crypto::key_types::DUMMY; - use sr_primitives::{traits::OnInitialize, testing::UintAuthorityId}; + use sp_runtime::{traits::OnInitialize, testing::UintAuthorityId}; use crate::mock::{ NEXT_VALIDATORS, force_new_session, set_next_validators, Test, System, Session, diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 0e35ae45a6101..cf73c9d0fb341 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -121,10 +121,10 @@ use rstd::{prelude::*, marker::PhantomData, ops::{Sub, Rem}}; use codec::Decode; -use sr_primitives::{KeyTypeId, Perbill, RuntimeAppPublic, BoundToRuntimeAppPublic}; +use sp_runtime::{KeyTypeId, Perbill, RuntimeAppPublic, BoundToRuntimeAppPublic}; use support::weights::SimpleDispatchInfo; -use sr_primitives::traits::{Convert, Zero, Member, OpaqueKeys}; -use sr_staking_primitives::SessionIndex; +use sp_runtime::traits::{Convert, Zero, Member, OpaqueKeys}; +use sp_staking::SessionIndex; use support::{dispatch::Result, ConsensusEngineId, decl_module, decl_event, decl_storage}; use support::{ensure, traits::{OnFreeBalanceZero, Get, FindAuthor}, Parameter}; use system::{self, ensure_signed}; @@ -307,7 +307,7 @@ impl SessionHandler for Tuple { /// `SessionHandler` for tests that use `UintAuthorityId` as `Keys`. pub struct TestSessionHandler; impl SessionHandler for TestSessionHandler { - const KEY_TYPE_IDS: &'static [KeyTypeId] = &[sr_primitives::key_types::DUMMY]; + const KEY_TYPE_IDS: &'static [KeyTypeId] = &[sp_runtime::key_types::DUMMY]; fn on_genesis_session(_: &[(AId, Ks)]) {} @@ -716,7 +716,7 @@ mod tests { use super::*; use support::assert_ok; use primitives::crypto::key_types::DUMMY; - use sr_primitives::{traits::OnInitialize, testing::UintAuthorityId}; + use sp_runtime::{traits::OnInitialize, testing::UintAuthorityId}; use mock::{ NEXT_VALIDATORS, SESSION_CHANGED, TEST_SESSION_CHANGED, authorities, force_new_session, set_next_validators, set_session_length, session_changed, Test, Origin, System, Session, diff --git a/frame/session/src/mock.rs b/frame/session/src/mock.rs index 4a2c1d45c3adc..9ee95d208b7d6 100644 --- a/frame/session/src/mock.rs +++ b/frame/session/src/mock.rs @@ -20,11 +20,11 @@ use super::*; use std::cell::RefCell; use support::{impl_outer_origin, parameter_types, weights::Weight}; use primitives::{crypto::key_types::DUMMY, H256}; -use sr_primitives::{ +use sp_runtime::{ Perbill, impl_opaque_keys, traits::{BlakeTwo256, IdentityLookup, ConvertInto}, testing::{Header, UintAuthorityId} }; -use sr_staking_primitives::SessionIndex; +use sp_staking::SessionIndex; impl_opaque_keys! { pub struct MockSessionKeys { @@ -66,7 +66,7 @@ impl ShouldEndSession for TestShouldEndSession { pub struct TestSessionHandler; impl SessionHandler for TestSessionHandler { - const KEY_TYPE_IDS: &'static [sr_primitives::KeyTypeId] = &[UintAuthorityId::ID]; + const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; fn on_genesis_session(_validators: &[(u64, T)]) {} fn on_new_session( changed: bool, @@ -204,7 +204,7 @@ impl Trait for Test { #[cfg(feature = "historical")] impl crate::historical::Trait for Test { type FullIdentification = u64; - type FullIdentificationOf = sr_primitives::traits::ConvertInto; + type FullIdentificationOf = sp_runtime::traits::ConvertInto; } pub type System = system::Module; diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 110c3d868c223..9f410395dd620 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -8,19 +8,19 @@ edition = "2018" serde = { version = "1.0.101", optional = true } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -substrate-keyring = { path = "../../primitives/keyring", optional = true } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -phragmen = { package = "substrate-phragmen", path = "../../primitives/phragmen", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-staking-primitives = { path = "../../primitives/sr-staking-primitives", default-features = false } +sp-keyring = { path = "../../primitives/keyring", optional = true } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +phragmen = { package = "sp-phragmen", path = "../../primitives/phragmen", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-staking = { path = "../../primitives/sr-staking-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } session = { package = "pallet-session", path = "../session", default-features = false, features = ["historical"] } authorship = { package = "pallet-authorship", path = "../authorship", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } balances = { package = "pallet-balances", path = "../balances" } timestamp = { package = "pallet-timestamp", path = "../timestamp" } pallet-staking-reward-curve = { path = "../staking/reward-curve"} @@ -33,14 +33,14 @@ default = ["std", "equalize"] std = [ "serde", "safe-mix/std", - "substrate-keyring", + "sp-keyring", "codec/std", "rstd/std", "phragmen/std", "runtime-io/std", "support/std", - "sr-primitives/std", - "sr-staking-primitives/std", + "sp-runtime/std", + "sp-staking/std", "session/std", "system/std", "authorship/std", diff --git a/frame/staking/reward-curve/Cargo.toml b/frame/staking/reward-curve/Cargo.toml index 11ce7cefb4caa..0df68a43af23d 100644 --- a/frame/staking/reward-curve/Cargo.toml +++ b/frame/staking/reward-curve/Cargo.toml @@ -14,4 +14,4 @@ proc-macro2 = "1.0.6" proc-macro-crate = "0.1.4" [dev-dependencies] -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } diff --git a/frame/staking/reward-curve/src/lib.rs b/frame/staking/reward-curve/src/lib.rs index 3bde53b55fe06..89a1980d19fd9 100644 --- a/frame/staking/reward-curve/src/lib.rs +++ b/frame/staking/reward-curve/src/lib.rs @@ -42,7 +42,7 @@ use syn::parse::{Parse, ParseStream}; /// /// ``` /// # fn main() {} -/// use sr_primitives::curve::PiecewiseLinear; +/// use sp_runtime::curve::PiecewiseLinear; /// /// pallet_staking_reward_curve::build! { /// const I_NPOS: PiecewiseLinear<'static> = curve!( @@ -64,10 +64,10 @@ pub fn build(input: TokenStream) -> TokenStream { let declaration = generate_piecewise_linear(points); let test_module = generate_test_module(&input); - let imports = match crate_name("sr-primitives") { - Ok(sr_primitives) => { - let ident = syn::Ident::new(&sr_primitives, Span::call_site()); - quote!( extern crate #ident as _sr_primitives; ) + let imports = match crate_name("sp-runtime") { + Ok(sp_runtime) => { + let ident = syn::Ident::new(&sp_runtime, Span::call_site()); + quote!( extern crate #ident as _sp_runtime; ) }, Err(e) => syn::Error::new(Span::call_site(), &e).to_compile_error(), }; @@ -345,16 +345,16 @@ fn generate_piecewise_linear(points: Vec<(u32, u32)>) -> TokenStream2 { points_tokens.extend(quote!( ( - _sr_primitives::Perbill::from_parts(#x_perbill), - _sr_primitives::Perbill::from_parts(#y_perbill), + _sp_runtime::Perbill::from_parts(#x_perbill), + _sp_runtime::Perbill::from_parts(#y_perbill), ), )); } quote!( - _sr_primitives::curve::PiecewiseLinear::<'static> { + _sp_runtime::curve::PiecewiseLinear::<'static> { points: & [ #points_tokens ], - maximum: _sr_primitives::Perbill::from_parts(#max), + maximum: _sp_runtime::Perbill::from_parts(#max), } ) } diff --git a/frame/staking/reward-curve/tests/test.rs b/frame/staking/reward-curve/tests/test.rs index 4ed2def3fec8e..399bf7b9a7f4e 100644 --- a/frame/staking/reward-curve/tests/test.rs +++ b/frame/staking/reward-curve/tests/test.rs @@ -19,7 +19,7 @@ mod test_small_falloff { pallet_staking_reward_curve::build! { - const REWARD_CURVE: sr_primitives::curve::PiecewiseLinear<'static> = curve!( + const REWARD_CURVE: sp_runtime::curve::PiecewiseLinear<'static> = curve!( min_inflation: 0_020_000, max_inflation: 0_200_000, ideal_stake: 0_600_000, @@ -32,7 +32,7 @@ mod test_small_falloff { mod test_big_falloff { pallet_staking_reward_curve::build! { - const REWARD_CURVE: sr_primitives::curve::PiecewiseLinear<'static> = curve!( + const REWARD_CURVE: sp_runtime::curve::PiecewiseLinear<'static> = curve!( min_inflation: 0_100_000, max_inflation: 0_400_000, ideal_stake: 0_400_000, diff --git a/frame/staking/src/inflation.rs b/frame/staking/src/inflation.rs index 914d2ee93a4a4..902cc0a271800 100644 --- a/frame/staking/src/inflation.rs +++ b/frame/staking/src/inflation.rs @@ -19,7 +19,7 @@ //! The staking rate in NPoS is the total amount of tokens staked by nominators and validators, //! divided by the total token supply. -use sr_primitives::{Perbill, traits::SimpleArithmetic, curve::PiecewiseLinear}; +use sp_runtime::{Perbill, traits::SimpleArithmetic, curve::PiecewiseLinear}; /// The total payout to all validators (and their nominators) per era. /// @@ -47,7 +47,7 @@ pub fn compute_total_payout( #[cfg(test)] mod test { - use sr_primitives::curve::PiecewiseLinear; + use sp_runtime::curve::PiecewiseLinear; pallet_staking_reward_curve::build! { const I_NPOS: PiecewiseLinear<'static> = curve!( diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index b2fb0c6e31f0e..76619a142d5fd 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -266,7 +266,7 @@ use support::{ } }; use session::{historical::OnSessionEnding, SelectInitialValidators}; -use sr_primitives::{ +use sp_runtime::{ Perbill, RuntimeDebug, curve::PiecewiseLinear, @@ -275,12 +275,12 @@ use sr_primitives::{ SimpleArithmetic, EnsureOrigin, } }; -use sr_staking_primitives::{ +use sp_staking::{ SessionIndex, offence::{OnOffenceHandler, OffenceDetails, Offence, ReportOffence}, }; #[cfg(feature = "std")] -use sr_primitives::{Serialize, Deserialize}; +use sp_runtime::{Serialize, Deserialize}; use system::{ensure_signed, ensure_root}; use phragmen::{ExtendedBalance, PhragmenStakedAssignment}; diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index 91cffb8b7424a..9bd60e292386b 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -17,11 +17,11 @@ //! Test utilities use std::{collections::HashSet, cell::RefCell}; -use sr_primitives::{Perbill, KeyTypeId}; -use sr_primitives::curve::PiecewiseLinear; -use sr_primitives::traits::{IdentityLookup, Convert, OpaqueKeys, OnInitialize, SaturatedConversion}; -use sr_primitives::testing::{Header, UintAuthorityId}; -use sr_staking_primitives::{SessionIndex, offence::{OffenceDetails, OnOffenceHandler}}; +use sp_runtime::{Perbill, KeyTypeId}; +use sp_runtime::curve::PiecewiseLinear; +use sp_runtime::traits::{IdentityLookup, Convert, OpaqueKeys, OnInitialize, SaturatedConversion}; +use sp_runtime::testing::{Header, UintAuthorityId}; +use sp_staking::{SessionIndex, offence::{OffenceDetails, OnOffenceHandler}}; use primitives::{H256, crypto::key_types}; use runtime_io; use support::{ @@ -127,7 +127,7 @@ impl system::Trait for Test { type BlockNumber = BlockNumber; type Call = (); type Hash = H256; - type Hashing = ::sr_primitives::traits::BlakeTwo256; + type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; diff --git a/frame/staking/src/slashing.rs b/frame/staking/src/slashing.rs index 23315a670a6b5..e8515c0f40c6b 100644 --- a/frame/staking/src/slashing.rs +++ b/frame/staking/src/slashing.rs @@ -52,7 +52,7 @@ use super::{ EraIndex, Trait, Module, Store, BalanceOf, Exposure, Perbill, SessionInterface, NegativeImbalanceOf, UnappliedSlash, }; -use sr_primitives::traits::{Zero, Saturating}; +use sp_runtime::traits::{Zero, Saturating}; use support::{ StorageMap, StorageDoubleMap, traits::{Currency, OnUnbalanced, Imbalance}, diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index 65fcd3850790f..0f0dbb4ebab20 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -18,8 +18,8 @@ use super::*; use mock::*; -use sr_primitives::{assert_eq_error_rate, traits::OnInitialize}; -use sr_staking_primitives::offence::OffenceDetails; +use sp_runtime::{assert_eq_error_rate, traits::OnInitialize}; +use sp_staking::offence::OffenceDetails; use support::{assert_ok, assert_noop, traits::{Currency, ReservableCurrency}}; use substrate_test_utils::assert_eq_uvec; diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index dc158c2b80d75..967fd06a4b26e 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] @@ -23,7 +23,7 @@ std = [ "codec/std", "rstd/std", "runtime-io/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", ] diff --git a/frame/sudo/src/lib.rs b/frame/sudo/src/lib.rs index 082d1f673703e..fa470b1785840 100644 --- a/frame/sudo/src/lib.rs +++ b/frame/sudo/src/lib.rs @@ -87,7 +87,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::prelude::*; -use sr_primitives::{ +use sp_runtime::{ traits::{StaticLookup, Dispatchable}, DispatchError, }; use support::{ @@ -129,7 +129,7 @@ decl_module! { Ok(_) => true, Err(e) => { let e: DispatchError = e.into(); - sr_primitives::print(e); + sp_runtime::print(e); false } }; @@ -179,7 +179,7 @@ decl_module! { Ok(_) => true, Err(e) => { let e: DispatchError = e.into(); - sr_primitives::print(e); + sp_runtime::print(e); false } }; diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index fea24fd6d65ba..f7af3a3627ff2 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -9,16 +9,16 @@ log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } frame-metadata = { path = "../metadata", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -sr-arithmetic = { path = "../../primitives/sr-arithmetic", default-features = false } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +sp-arithmetic = { path = "../../primitives/sr-arithmetic", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } frame-support-procedural = { package = "frame-support-procedural", path = "./procedural" } paste = "0.1.6" once_cell = { version = "0.2.4", default-features = false, optional = true } -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine", optional = true } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine", optional = true } bitmask = { version = "0.5.0", default-features = false } impl-trait-for-tuples = "0.1.3" tracing = { version = "0.1.10", optional = true } @@ -37,8 +37,8 @@ std = [ "runtime-io/std", "codec/std", "rstd/std", - "sr-primitives/std", - "sr-arithmetic/std", + "sp-runtime/std", + "sp-arithmetic/std", "frame-metadata/std", "inherents/std", "state-machine", diff --git a/frame/support/procedural/src/construct_runtime/mod.rs b/frame/support/procedural/src/construct_runtime/mod.rs index a7401557e1218..184cb4d49dbf9 100644 --- a/frame/support/procedural/src/construct_runtime/mod.rs +++ b/frame/support/procedural/src/construct_runtime/mod.rs @@ -93,10 +93,10 @@ fn construct_runtime_parsed(definition: RuntimeDefinition) -> Result( ) }); quote!( - #scrate::sr_primitives::impl_outer_config! { + #scrate::sp_runtime::impl_outer_config! { pub struct GenesisConfig for #runtime { #(#modules_tokens)* } diff --git a/frame/support/procedural/src/storage/genesis_config/mod.rs b/frame/support/procedural/src/storage/genesis_config/mod.rs index c222644f78ae3..4102513cce852 100644 --- a/frame/support/procedural/src/storage/genesis_config/mod.rs +++ b/frame/support/procedural/src/storage/genesis_config/mod.rs @@ -132,7 +132,7 @@ fn impl_build_storage( let builder_blocks = &builders.blocks; let build_storage_impl_trait = quote!( - #scrate::sr_primitives::BuildModuleGenesisStorage<#runtime_generic, #inherent_instance> + #scrate::sp_runtime::BuildModuleGenesisStorage<#runtime_generic, #inherent_instance> ); quote!{ @@ -140,8 +140,8 @@ fn impl_build_storage( impl#genesis_impl GenesisConfig#genesis_struct #genesis_where_clause { pub fn build_storage #fn_generic (&self) -> std::result::Result< ( - #scrate::sr_primitives::StorageOverlay, - #scrate::sr_primitives::ChildrenStorageOverlay, + #scrate::sp_runtime::StorageOverlay, + #scrate::sp_runtime::ChildrenStorageOverlay, ), String > #fn_where_clause { @@ -154,8 +154,8 @@ fn impl_build_storage( pub fn assimilate_storage #fn_generic ( &self, tuple_storage: &mut ( - #scrate::sr_primitives::StorageOverlay, - #scrate::sr_primitives::ChildrenStorageOverlay, + #scrate::sp_runtime::StorageOverlay, + #scrate::sp_runtime::ChildrenStorageOverlay, ), ) -> std::result::Result<(), String> #fn_where_clause { #scrate::BasicExternalities::execute_with_storage(tuple_storage, || { @@ -172,8 +172,8 @@ fn impl_build_storage( fn build_module_genesis_storage( &self, storage: &mut ( - #scrate::sr_primitives::StorageOverlay, - #scrate::sr_primitives::ChildrenStorageOverlay, + #scrate::sp_runtime::StorageOverlay, + #scrate::sp_runtime::ChildrenStorageOverlay, ), ) -> std::result::Result<(), String> { self.assimilate_storage::<#fn_traitinstance> (storage) diff --git a/frame/support/procedural/tools/src/lib.rs b/frame/support/procedural/tools/src/lib.rs index 5340bdbe59d23..10d3c4b59b770 100644 --- a/frame/support/procedural/tools/src/lib.rs +++ b/frame/support/procedural/tools/src/lib.rs @@ -27,12 +27,12 @@ use quote::quote; pub mod syn_ext; -// FIXME #1569, remove the following functions, which are copied from sr-api-macros +// FIXME #1569, remove the following functions, which are copied from sp-api-macros use proc_macro2::{TokenStream, Span}; use syn::Ident; fn generate_hidden_includes_mod_name(unique_id: &str) -> Ident { - Ident::new(&format!("sr_api_hidden_includes_{}", unique_id), Span::call_site()) + Ident::new(&format!("sp_api_hidden_includes_{}", unique_id), Span::call_site()) } /// Generates the access to the `frame-support` crate. diff --git a/frame/support/src/dispatch.rs b/frame/support/src/dispatch.rs index 2421a62da910f..7d7103b0a4240 100644 --- a/frame/support/src/dispatch.rs +++ b/frame/support/src/dispatch.rs @@ -27,7 +27,7 @@ pub use crate::weights::{ SimpleDispatchInfo, GetDispatchInfo, DispatchInfo, WeighData, ClassifyDispatch, TransactionPriority, Weight, WeighBlock, PaysFee, }; -pub use sr_primitives::{ +pub use sp_runtime::{ traits::{Dispatchable, DispatchResult, ModuleDispatchError}, DispatchError, }; @@ -202,12 +202,12 @@ impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {} /// The following reserved functions also take the block number (with type `T::BlockNumber`) as an optional input: /// /// * `on_initialize`: Executes at the beginning of a block. Using this function will -/// implement the [`OnInitialize`](../sr_primitives/traits/trait.OnInitialize.html) trait. +/// implement the [`OnInitialize`](../sp_runtime/traits/trait.OnInitialize.html) trait. /// * `on_finalize`: Executes at the end of a block. Using this function will -/// implement the [`OnFinalize`](../sr_primitives/traits/trait.OnFinalize.html) trait. +/// implement the [`OnFinalize`](../sp_runtime/traits/trait.OnFinalize.html) trait. /// * `offchain_worker`: Executes at the beginning of a block and produces extrinsics for a future block /// upon completion. Using this function will implement the -/// [`OffchainWorker`](../sr_primitives/traits/trait.OffchainWorker.html) trait. +/// [`OffchainWorker`](../sp_runtime/traits/trait.OffchainWorker.html) trait. #[macro_export] macro_rules! decl_module { // Entry point #1. @@ -861,7 +861,7 @@ macro_rules! decl_module { fn on_initialize() { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn on_initialize(_block_number_not_used: $trait_instance::BlockNumber) { @@ -883,7 +883,7 @@ macro_rules! decl_module { fn on_initialize($param:ident : $param_ty:ty) { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn on_initialize($param: $param_ty) { @@ -903,7 +903,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* {} }; @@ -915,7 +915,7 @@ macro_rules! decl_module { fn on_finalize() { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn on_finalize(_block_number_not_used: $trait_instance::BlockNumber) { @@ -937,7 +937,7 @@ macro_rules! decl_module { fn on_finalize($param:ident : $param_ty:ty) { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn on_finalize($param: $param_ty) { @@ -957,7 +957,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { } @@ -998,7 +998,7 @@ macro_rules! decl_module { fn offchain_worker() { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn generate_extrinsics(_block_number_not_used: $trait_instance::BlockNumber) { $( $impl )* } @@ -1011,7 +1011,7 @@ macro_rules! decl_module { fn offchain_worker($param:ident : $param_ty:ty) { $( $impl:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* { fn generate_extrinsics($param: $param_ty) { $( $impl )* } @@ -1023,7 +1023,7 @@ macro_rules! decl_module { { $( $other_where_bounds:tt )* } ) => { impl<$trait_instance: $trait_name$(, $instance: $instantiable)?> - $crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber> + $crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber> for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )* {} }; @@ -1885,7 +1885,7 @@ macro_rules! __check_reserved_fn_name { #[allow(dead_code)] mod tests { use super::*; - use crate::sr_primitives::traits::{OnInitialize, OnFinalize}; + use crate::sp_runtime::traits::{OnInitialize, OnFinalize}; use crate::weights::{DispatchInfo, DispatchClass}; pub trait Trait: system::Trait + Sized where Self::AccountId: From { diff --git a/frame/support/src/error.rs b/frame/support/src/error.rs index 87380c1a9433c..937be730f91e2 100644 --- a/frame/support/src/error.rs +++ b/frame/support/src/error.rs @@ -17,7 +17,7 @@ //! Macro for declaring a module error. #[doc(hidden)] -pub use sr_primitives::traits::LookupError; +pub use sp_runtime::traits::LookupError; pub use frame_metadata::{ModuleErrorMetadata, ErrorMetadata, DecodeDifferent}; /// Declare an error type for a runtime module. diff --git a/frame/support/src/inherent.rs b/frame/support/src/inherent.rs index 935d3b4e74e4f..540a27f7cc796 100644 --- a/frame/support/src/inherent.rs +++ b/frame/support/src/inherent.rs @@ -17,7 +17,7 @@ #[doc(hidden)] pub use crate::rstd::vec::Vec; #[doc(hidden)] -pub use crate::sr_primitives::traits::{Block as BlockT, Extrinsic}; +pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic}; #[doc(hidden)] pub use inherents::{InherentData, ProvideInherent, CheckInherentsResult, IsFatalError}; diff --git a/frame/support/src/lib.rs b/frame/support/src/lib.rs index ad599fac838b4..bdcde0f15943b 100644 --- a/frame/support/src/lib.rs +++ b/frame/support/src/lib.rs @@ -43,7 +43,7 @@ pub use state_machine::BasicExternalities; #[doc(hidden)] pub use runtime_io::storage::root as storage_root; #[doc(hidden)] -pub use sr_primitives::RuntimeDebug; +pub use sp_runtime::RuntimeDebug; #[macro_use] pub mod debug; @@ -69,7 +69,7 @@ pub mod weights; pub use self::hash::{Twox256, Twox128, Blake2_256, Blake2_128, Twox64Concat, Hashable}; pub use self::storage::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubleMap}; pub use self::dispatch::{Parameter, Callable, IsSubType}; -pub use sr_primitives::{self, ConsensusEngineId, print, traits::Printable}; +pub use sp_runtime::{self, ConsensusEngineId, print, traits::Printable}; /// Macro for easily creating a new implementation of the `Get` trait. Use similarly to /// how you would declare a `const`: diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index d06d728454071..3a9b0c2d8bc33 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -21,7 +21,7 @@ use rstd::{prelude::*, result, marker::PhantomData, ops::Div, fmt::Debug}; use codec::{FullCodec, Codec, Encode, Decode}; use primitives::u32_trait::Value as U32; -use sr_primitives::{ +use sp_runtime::{ ConsensusEngineId, traits::{MaybeSerializeDeserialize, SimpleArithmetic, Saturating}, }; diff --git a/frame/support/src/unsigned.rs b/frame/support/src/unsigned.rs index c6fafa8afa4e0..37b66dc4b0b6a 100644 --- a/frame/support/src/unsigned.rs +++ b/frame/support/src/unsigned.rs @@ -16,9 +16,9 @@ #[doc(hidden)] #[allow(deprecated)] -pub use crate::sr_primitives::traits::ValidateUnsigned; +pub use crate::sp_runtime::traits::ValidateUnsigned; #[doc(hidden)] -pub use crate::sr_primitives::transaction_validity::{ +pub use crate::sp_runtime::transaction_validity::{ TransactionValidity, UnknownTransaction, TransactionValidityError, }; diff --git a/frame/support/src/weights.rs b/frame/support/src/weights.rs index 8af418fc7407a..84198a7ecaffe 100644 --- a/frame/support/src/weights.rs +++ b/frame/support/src/weights.rs @@ -39,15 +39,15 @@ use serde::{Serialize, Deserialize}; use impl_trait_for_tuples::impl_for_tuples; use codec::{Encode, Decode}; -use sr_arithmetic::traits::{Bounded, Zero}; -use sr_primitives::{ +use sp_arithmetic::traits::{Bounded, Zero}; +use sp_runtime::{ RuntimeDebug, traits::SignedExtension, generic::{CheckedExtrinsic, UncheckedExtrinsic}, }; /// Re-export priority as type -pub use sr_primitives::transaction_validity::TransactionPriority; +pub use sp_runtime::transaction_validity::TransactionPriority; /// Numeric range of a transaction weight. pub type Weight = u32; @@ -261,7 +261,7 @@ where /// Implementation for test extrinsic. #[cfg(feature = "std")] -impl GetDispatchInfo for sr_primitives::testing::TestXt { +impl GetDispatchInfo for sp_runtime::testing::TestXt { fn get_dispatch_info(&self) -> DispatchInfo { // for testing: weight == size. DispatchInfo { diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index 3d58898b0ccf6..83b2d26157265 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -7,12 +7,12 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -runtime-io ={ package = "sr-io", path = "../../../primitives/sr-io", default-features = false } -state-machine ={ package = "substrate-state-machine", path = "../../../primitives/state-machine", optional = true } +runtime-io ={ package = "sp-io", path = "../../../primitives/sr-io", default-features = false } +state-machine ={ package = "sp-state-machine", path = "../../../primitives/state-machine", optional = true } support = { package = "frame-support", version = "2", path = "../", default-features = false } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false } -sr-primitives = { package = "sr-primitives", path = "../../../primitives/sr-primitives", default-features = false } -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false } +sp-runtime = { package = "sp-runtime", path = "../../../primitives/sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } trybuild = "1.0.17" pretty_assertions = "0.6.1" @@ -25,6 +25,6 @@ std = [ "support/std", "inherents/std", "primitives/std", - "sr-primitives/std", + "sp-runtime/std", "state-machine", ] diff --git a/frame/support/test/tests/instance.rs b/frame/support/test/tests/instance.rs index eff73ad6eaf8d..a3ef6ba86881d 100644 --- a/frame/support/test/tests/instance.rs +++ b/frame/support/test/tests/instance.rs @@ -16,7 +16,7 @@ #![recursion_limit="128"] -use sr_primitives::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}}; +use sp_runtime::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}}; use support::{ Parameter, traits::Get, parameter_types, metadata::{ @@ -86,7 +86,7 @@ mod module1 { } } - #[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)] pub enum Origin, I> where T::BlockNumber: From { Members(u32), _Phantom(std::marker::PhantomData<(T, I)>), @@ -148,7 +148,7 @@ mod module2 { } } - #[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)] pub enum Origin, I=DefaultInstance> { Members(u32), _Phantom(std::marker::PhantomData<(T, I)>), diff --git a/frame/support/test/tests/issue2219.rs b/frame/support/test/tests/issue2219.rs index 72e0bc8caf198..c5c7f779356fa 100644 --- a/frame/support/test/tests/issue2219.rs +++ b/frame/support/test/tests/issue2219.rs @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use support::sr_primitives::generic; -use support::sr_primitives::traits::{BlakeTwo256, Block as _, Verify}; +use support::sp_runtime::generic; +use support::sp_runtime::traits::{BlakeTwo256, Block as _, Verify}; use support::codec::{Encode, Decode}; use primitives::{H256, sr25519}; use serde::{Serialize, Deserialize}; diff --git a/frame/support/test/tests/system.rs b/frame/support/test/tests/system.rs index 2996724f62598..fe977392dd7bb 100644 --- a/frame/support/test/tests/system.rs +++ b/frame/support/test/tests/system.rs @@ -38,7 +38,7 @@ support::decl_error! { } /// Origin for the system module. -#[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)] pub enum RawOrigin { Root, Signed(AccountId), diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 9f1019d68846c..7851663c33a19 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -8,11 +8,11 @@ edition = "2018" serde = { version = "1.0.101", optional = true, features = ["derive"] } safe-mix = { version = "1.0.0", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -sr-version = { path = "../../primitives/sr-version", default-features = false } +primitives = { package = "sp-core", path = "../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +sp-version = { path = "../../primitives/sr-version", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } impl-trait-for-tuples = "0.1.3" @@ -29,8 +29,8 @@ std = [ "rstd/std", "runtime-io/std", "support/std", - "sr-primitives/std", - "sr-version/std", + "sp-runtime/std", + "sp-version/std", ] [[bench]] diff --git a/frame/system/benches/bench.rs b/frame/system/benches/bench.rs index bdf3b83a38f82..461679ea383a1 100644 --- a/frame/system/benches/bench.rs +++ b/frame/system/benches/bench.rs @@ -18,7 +18,7 @@ use criterion::{Criterion, criterion_group, criterion_main, black_box}; use frame_system as system; use support::{decl_module, decl_event, impl_outer_origin, impl_outer_event, weights::Weight}; use primitives::H256; -use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; +use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; mod module { use super::*; diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index dd123cd69d982..29b7b142eb649 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -5,12 +5,12 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../../../../primitives/sr-api", default-features = false } +sp-api = { path = "../../../../primitives/sr-api", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [features] default = ["std"] std = [ - "sr-api/std", + "sp-api/std", "codec/std", ] diff --git a/frame/system/rpc/runtime-api/src/lib.rs b/frame/system/rpc/runtime-api/src/lib.rs index 5c8c64902b0da..c3a9595af102a 100644 --- a/frame/system/rpc/runtime-api/src/lib.rs +++ b/frame/system/rpc/runtime-api/src/lib.rs @@ -22,7 +22,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The API to query account nonce (aka transaction index). pub trait AccountNonceApi where AccountId: codec::Codec, diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index 17fb3fbf0ef22..cce3468639a72 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -95,8 +95,8 @@ use rstd::prelude::*; use rstd::map; use rstd::marker::PhantomData; use rstd::fmt::Debug; -use sr_version::RuntimeVersion; -use sr_primitives::{ +use sp_version::RuntimeVersion; +use sp_runtime::{ RuntimeDebug, generic::{self, Era}, Perbill, DispatchOutcome, DispatchError, transaction_validity::{ @@ -1139,7 +1139,7 @@ impl Lookup for ChainContext { mod tests { use super::*; use primitives::H256; - use sr_primitives::{traits::{BlakeTwo256, IdentityLookup}, testing::Header, DispatchError}; + use sp_runtime::{traits::{BlakeTwo256, IdentityLookup}, testing::Header, DispatchError}; use support::{impl_outer_origin, parameter_types}; impl_outer_origin! { diff --git a/frame/system/src/offchain.rs b/frame/system/src/offchain.rs index 9f0a3ab1b2442..492dfefb6b232 100644 --- a/frame/system/src/offchain.rs +++ b/frame/system/src/offchain.rs @@ -17,8 +17,8 @@ //! Module helpers for offchain calls. use codec::Encode; -use sr_primitives::app_crypto::{self, RuntimeAppPublic}; -use sr_primitives::traits::{Extrinsic as ExtrinsicT, IdentifyAccount}; +use sp_runtime::app_crypto::{self, RuntimeAppPublic}; +use sp_runtime::traits::{Extrinsic as ExtrinsicT, IdentifyAccount}; /// A trait responsible for signing a payload using given account. pub trait Signer { diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 247d219ea8ad8..72e57951bd8e0 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -7,17 +7,17 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } sp-timestamp = { path = "../../primitives/timestamp", default-features = false } impl-trait-for-tuples = "0.1.3" [dev-dependencies] -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] @@ -25,7 +25,7 @@ std = [ "inherents/std", "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "serde", "system/std", diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index 73f9cd71b6b1d..9368c09b67a90 100644 --- a/frame/timestamp/src/lib.rs +++ b/frame/timestamp/src/lib.rs @@ -94,7 +94,7 @@ use rstd::{result, cmp}; use inherents::{ProvideInherent, InherentData, InherentIdentifier}; use support::{Parameter, decl_storage, decl_module}; use support::traits::{Time, Get}; -use sr_primitives::{ +use sp_runtime::{ RuntimeString, traits::{ SimpleArithmetic, Zero, SaturatedConversion, Scale @@ -243,7 +243,7 @@ mod tests { use support::{impl_outer_origin, assert_ok, parameter_types, weights::Weight}; use runtime_io::TestExternalities; use primitives::H256; - use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; + use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; impl_outer_origin! { pub enum Origin for Test {} diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index 70f0f2643ccd3..fb84498d77868 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -6,15 +6,15 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } transaction-payment-rpc-runtime-api = { package = "pallet-transaction-payment-rpc-runtime-api", path = "./rpc/runtime-api", default-features = false } [dev-dependencies] -runtime-io = { package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } balances = { package = "pallet-balances", path = "../balances" } [features] @@ -22,7 +22,7 @@ default = ["std"] std = [ "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", "transaction-payment-rpc-runtime-api/std" diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 5ae6eafc19af8..c8596648f857c 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -9,9 +9,9 @@ codec = { package = "parity-scale-codec", version = "1.0.0" } jsonrpc-core = "14.0.3" jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -rpc-primitives = { package = "substrate-rpc-primitives", path = "../../../primitives/rpc" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +rpc-primitives = { package = "sp-rpc", path = "../../../primitives/rpc" } serde = { version = "1.0.101", features = ["derive"] } -sr-primitives = { path = "../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../primitives/sr-primitives" } sp-blockchain = { path = "../../../primitives/blockchain" } pallet-transaction-payment-rpc-runtime-api = { path = "./runtime-api" } diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 008b5bb78c4e2..e437b22fc0665 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -6,10 +6,10 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -sr-api = { path = "../../../../primitives/sr-api", default-features = false } +sp-api = { path = "../../../../primitives/sr-api", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../../../support", default-features = false } [dev-dependencies] @@ -19,8 +19,8 @@ serde_json = "1.0.41" default = ["std"] std = [ "serde", - "sr-api/std", + "sp-api/std", "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", ] diff --git a/frame/transaction-payment/rpc/runtime-api/src/lib.rs b/frame/transaction-payment/rpc/runtime-api/src/lib.rs index 755e98a212bd8..e922ff9e28368 100644 --- a/frame/transaction-payment/rpc/runtime-api/src/lib.rs +++ b/frame/transaction-payment/rpc/runtime-api/src/lib.rs @@ -38,7 +38,7 @@ pub struct RuntimeDispatchInfo { pub partial_fee: Balance, } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait TransactionPaymentApi where Balance: Codec, Extrinsic: Codec, diff --git a/frame/transaction-payment/rpc/src/lib.rs b/frame/transaction-payment/rpc/src/lib.rs index 527bfc424a05b..35ad4a06ed2f0 100644 --- a/frame/transaction-payment/rpc/src/lib.rs +++ b/frame/transaction-payment/rpc/src/lib.rs @@ -21,7 +21,7 @@ use codec::{Codec, Decode}; use sp_blockchain::HeaderBackend; use jsonrpc_core::{Error as RpcError, ErrorCode, Result}; use jsonrpc_derive::rpc; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, ProvideRuntimeApi}, }; diff --git a/frame/transaction-payment/src/lib.rs b/frame/transaction-payment/src/lib.rs index abb7518e35aa0..eacf890d80f2a 100644 --- a/frame/transaction-payment/src/lib.rs +++ b/frame/transaction-payment/src/lib.rs @@ -38,7 +38,7 @@ use support::{ traits::{Currency, Get, OnUnbalanced, ExistenceRequirement, WithdrawReason}, weights::{Weight, DispatchInfo, GetDispatchInfo}, }; -use sr_primitives::{ +use sp_runtime::{ Fixed64, transaction_validity::{ TransactionPriority, ValidTransaction, InvalidTransaction, TransactionValidityError, @@ -242,7 +242,7 @@ mod tests { weights::{DispatchClass, DispatchInfo, GetDispatchInfo, Weight}, }; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ Perbill, testing::{Header, TestXt}, traits::{BlakeTwo256, IdentityLookup, Extrinsic}, diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index a39802840fec2..2ecd11368ff07 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -7,15 +7,15 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } balances = { package = "pallet-balances", path = "../balances", default-features = false } [dev-dependencies] -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io" } -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io" } +primitives = { package = "sp-core", path = "../../primitives/core" } [features] default = ["std"] @@ -23,7 +23,7 @@ std = [ "serde", "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", "balances/std", diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 30ebc6f5a3005..d5ca4b232eccb 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -65,8 +65,8 @@ use support::traits::{ Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, ReservableCurrency, WithdrawReason }; -use sr_primitives::{Permill, ModuleId}; -use sr_primitives::traits::{ +use sp_runtime::{Permill, ModuleId}; +use sp_runtime::traits::{ Zero, EnsureOrigin, StaticLookup, AccountIdConversion, Saturating }; use support::weights::SimpleDispatchInfo; @@ -201,7 +201,7 @@ decl_module! { /// A spending proposal. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Encode, Decode, Clone, PartialEq, Eq, sr_primitives::RuntimeDebug)] +#[derive(Encode, Decode, Clone, PartialEq, Eq, sp_runtime::RuntimeDebug)] pub struct Proposal { proposer: AccountId, value: Balance, @@ -353,7 +353,7 @@ mod tests { use support::{assert_noop, assert_ok, impl_outer_origin, parameter_types, weights::Weight}; use primitives::H256; - use sr_primitives::{ + use sp_runtime::{ traits::{BlakeTwo256, OnFinalize, IdentityLookup}, testing::Header, Perbill }; diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index c6f5db29f9dc9..f5c117056995e 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -9,12 +9,12 @@ serde = { version = "1.0.101", optional = true } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } support = { package = "frame-support", path = "../support", default-features = false } system = { package = "frame-system", path = "../system", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } [dev-dependencies] -primitives = { package = "substrate-primitives", path = "../../primitives/core" } +primitives = { package = "sp-core", path = "../../primitives/core" } balances = { package = "pallet-balances", path = "../balances" } [features] @@ -22,7 +22,7 @@ default = ["std"] std = [ "serde", "codec/std", - "sr-primitives/std", + "sp-runtime/std", "support/std", "system/std", "runtime-io/std", diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 2fc5194f7d944..20222766f4463 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -23,7 +23,7 @@ use rstd::prelude::*; use support::{decl_module, decl_event, Parameter, weights::SimpleDispatchInfo}; use system::ensure_root; -use sr_primitives::{traits::Dispatchable, DispatchError}; +use sp_runtime::{traits::Dispatchable, DispatchError}; /// Configuration trait. pub trait Trait: system::Trait { @@ -68,7 +68,7 @@ mod tests { weights::Weight }; use primitives::H256; - use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; + use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header}; impl_outer_origin! { pub enum Origin for Test {} diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 598f74ac15bd4..6f012a3d89f58 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -1,20 +1,20 @@ [package] -name = "substrate-application-crypto" +name = "sc-application-crypto" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" description = "Provides facilities for generating application specific crypto wrapper types." [dependencies] -primitives = { package = "substrate-primitives", path = "../core", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../primitives/sr-io", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false } [dev-dependencies] test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } -sr-primitives = { path = "../../primitives/sr-primitives" } +sp-runtime = { path = "../../primitives/sr-primitives" } [features] default = [ "std" ] diff --git a/primitives/application-crypto/src/ed25519.rs b/primitives/application-crypto/src/ed25519.rs index 468907a5c40a4..7ada97672af81 100644 --- a/primitives/application-crypto/src/ed25519.rs +++ b/primitives/application-crypto/src/ed25519.rs @@ -57,7 +57,7 @@ impl RuntimePublic for Public { #[cfg(test)] mod tests { - use sr_primitives::{generic::BlockId, traits::ProvideRuntimeApi}; + use sp_runtime::{generic::BlockId, traits::ProvideRuntimeApi}; use primitives::{testing::{KeyStore, ED25519}, crypto::Pair}; use test_client::{ TestClientBuilder, DefaultTestClientBuilderExt, TestClientBuilderExt, diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index dd8b02fc1d855..3a748e50c9d0f 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -45,7 +45,7 @@ pub use traits::*; /// Application-specific types whose identifier is `$key_type`. /// /// ```rust -///# use substrate_application_crypto::{app_crypto, wrap, ed25519, KeyTypeId}; +///# use sc_application_crypto::{app_crypto, wrap, ed25519, KeyTypeId}; /// // Declare a new set of crypto types using Ed25519 logic that identifies as `KeyTypeId` /// // of value `b"fuba"`. /// app_crypto!(ed25519, KeyTypeId(*b"_uba")); @@ -66,7 +66,7 @@ macro_rules! app_crypto { /// Application-specific types whose identifier is `$key_type`. /// /// ```rust -///# use substrate_application_crypto::{app_crypto, wrap, ed25519, KeyTypeId}; +///# use sc_application_crypto::{app_crypto, wrap, ed25519, KeyTypeId}; /// // Declare a new set of crypto types using Ed25519 logic that identifies as `KeyTypeId` /// // of value `b"fuba"`. /// app_crypto!(ed25519, KeyTypeId(*b"_uba")); @@ -390,7 +390,7 @@ macro_rules! app_crypto_signature_common { /// Implement bidirectional `From` and on-way `AsRef`/`AsMut` for two types, `$inner` and `$outer`. /// /// ```rust -/// substrate_application_crypto::wrap! { +/// sc_application_crypto::wrap! { /// pub struct Wrapper(u32); /// } /// ``` diff --git a/primitives/application-crypto/src/sr25519.rs b/primitives/application-crypto/src/sr25519.rs index 2ad279a6bfd42..ebe2a5d3539f4 100644 --- a/primitives/application-crypto/src/sr25519.rs +++ b/primitives/application-crypto/src/sr25519.rs @@ -57,7 +57,7 @@ impl RuntimePublic for Public { #[cfg(test)] mod tests { - use sr_primitives::{generic::BlockId, traits::ProvideRuntimeApi}; + use sp_runtime::{generic::BlockId, traits::ProvideRuntimeApi}; use primitives::{testing::{KeyStore, SR25519}, crypto::Pair}; use test_client::{ TestClientBuilder, DefaultTestClientBuilderExt, TestClientBuilderExt, diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index 1e975b5680105..9a2daaff1cf8a 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "substrate-authority-discovery-primitives" +name = "sp-authority-discovery" version = "2.0.0" authors = ["Parity Technologies "] description = "Authority discovery primitives" edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../application-crypto", default-features = false } codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-api = { path = "../sr-api", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-api = { path = "../sr-api", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } [features] default = ["std"] @@ -18,6 +18,6 @@ std = [ "app-crypto/std", "codec/std", "rstd/std", - "sr-api/std", - "sr-primitives/std" + "sp-api/std", + "sp-runtime/std" ] diff --git a/primitives/authority-discovery/src/lib.rs b/primitives/authority-discovery/src/lib.rs index 0116ca02aad1f..8ce9757a59ea1 100644 --- a/primitives/authority-discovery/src/lib.rs +++ b/primitives/authority-discovery/src/lib.rs @@ -35,7 +35,7 @@ pub type AuthorityId = app::Public; /// An authority discovery authority signature. pub type AuthoritySignature = app::Signature; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The authority discovery api. /// /// This api is used by the `core/authority-discovery` module to retrieve identifiers diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index 1c95fed52ff04..3b9604c68886a 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -6,8 +6,8 @@ description = "Authorship primitives" edition = "2018" [dependencies] -sp-inherents = { package = "substrate-inherents", path = "../inherents", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +sp-inherents = { package = "sp-inherents", path = "../inherents", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] diff --git a/primitives/block-builder/runtime-api/Cargo.toml b/primitives/block-builder/runtime-api/Cargo.toml index 7f3b17fb21579..323a4ad4c803c 100644 --- a/primitives/block-builder/runtime-api/Cargo.toml +++ b/primitives/block-builder/runtime-api/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "substrate-block-builder-runtime-api" +name = "sp-block-builder" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-primitives = { path = "../../sr-primitives", default-features = false } -sr-api = { path = "../../sr-api", default-features = false } -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } +sp-runtime = { path = "../../sr-primitives", default-features = false } +sp-api = { path = "../../sr-api", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } -inherents = { package = "substrate-inherents", path = "../../inherents", default-features = false } +inherents = { package = "sp-inherents", path = "../../inherents", default-features = false } [features] default = [ "std" ] std = [ - "sr-primitives/std", + "sp-runtime/std", "codec/std", "inherents/std", - "sr-api/std", + "sp-api/std", "rstd/std", ] diff --git a/primitives/block-builder/runtime-api/src/lib.rs b/primitives/block-builder/runtime-api/src/lib.rs index f8a5f93b99246..441df3dd4aebd 100644 --- a/primitives/block-builder/runtime-api/src/lib.rs +++ b/primitives/block-builder/runtime-api/src/lib.rs @@ -18,7 +18,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sr_primitives::{traits::Block as BlockT, ApplyExtrinsicResult}; +use sp_runtime::{traits::Block as BlockT, ApplyExtrinsicResult}; use inherents::{InherentData, CheckInherentsResult}; @@ -27,7 +27,7 @@ use inherents::{InherentData, CheckInherentsResult}; /// These definitions are taken from the 2c58e30246a029b53d51e5b24c31974ac539ee8b git revision. #[deprecated(note = "These definitions here are only for compatibility reasons")] pub mod compatability_v3 { - use sr_primitives::{DispatchOutcome, transaction_validity}; + use sp_runtime::{DispatchOutcome, transaction_validity}; use codec::{Encode, Decode}; #[derive(Eq, PartialEq, Clone, Copy, Decode, Encode, Debug)] @@ -41,7 +41,7 @@ pub mod compatability_v3 { pub type ApplyResult = Result; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The `BlockBuilder` api trait that provides the required functionality for building a block. #[api_version(4)] pub trait BlockBuilder { diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index 812c1dd6680e0..6292906925eda 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -10,8 +10,8 @@ lru = "0.4.0" parking_lot = "0.9.0" derive_more = "0.99.2" parity-scale-codec = { version = "1.0.0", default-features = false, features = ["derive"] } -sp_consensus = { package = "substrate-consensus-common", path = "../consensus/common" } -sr-primitives = { path = "../sr-primitives" } -sp-block-builder-runtime-api = { package = "substrate-block-builder-runtime-api", path = "../block-builder/runtime-api" } -sp-state-machine = { package = "substrate-state-machine", path = "../state-machine" } +sp_consensus = { package = "sp-consensus", path = "../consensus/common" } +sp-runtime = { path = "../sr-primitives" } +sp-block-builder-runtime-api = { package = "sp-block-builder", path = "../block-builder/runtime-api" } +sp-state-machine = { package = "sp-state-machine", path = "../state-machine" } diff --git a/primitives/blockchain/src/backend.rs b/primitives/blockchain/src/backend.rs index c28a75f620d4a..0baede8ab29db 100644 --- a/primitives/blockchain/src/backend.rs +++ b/primitives/blockchain/src/backend.rs @@ -18,9 +18,9 @@ use std::sync::Arc; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor}; -use sr_primitives::generic::BlockId; -use sr_primitives::Justification; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor}; +use sp_runtime::generic::BlockId; +use sp_runtime::Justification; use log::warn; use parking_lot::RwLock; diff --git a/primitives/blockchain/src/error.rs b/primitives/blockchain/src/error.rs index 6302edb3d2c60..68a916b7d8229 100644 --- a/primitives/blockchain/src/error.rs +++ b/primitives/blockchain/src/error.rs @@ -18,7 +18,7 @@ use std::{self, error, result}; use sp_state_machine; -use sr_primitives::transaction_validity::TransactionValidityError; +use sp_runtime::transaction_validity::TransactionValidityError; #[allow(deprecated)] use sp_block_builder_runtime_api::compatability_v3; use sp_consensus; diff --git a/primitives/blockchain/src/header_metadata.rs b/primitives/blockchain/src/header_metadata.rs index 5ec58ad754b72..450bf70e8ed8d 100644 --- a/primitives/blockchain/src/header_metadata.rs +++ b/primitives/blockchain/src/header_metadata.rs @@ -17,7 +17,7 @@ //! Implements tree backend, cached header metadata and algorithms //! to compute routes efficiently over the tree of headers. -use sr_primitives::traits::{Block as BlockT, NumberFor, Header}; +use sp_runtime::traits::{Block as BlockT, NumberFor, Header}; use parking_lot::RwLock; use lru::LruCache; diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index bb772cb7a79aa..e36f7e44d16c6 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "substrate-consensus-aura-primitives" +name = "sp-consensus-aura" version = "2.0.0" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } -sr-api = { path = "../../sr-api", default-features = false } -sr-primitives = { path = "../../sr-primitives", default-features = false } -inherents = { package = "substrate-inherents", path = "../../inherents", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } +sp-api = { path = "../../sr-api", default-features = false } +sp-runtime = { path = "../../sr-primitives", default-features = false } +inherents = { package = "sp-inherents", path = "../../inherents", default-features = false } sp-timestamp = { path = "../../timestamp", default-features = false } [features] @@ -20,8 +20,8 @@ std = [ "app-crypto/std", "codec/std", "rstd/std", - "sr-api/std", - "sr-primitives/std", + "sp-api/std", + "sp-runtime/std", "inherents/std", "sp-timestamp/std", ] diff --git a/primitives/consensus/aura/src/lib.rs b/primitives/consensus/aura/src/lib.rs index 8a89452ac355c..c866c041da447 100644 --- a/primitives/consensus/aura/src/lib.rs +++ b/primitives/consensus/aura/src/lib.rs @@ -20,7 +20,7 @@ use codec::{Encode, Decode, Codec}; use rstd::vec::Vec; -use sr_primitives::ConsensusEngineId; +use sp_runtime::ConsensusEngineId; pub mod inherents; @@ -75,7 +75,7 @@ pub enum ConsensusLog { OnDisabled(AuthorityIndex), } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// API necessary for block authorship with aura. pub trait AuraApi { /// Return the slot duration in seconds for Aura. diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index bbdcbf9b66074..236f6cdebe40e 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -1,19 +1,19 @@ [package] -name = "substrate-consensus-babe-primitives" +name = "sp-consensus-babe" version = "2.0.0" authors = ["Parity Technologies "] description = "Primitives for BABE consensus" edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } schnorrkel = { version = "0.8.5", features = ["preaudit_deprecated"], optional = true } -slots = { package = "substrate-consensus-slots", path = "../../../client/consensus/slots", optional = true } -sr-api = { path = "../../sr-api", default-features = false } -sr-primitives = { path = "../../sr-primitives", default-features = false } -sp-inherents = { package = "substrate-inherents", path = "../../inherents", default-features = false } +slots = { package = "sc-consensus-slots", path = "../../../client/consensus/slots", optional = true } +sp-api = { path = "../../sr-api", default-features = false } +sp-runtime = { path = "../../sr-primitives", default-features = false } +sp-inherents = { package = "sp-inherents", path = "../../inherents", default-features = false } sp-timestamp = { path = "../../timestamp", default-features = false } [features] @@ -24,8 +24,8 @@ std = [ "rstd/std", "schnorrkel", "slots", - "sr-api/std", - "sr-primitives/std", + "sp-api/std", + "sp-runtime/std", "sp-inherents/std", "sp-timestamp/std", ] diff --git a/primitives/consensus/babe/src/digest.rs b/primitives/consensus/babe/src/digest.rs index 95dd247810782..496c348e1dc3d 100644 --- a/primitives/consensus/babe/src/digest.rs +++ b/primitives/consensus/babe/src/digest.rs @@ -22,7 +22,7 @@ use super::{BABE_ENGINE_ID, AuthoritySignature}; use super::{VRF_OUTPUT_LENGTH, VRF_PROOF_LENGTH}; use super::{AuthorityId, AuthorityIndex, SlotNumber, BabeAuthorityWeight}; #[cfg(feature = "std")] -use sr_primitives::{DigestItem, generic::OpaqueDigestItemId}; +use sp_runtime::{DigestItem, generic::OpaqueDigestItemId}; #[cfg(feature = "std")] use std::fmt::Debug; use codec::{Decode, Encode}; @@ -195,7 +195,7 @@ impl Decode for BabePreDigest { /// Information about the next epoch. This is broadcast in the first block /// of the epoch. -#[derive(Decode, Encode, Default, PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)] +#[derive(Decode, Encode, Default, PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)] pub struct NextEpochDescriptor { /// The authorities. pub authorities: Vec<(AuthorityId, BabeAuthorityWeight)>, diff --git a/primitives/consensus/babe/src/lib.rs b/primitives/consensus/babe/src/lib.rs index 532aaa6dc1a9d..cf4bfd1e9878e 100644 --- a/primitives/consensus/babe/src/lib.rs +++ b/primitives/consensus/babe/src/lib.rs @@ -24,7 +24,7 @@ pub mod inherents; use codec::{Encode, Decode}; use rstd::vec::Vec; -use sr_primitives::{ConsensusEngineId, RuntimeDebug}; +use sp_runtime::{ConsensusEngineId, RuntimeDebug}; #[cfg(feature = "std")] pub use digest::{BabePreDigest, CompatibleDigestItem}; @@ -165,7 +165,7 @@ impl slots::SlotData for BabeConfiguration { const SLOT_KEY: &'static [u8] = b"babe_configuration"; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// API necessary for block authorship with BABE. pub trait BabeApi { /// Return the configuration for BABE. Currently, diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 02dc7b579f1f6..b8f5efa4b8410 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-consensus-common" +name = "sp-consensus" version = "2.0.0" authors = ["Parity Technologies "] description = "Common utilities for substrate consensus" @@ -9,13 +9,13 @@ edition = "2018" derive_more = "0.99.2" libp2p = { version = "0.13.0", default-features = false } log = "0.4.8" -primitives = { package = "substrate-primitives", path= "../../core" } -inherents = { package = "substrate-inherents", path = "../../inherents" } +primitives = { package = "sp-core", path= "../../core" } +inherents = { package = "sp-inherents", path = "../../inherents" } futures = { version = "0.3.1", features = ["thread-pool"] } futures-timer = "0.4.0" -rstd = { package = "sr-std", path = "../../sr-std" } -runtime_version = { package = "sr-version", path = "../../sr-version" } -sr-primitives = { path = "../../sr-primitives" } +rstd = { package = "sp-std", path = "../../sr-std" } +runtime_version = { package = "sp-version", path = "../../sr-version" } +sp-runtime = { path = "../../sr-primitives" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } parking_lot = "0.9.0" diff --git a/primitives/consensus/common/src/block_import.rs b/primitives/consensus/common/src/block_import.rs index 344a79167bc31..aab70625ff80f 100644 --- a/primitives/consensus/common/src/block_import.rs +++ b/primitives/consensus/common/src/block_import.rs @@ -16,8 +16,8 @@ //! Block import helpers. -use sr_primitives::traits::{Block as BlockT, DigestItemFor, Header as HeaderT, NumberFor}; -use sr_primitives::Justification; +use sp_runtime::traits::{Block as BlockT, DigestItemFor, Header as HeaderT, NumberFor}; +use sp_runtime::Justification; use std::borrow::Cow; use std::collections::HashMap; use std::sync::Arc; diff --git a/primitives/consensus/common/src/block_validation.rs b/primitives/consensus/common/src/block_validation.rs index be181b05c6f4d..42231bbf4c84c 100644 --- a/primitives/consensus/common/src/block_validation.rs +++ b/primitives/consensus/common/src/block_validation.rs @@ -17,7 +17,7 @@ //! Block announcement validation. use crate::BlockStatus; -use sr_primitives::{generic::BlockId, traits::Block}; +use sp_runtime::{generic::BlockId, traits::Block}; use std::{error::Error, sync::Arc}; /// A type which provides access to chain information. diff --git a/primitives/consensus/common/src/evaluation.rs b/primitives/consensus/common/src/evaluation.rs index 7a3e565aa09d1..875ce41e01a1f 100644 --- a/primitives/consensus/common/src/evaluation.rs +++ b/primitives/consensus/common/src/evaluation.rs @@ -19,7 +19,7 @@ use super::MAX_BLOCK_SIZE; use codec::Encode; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, One, CheckedConversion}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, One, CheckedConversion}; // This is just a best effort to encode the number. None indicated that it's too big to encode // in a u128. diff --git a/primitives/consensus/common/src/import_queue.rs b/primitives/consensus/common/src/import_queue.rs index 614609cc53651..1d8ea0f0ceb0c 100644 --- a/primitives/consensus/common/src/import_queue.rs +++ b/primitives/consensus/common/src/import_queue.rs @@ -26,7 +26,7 @@ //! queues to be instantiated simply. use std::collections::HashMap; -use sr_primitives::{Justification, traits::{Block as BlockT, Header as _, NumberFor}}; +use sp_runtime::{Justification, traits::{Block as BlockT, Header as _, NumberFor}}; use crate::error::Error as ConsensusError; use crate::block_import::{ BlockImport, BlockOrigin, BlockImportParams, ImportedAux, JustificationImport, ImportResult, diff --git a/primitives/consensus/common/src/import_queue/basic_queue.rs b/primitives/consensus/common/src/import_queue/basic_queue.rs index 2ab6d0c5e3b7d..42a31ceb640cf 100644 --- a/primitives/consensus/common/src/import_queue/basic_queue.rs +++ b/primitives/consensus/common/src/import_queue/basic_queue.rs @@ -17,7 +17,7 @@ use std::{mem, pin::Pin, time::Duration}; use futures::{prelude::*, channel::mpsc, task::Context, task::Poll}; use futures_timer::Delay; -use sr_primitives::{Justification, traits::{Block as BlockT, Header as HeaderT, NumberFor}}; +use sp_runtime::{Justification, traits::{Block as BlockT, Header as HeaderT, NumberFor}}; use crate::block_import::BlockOrigin; use crate::import_queue::{ diff --git a/primitives/consensus/common/src/import_queue/buffered_link.rs b/primitives/consensus/common/src/import_queue/buffered_link.rs index b88f1bfd1e884..70304bbe27a18 100644 --- a/primitives/consensus/common/src/import_queue/buffered_link.rs +++ b/primitives/consensus/common/src/import_queue/buffered_link.rs @@ -21,8 +21,8 @@ //! # Example //! //! ``` -//! use substrate_consensus_common::import_queue::Link; -//! # use substrate_consensus_common::import_queue::buffered_link::buffered_link; +//! use sp_consensus::import_queue::Link; +//! # use sp_consensus::import_queue::buffered_link::buffered_link; //! # use test_client::runtime::Block; //! # struct DummyLink; impl Link for DummyLink {} //! # let mut my_link = DummyLink; @@ -38,7 +38,7 @@ //! use futures::{prelude::*, channel::mpsc}; -use sr_primitives::traits::{Block as BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; use std::{pin::Pin, task::Context, task::Poll}; use crate::import_queue::{Origin, Link, BlockImportResult, BlockImportError}; diff --git a/primitives/consensus/common/src/lib.rs b/primitives/consensus/common/src/lib.rs index 3dc1cc7a392a7..b662bf428ab95 100644 --- a/primitives/consensus/common/src/lib.rs +++ b/primitives/consensus/common/src/lib.rs @@ -31,7 +31,7 @@ use std::sync::Arc; use std::time::Duration; -use sr_primitives::{traits::{Block as BlockT, DigestFor}, generic::BlockId}; +use sp_runtime::{traits::{Block as BlockT, DigestFor}, generic::BlockId}; use futures::prelude::*; pub use inherents::InherentData; diff --git a/primitives/consensus/common/src/select_chain.rs b/primitives/consensus/common/src/select_chain.rs index e696db6b877b4..da0bae4900517 100644 --- a/primitives/consensus/common/src/select_chain.rs +++ b/primitives/consensus/common/src/select_chain.rs @@ -15,7 +15,7 @@ // along with Substrate Consensus Common. If not, see . use crate::error::Error; -use sr_primitives::traits::{Block as BlockT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, NumberFor}; /// The SelectChain trait defines the strategy upon which the head is chosen diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 99aa00da8ee8e..f6b658294b5bf 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -1,23 +1,23 @@ [package] -name = "substrate-consensus-pow-primitives" +name = "sp-consensus-pow" version = "2.0.0" authors = ["Parity Technologies "] description = "Primitives for Aura consensus" edition = "2018" [dependencies] -sr-api = { path = "../../sr-api", default-features = false } -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } -sr-primitives = { path = "../../sr-primitives", default-features = false } -primitives = { package = "substrate-primitives", path = "../../core", default-features = false } +sp-api = { path = "../../sr-api", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } +sp-runtime = { path = "../../sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../core", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] default = ["std"] std = [ "rstd/std", - "sr-api/std", - "sr-primitives/std", + "sp-api/std", + "sp-runtime/std", "primitives/std", "codec/std", ] diff --git a/primitives/consensus/pow/src/lib.rs b/primitives/consensus/pow/src/lib.rs index 400ed0594a026..69e088bd9ce87 100644 --- a/primitives/consensus/pow/src/lib.rs +++ b/primitives/consensus/pow/src/lib.rs @@ -19,7 +19,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::vec::Vec; -use sr_primitives::ConsensusEngineId; +use sp_runtime::ConsensusEngineId; use codec::Decode; /// The `ConsensusEngineId` of PoW. @@ -47,7 +47,7 @@ impl TotalDifficulty for u128 { } } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// API necessary for timestamp-based difficulty adjustment algorithms. pub trait TimestampApi { /// Return the timestamp in the current block. diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index e15c5ac49f5fa..ee7cbb87c9d5d 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "substrate-primitives" +name = "sp-core" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } rustc-hex = { version = "2.0.1", default-features = false } log = { version = "0.4.8", default-features = false } @@ -33,13 +33,13 @@ lazy_static = { version = "1.4.0", default-features = false, optional = true } parking_lot = { version = "0.9.0", optional = true } libsecp256k1 = { version = "0.3.0", default-features = false, optional = true } tiny-keccak = { version = "2.0.1", features = ["keccak"], optional = true } -substrate-debug-derive = { version = "2.0.0", path = "./debug-derive" } -externalities = { package = "substrate-externalities", path = "../externalities", optional = true } -primitives-storage = { package = "substrate-primitives-storage", path = "storage", default-features = false } -runtime-interface = { package = "substrate-runtime-interface", path = "../runtime-interface", default-features = false } +sp-debug-derive = { version = "2.0.0", path = "./debug-derive" } +externalities = { package = "sp-externalities", path = "../externalities", optional = true } +primitives-storage = { package = "sp-core-storage", path = "storage", default-features = false } +runtime-interface = { package = "sp-runtime-interface", path = "../runtime-interface", default-features = false } [dev-dependencies] -substrate-serializer = { path = "../serializer" } +sp-serializer = { path = "../serializer" } pretty_assertions = "0.6.1" hex-literal = "0.2.1" rand = "0.7.2" @@ -89,7 +89,7 @@ std = [ "num-traits/std", "libsecp256k1", "tiny-keccak", - "substrate-debug-derive/std", + "sp-debug-derive/std", "externalities", "primitives-storage/std", "runtime-interface/std", diff --git a/primitives/core/benches/bench.rs b/primitives/core/benches/bench.rs index 5245af44a8131..bac7eb41cada6 100644 --- a/primitives/core/benches/bench.rs +++ b/primitives/core/benches/bench.rs @@ -16,7 +16,7 @@ #[macro_use] extern crate criterion; -use substrate_primitives as primitives; +use sp_core as primitives; use criterion::{Criterion, black_box, Bencher, Fun}; use std::time::Duration; use primitives::crypto::Pair as _; diff --git a/primitives/core/debug-derive/Cargo.toml b/primitives/core/debug-derive/Cargo.toml index a7bf90695ab93..9c65cb34f5fa9 100644 --- a/primitives/core/debug-derive/Cargo.toml +++ b/primitives/core/debug-derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-debug-derive" +name = "sp-debug-derive" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/primitives/core/debug-derive/src/lib.rs b/primitives/core/debug-derive/src/lib.rs index 5e6cf6098b30e..ac63441124ec6 100644 --- a/primitives/core/debug-derive/src/lib.rs +++ b/primitives/core/debug-derive/src/lib.rs @@ -25,7 +25,7 @@ //! blob from unneeded code. //! //! ```rust -//! #[derive(substrate_debug_derive::RuntimeDebug)] +//! #[derive(sp_debug_derive::RuntimeDebug)] //! struct MyStruct; //! //! assert_eq!(format!("{:?}", MyStruct), "MyStruct"); diff --git a/primitives/core/debug-derive/tests/tests.rs b/primitives/core/debug-derive/tests/tests.rs index 63ad6a3e8d497..11f45fcc45cda 100644 --- a/primitives/core/debug-derive/tests/tests.rs +++ b/primitives/core/debug-derive/tests/tests.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use substrate_debug_derive::RuntimeDebug; +use sp_debug_derive::RuntimeDebug; #[derive(RuntimeDebug)] struct Unnamed(u64, String); diff --git a/primitives/core/src/hash.rs b/primitives/core/src/hash.rs index c63463e32ae2b..8b1f9a523320d 100644 --- a/primitives/core/src/hash.rs +++ b/primitives/core/src/hash.rs @@ -31,7 +31,7 @@ pub fn convert_hash, H2: AsRef<[u8]>>(src: &H2) -> H1 #[cfg(test)] mod tests { use super::*; - use substrate_serializer as ser; + use sp_serializer as ser; #[test] fn test_h160() { diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 900728afbfb44..902cd55b58a93 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -42,7 +42,7 @@ pub use serde; #[doc(hidden)] pub use codec::{Encode, Decode}; -pub use substrate_debug_derive::RuntimeDebug; +pub use sp_debug_derive::RuntimeDebug; #[cfg(feature = "std")] pub use impl_serde::serialize as bytes; diff --git a/primitives/core/src/testing.rs b/primitives/core/src/testing.rs index e5d301008e3d4..c87c170d2060d 100644 --- a/primitives/core/src/testing.rs +++ b/primitives/core/src/testing.rs @@ -141,7 +141,7 @@ impl crate::traits::BareCryptoStore for KeyStore { /// # Example /// /// ``` -/// # use substrate_primitives::wasm_export_functions; +/// # use sp_core::wasm_export_functions; /// /// wasm_export_functions! { /// fn test_in_wasm(value: bool, another_value: Vec) -> bool { diff --git a/primitives/core/src/uint.rs b/primitives/core/src/uint.rs index c835cf5773518..330fffb9f12f4 100644 --- a/primitives/core/src/uint.rs +++ b/primitives/core/src/uint.rs @@ -22,7 +22,7 @@ pub use primitive_types::U256; mod tests { use super::*; use codec::{Encode, Decode}; - use substrate_serializer as ser; + use sp_serializer as ser; macro_rules! test { ($name: ident, $test_name: ident) => { diff --git a/primitives/core/storage/Cargo.toml b/primitives/core/storage/Cargo.toml index 1e5d7ee8b4548..243184d038260 100644 --- a/primitives/core/storage/Cargo.toml +++ b/primitives/core/storage/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "substrate-primitives-storage" +name = "sp-core-storage" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" description = "Storage related primitives" [dependencies] -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } impl-serde = { version = "0.2.3", optional = true } -substrate-debug-derive = { version = "2.0.0", path = "../debug-derive" } +sp-debug-derive = { version = "2.0.0", path = "../debug-derive" } [features] default = [ "std" ] diff --git a/primitives/core/storage/src/lib.rs b/primitives/core/storage/src/lib.rs index ba36e2c80f81e..ebb23023b96b2 100644 --- a/primitives/core/storage/src/lib.rs +++ b/primitives/core/storage/src/lib.rs @@ -20,7 +20,7 @@ #[cfg(feature = "std")] use serde::{Serialize, Deserialize}; -use substrate_debug_derive::RuntimeDebug; +use sp_debug_derive::RuntimeDebug; use rstd::{vec::Vec, borrow::Cow}; diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index ec4fa9a9a5d29..5b5e8c1ee88fd 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "substrate-externalities" +name = "sp-externalities" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives-storage = { package = "substrate-primitives-storage", path = "../core/storage" } -rstd = { package = "sr-std", path = "../sr-std" } +primitives-storage = { package = "sp-core-storage", path = "../core/storage" } +rstd = { package = "sp-std", path = "../sr-std" } environmental = { version = "1.0.2" } diff --git a/primitives/externalities/src/extensions.rs b/primitives/externalities/src/extensions.rs index a1a83cb197d4f..c5535d0bab46d 100644 --- a/primitives/externalities/src/extensions.rs +++ b/primitives/externalities/src/extensions.rs @@ -41,7 +41,7 @@ pub trait Extension: Send + Any { /// /// # Example /// ``` -/// # use substrate_externalities::decl_extension; +/// # use sp_externalities::decl_extension; /// decl_extension! { /// /// Some test extension /// struct TestExt(String); diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index e9a166d2875bb..f1767027752c6 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "substrate-finality-grandpa-primitives" +name = "sp-finality-granpda" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sr-api = { path = "../sr-api", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } +sp-api = { path = "../sr-api", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } [features] default = ["std"] @@ -19,6 +19,6 @@ std = [ "codec/std", "rstd/std", "serde", - "sr-api/std", - "sr-primitives/std", + "sp-api/std", + "sp-runtime/std", ] diff --git a/primitives/finality-grandpa/src/lib.rs b/primitives/finality-grandpa/src/lib.rs index ff26b6a68ac2d..0e7ed9926f93c 100644 --- a/primitives/finality-grandpa/src/lib.rs +++ b/primitives/finality-grandpa/src/lib.rs @@ -24,7 +24,7 @@ extern crate alloc; #[cfg(feature = "std")] use serde::Serialize; use codec::{Encode, Decode, Input, Codec}; -use sr_primitives::{ConsensusEngineId, RuntimeDebug}; +use sp_runtime::{ConsensusEngineId, RuntimeDebug}; use rstd::borrow::Cow; use rstd::vec::Vec; @@ -210,7 +210,7 @@ impl<'a> Decode for VersionedAuthorityList<'a> { } } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// APIs for integrating the GRANDPA finality gadget into runtimes. /// This should be implemented on the runtime side. /// diff --git a/primitives/finality-tracker/Cargo.toml b/primitives/finality-tracker/Cargo.toml index 2f7ddf916b67e..812596beaa144 100644 --- a/primitives/finality-tracker/Cargo.toml +++ b/primitives/finality-tracker/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false } -rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false } +inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false } +rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false } [features] default = ["std"] diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index f01bb9d3a9fef..0d33b961ed89a 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "substrate-inherents" +name = "sp-inherents" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] parking_lot = { version = "0.9.0", optional = true } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] } derive_more = { version = "0.99.2", optional = true } diff --git a/primitives/keyring/Cargo.toml b/primitives/keyring/Cargo.toml index 5960f7be16b2f..25d8a3354029c 100644 --- a/primitives/keyring/Cargo.toml +++ b/primitives/keyring/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "substrate-keyring" +name = "sp-keyring" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives = { package = "substrate-primitives", path = "../core" } -sr-primitives = { path = "../sr-primitives" } +primitives = { package = "sp-core", path = "../core" } +sp-runtime = { path = "../sr-primitives" } lazy_static = "1.4.0" strum = { version = "0.16.0", features = ["derive"] } diff --git a/primitives/keyring/src/ed25519.rs b/primitives/keyring/src/ed25519.rs index 4a3e090c76846..7174d1cc43bd4 100644 --- a/primitives/keyring/src/ed25519.rs +++ b/primitives/keyring/src/ed25519.rs @@ -20,7 +20,7 @@ use std::{collections::HashMap, ops::Deref}; use lazy_static::lazy_static; use primitives::{ed25519::{Pair, Public, Signature}, Pair as PairT, Public as PublicT, H256}; pub use primitives::ed25519; -use sr_primitives::AccountId32; +use sp_runtime::AccountId32; /// Set of test accounts. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display, strum::EnumIter)] @@ -106,9 +106,9 @@ impl From for &'static str { } } -impl From for sr_primitives::MultiSigner { +impl From for sp_runtime::MultiSigner { fn from(x: Keyring) -> Self { - sr_primitives::MultiSigner::Ed25519(x.into()) + sp_runtime::MultiSigner::Ed25519(x.into()) } } diff --git a/primitives/keyring/src/sr25519.rs b/primitives/keyring/src/sr25519.rs index ff132d8968f08..a14566bbab21d 100644 --- a/primitives/keyring/src/sr25519.rs +++ b/primitives/keyring/src/sr25519.rs @@ -21,7 +21,7 @@ use std::ops::Deref; use lazy_static::lazy_static; use primitives::{sr25519::{Pair, Public, Signature}, Pair as PairT, Public as PublicT, H256}; pub use primitives::sr25519; -use sr_primitives::AccountId32; +use sp_runtime::AccountId32; /// Set of test accounts. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display, strum::EnumIter)] @@ -107,9 +107,9 @@ impl From for &'static str { } } -impl From for sr_primitives::MultiSigner { +impl From for sp_runtime::MultiSigner { fn from(x: Keyring) -> Self { - sr_primitives::MultiSigner::Sr25519(x.into()) + sp_runtime::MultiSigner::Sr25519(x.into()) } } diff --git a/primitives/offchain/Cargo.toml b/primitives/offchain/Cargo.toml index 5b451ee6d1053..28a3ad198aa36 100644 --- a/primitives/offchain/Cargo.toml +++ b/primitives/offchain/Cargo.toml @@ -1,18 +1,18 @@ [package] description = "Substrate offchain workers primitives" -name = "substrate-offchain-primitives" +name = "sp-offchain" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../sr-api", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } +sp-api = { path = "../sr-api", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } [features] default = ["std"] std = [ - "sr-api/std", - "sr-primitives/std" + "sp-api/std", + "sp-runtime/std" ] diff --git a/primitives/offchain/src/lib.rs b/primitives/offchain/src/lib.rs index 876fcf49a2e74..db7efcd0ccc2d 100644 --- a/primitives/offchain/src/lib.rs +++ b/primitives/offchain/src/lib.rs @@ -19,12 +19,12 @@ #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] -use sr_primitives::traits::NumberFor; +use sp_runtime::traits::NumberFor; /// Local Storage Prefix used by the Offchain Worker API to pub const STORAGE_PREFIX: &[u8] = b"storage"; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The offchain worker api. pub trait OffchainWorkerApi { /// Starts the off-chain task for given block number. diff --git a/primitives/panic-handler/Cargo.toml b/primitives/panic-handler/Cargo.toml index 9724b9291926a..19e34352cf806 100644 --- a/primitives/panic-handler/Cargo.toml +++ b/primitives/panic-handler/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-panic-handler" +name = "sp-panic-handler" version = "2.0.0" authors = ["Parity Technologies "] description = "Substrate panic handler." diff --git a/primitives/phragmen/Cargo.toml b/primitives/phragmen/Cargo.toml index 18dc3c29fb7f5..656ce06acd901 100644 --- a/primitives/phragmen/Cargo.toml +++ b/primitives/phragmen/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "substrate-phragmen" +name = "sp-phragmen" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-primitives = { path = "../../primitives/sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../../primitives/sr-primitives", default-features = false } [dev-dependencies] substrate-test-utils = { path = "../../test/utils" } -runtime-io ={ package = "sr-io", path = "../../primitives/sr-io" } +runtime-io ={ package = "sp-io", path = "../../primitives/sr-io" } rand = "0.7.2" [features] @@ -19,5 +19,5 @@ default = ["std"] std = [ "serde", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", ] diff --git a/primitives/phragmen/benches/phragmen.rs b/primitives/phragmen/benches/phragmen.rs index b73811b33fa55..33b80ed5a6b54 100644 --- a/primitives/phragmen/benches/phragmen.rs +++ b/primitives/phragmen/benches/phragmen.rs @@ -23,11 +23,11 @@ extern crate test; use test::Bencher; use rand::{self, Rng}; -extern crate substrate_phragmen as phragmen; +extern crate sp_phragmen as phragmen; use phragmen::{Support, SupportMap, PhragmenStakedAssignment}; use std::collections::BTreeMap; -use sr_primitives::traits::{Convert, SaturatedConversion}; +use sp_runtime::traits::{Convert, SaturatedConversion}; const VALIDATORS: u64 = 1000; const NOMINATORS: u64 = 10_000; diff --git a/primitives/phragmen/src/lib.rs b/primitives/phragmen/src/lib.rs index d027bcfa8d654..c5e9d97fc7a74 100644 --- a/primitives/phragmen/src/lib.rs +++ b/primitives/phragmen/src/lib.rs @@ -34,9 +34,9 @@ #![cfg_attr(not(feature = "std"), no_std)] use rstd::{prelude::*, collections::btree_map::BTreeMap}; -use sr_primitives::RuntimeDebug; -use sr_primitives::{helpers_128bit::multiply_by_rational, Perbill, Rational128}; -use sr_primitives::traits::{Zero, Convert, Member, SimpleArithmetic, Saturating, Bounded}; +use sp_runtime::RuntimeDebug; +use sp_runtime::{helpers_128bit::multiply_by_rational, Perbill, Rational128}; +use sp_runtime::traits::{Zero, Convert, Member, SimpleArithmetic, Saturating, Bounded}; #[cfg(test)] mod mock; diff --git a/primitives/phragmen/src/mock.rs b/primitives/phragmen/src/mock.rs index fdd218f4f4540..edb0826b069ff 100644 --- a/primitives/phragmen/src/mock.rs +++ b/primitives/phragmen/src/mock.rs @@ -19,7 +19,7 @@ #![cfg(test)] use crate::{elect, PhragmenResult, PhragmenAssignment}; -use sr_primitives::{ +use sp_runtime::{ assert_eq_error_rate, Perbill, traits::{Convert, Member, SaturatedConversion} }; diff --git a/primitives/phragmen/src/tests.rs b/primitives/phragmen/src/tests.rs index 8aaa45dce0242..eceedb88474da 100644 --- a/primitives/phragmen/src/tests.rs +++ b/primitives/phragmen/src/tests.rs @@ -21,7 +21,7 @@ use crate::mock::*; use crate::{elect, PhragmenResult}; use substrate_test_utils::assert_eq_uvec; -use sr_primitives::Perbill; +use sp_runtime::Perbill; #[test] fn float_phragmen_poc_works() { diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index eb4cd5a723f43..9e44f407d097a 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "substrate-rpc-primitives" +name = "sp-rpc" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] serde = { version = "1.0.101", features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../core" } +primitives = { package = "sp-core", path = "../core" } [dev-dependencies] serde_json = "1.0.41" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index 7af9b8b0887e5..e9046335659de 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -1,25 +1,25 @@ [package] -name = "substrate-runtime-interface" +name = "sp-runtime-interface" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -wasm-interface = { package = "substrate-wasm-interface", path = "../wasm-interface", optional = true } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -substrate-runtime-interface-proc-macro = { path = "proc-macro" } -externalities = { package = "substrate-externalities", path = "../externalities", optional = true } +wasm-interface = { package = "sp-wasm-interface", path = "../wasm-interface", optional = true } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime-interface-proc-macro = { path = "proc-macro" } +externalities = { package = "sp-externalities", path = "../externalities", optional = true } codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } environmental = { version = "1.0.2", optional = true } static_assertions = "1.0.0" primitive-types = { version = "0.6.1", default-features = false } [dev-dependencies] -executor = { package = "substrate-executor", path = "../../client/executor" } -test-wasm = { package = "substrate-runtime-interface-test-wasm", path = "test-wasm" } -state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" } -primitives = { package = "substrate-primitives", path = "../core" } -runtime-io = { package = "sr-io", path = "../sr-io" } +executor = { package = "sc-executor", path = "../../client/executor" } +test-wasm = { package = "sp-runtime-interface-test-wasm", path = "test-wasm" } +state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" } +primitives = { package = "sp-core", path = "../core" } +runtime-io = { package = "sp-io", path = "../sr-io" } [features] default = [ "std" ] diff --git a/primitives/runtime-interface/proc-macro/Cargo.toml b/primitives/runtime-interface/proc-macro/Cargo.toml index 0b073b854749d..11a01a7a7c064 100644 --- a/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-runtime-interface-proc-macro" +name = "sp-runtime-interface-proc-macro" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -15,9 +15,9 @@ Inflector = "0.11.4" proc-macro-crate = "0.1.4" [dev-dependencies] -runtime-interface = { package = "substrate-runtime-interface", path = ".." } +runtime-interface = { package = "sp-runtime-interface", path = ".." } codec = { package = "parity-scale-codec", version = "1.0.6", features = [ "derive" ] } -externalities = { package = "substrate-externalities", path = "../../externalities" } +externalities = { package = "sp-externalities", path = "../../externalities" } rustversion = "1.0.0" trybuild = "1.0.17" diff --git a/primitives/runtime-interface/proc-macro/src/lib.rs b/primitives/runtime-interface/proc-macro/src/lib.rs index 991fab7569388..023a97c117c80 100644 --- a/primitives/runtime-interface/proc-macro/src/lib.rs +++ b/primitives/runtime-interface/proc-macro/src/lib.rs @@ -101,7 +101,7 @@ mod utils; /// .expect("`set_or_clear` called outside of an Externalities-provided environment.") /// } /// -/// /// This type implements the `HostFunctions` trait (from `substrate-wasm-interface`) and +/// /// This type implements the `HostFunctions` trait (from `sp-wasm-interface`) and /// /// provides the host implementation for the wasm side. The host implementation converts the /// /// arguments from wasm to native and calls the corresponding native function. /// /// @@ -132,7 +132,7 @@ mod utils; /// } /// } /// -/// /// The type is actually `ExchangeableFunction` (from `substrate-runtime-interface`). +/// /// The type is actually `ExchangeableFunction` (from `sp-runtime-interface`). /// /// /// /// This can be used to replace the implementation of the `call_some_complex_code` function. /// /// Instead of calling into the host, the callee will automatically call the other @@ -161,7 +161,7 @@ mod utils; /// # Argument types /// /// The macro supports any kind of argument type, as long as it implements `RIType` and the required -/// `FromFFIValue`/`IntoFFIValue` from `substrate-runtime-interface`. The macro will convert each +/// `FromFFIValue`/`IntoFFIValue` from `sp-runtime-interface`. The macro will convert each /// argument to the corresponding FFI representation and will call into the host using this FFI /// representation. On the host each argument is converted back to the native representation and /// the native implementation is called. Any return value is handled in the same way. @@ -174,7 +174,7 @@ mod utils; /// /// 1. The generated functions are not callable from the native side. /// 2. The trait as shown above is not implemented for `Externalities` and is instead implemented -/// for `FunctionExecutor` (from `substrate-wasm-interface`). +/// for `FunctionExecutor` (from `sp-wasm-interface`). #[proc_macro_attribute] pub fn runtime_interface( attrs: proc_macro::TokenStream, diff --git a/primitives/runtime-interface/proc-macro/src/utils.rs b/primitives/runtime-interface/proc-macro/src/utils.rs index d868452dcec2a..d5ae107e0b431 100644 --- a/primitives/runtime-interface/proc-macro/src/utils.rs +++ b/primitives/runtime-interface/proc-macro/src/utils.rs @@ -33,10 +33,10 @@ use inflector::Inflector; /// Generates the include for the runtime-interface crate. pub fn generate_runtime_interface_include() -> TokenStream { - if env::var("CARGO_PKG_NAME").unwrap() == "substrate-runtime-interface" { + if env::var("CARGO_PKG_NAME").unwrap() == "sp-runtime-interface" { TokenStream::new() } else { - match crate_name("substrate-runtime-interface") { + match crate_name("sp-runtime-interface") { Ok(crate_name) => { let crate_name = Ident::new(&crate_name, Span::call_site()); quote!( @@ -52,10 +52,10 @@ pub fn generate_runtime_interface_include() -> TokenStream { } } -/// Generates the access to the `substrate-runtime-interface` crate. +/// Generates the access to the `sp-runtime-interface` crate. pub fn generate_crate_access() -> TokenStream { - if env::var("CARGO_PKG_NAME").unwrap() == "substrate-runtime-interface" { - quote!( substrate_runtime_interface ) + if env::var("CARGO_PKG_NAME").unwrap() == "sp-runtime-interface" { + quote!( sp_runtime_interface ) } else { quote!( proc_macro_runtime_interface ) } diff --git a/primitives/runtime-interface/src/lib.rs b/primitives/runtime-interface/src/lib.rs index fb70d252a6772..c6b006f4e6982 100644 --- a/primitives/runtime-interface/src/lib.rs +++ b/primitives/runtime-interface/src/lib.rs @@ -59,7 +59,7 @@ //! Declaring a runtime interface is similar to declaring a trait in Rust: //! //! ``` -//! #[substrate_runtime_interface::runtime_interface] +//! #[sp_runtime_interface::runtime_interface] //! trait RuntimeInterface { //! fn some_function(value: &[u8]) -> bool { //! value.iter().all(|v| *v > 125) @@ -79,7 +79,7 @@ pub use wasm_interface; #[doc(hidden)] pub use rstd; -pub use substrate_runtime_interface_proc_macro::runtime_interface; +pub use sp_runtime_interface_proc_macro::runtime_interface; #[doc(hidden)] #[cfg(feature = "std")] diff --git a/primitives/runtime-interface/src/pass_by.rs b/primitives/runtime-interface/src/pass_by.rs index 46265237c0c47..3fcf04b1c49b0 100644 --- a/primitives/runtime-interface/src/pass_by.rs +++ b/primitives/runtime-interface/src/pass_by.rs @@ -35,7 +35,7 @@ use rstd::{marker::PhantomData, convert::TryFrom}; #[cfg(not(feature = "std"))] use rstd::{slice, vec::Vec}; -pub use substrate_runtime_interface_proc_macro::{PassByCodec, PassByInner, PassByEnum}; +pub use sp_runtime_interface_proc_macro::{PassByCodec, PassByInner, PassByEnum}; /// Something that should be passed between wasm and the host using the given strategy. /// @@ -145,7 +145,7 @@ impl FromFFIValue for T { /// /// # Example /// ``` -/// # use substrate_runtime_interface::pass_by::{PassBy, Codec}; +/// # use sp_runtime_interface::pass_by::{PassBy, Codec}; /// #[derive(codec::Encode, codec::Decode)] /// struct Test; /// @@ -237,7 +237,7 @@ pub trait PassByInner: Sized { /// /// # Example /// ``` -/// # use substrate_runtime_interface::pass_by::{PassBy, Inner, PassByInner}; +/// # use sp_runtime_interface::pass_by::{PassBy, Inner, PassByInner}; /// struct Test([u8; 32]); /// /// impl PassBy for Test { @@ -311,7 +311,7 @@ impl, I: RIType> RIType for Inner { /// /// # Example /// ``` -/// # use substrate_runtime_interface::pass_by::{PassBy, Enum}; +/// # use sp_runtime_interface::pass_by::{PassBy, Enum}; /// #[derive(Clone, Copy)] /// enum Test { /// Test1, diff --git a/primitives/runtime-interface/test-wasm/Cargo.toml b/primitives/runtime-interface/test-wasm/Cargo.toml index 13d6e2591421b..4df59d03b06f7 100644 --- a/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/primitives/runtime-interface/test-wasm/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "substrate-runtime-interface-test-wasm" +name = "sp-runtime-interface-test-wasm" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" [dependencies] -runtime-interface = { package = "substrate-runtime-interface", path = "../", default-features = false } -rstd = { package = "sr-std", path = "../../sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../../sr-io", default-features = false } -primitives = { package = "substrate-primitives", path = "../../core", default-features = false } +runtime-interface = { package = "sp-runtime-interface", path = "../", default-features = false } +rstd = { package = "sp-std", path = "../../sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../../sr-io", default-features = false } +primitives = { package = "sp-core", path = "../../core", default-features = false } [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.3", path = "../../../client/utils/wasm-builder-runner" } diff --git a/primitives/serializer/Cargo.toml b/primitives/serializer/Cargo.toml index 4e0e706e2fab2..39fdeb0e7ee3c 100644 --- a/primitives/serializer/Cargo.toml +++ b/primitives/serializer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-serializer" +name = "sp-serializer" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index d1490905c200b..447cf8ad1b8b1 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "substrate-session" +name = "sp-sesssion" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../sr-api", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-primitives = { path = "../sr-primitives", optional = true } +sp-api = { path = "../sr-api", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../sr-primitives", optional = true } [features] default = [ "std" ] -std = [ "sr-api/std", "rstd/std", "sr-primitives" ] +std = [ "sp-api/std", "rstd/std", "sp-runtime" ] diff --git a/primitives/session/src/lib.rs b/primitives/session/src/lib.rs index adc7629c36816..2c4b118d5b359 100644 --- a/primitives/session/src/lib.rs +++ b/primitives/session/src/lib.rs @@ -21,9 +21,9 @@ use rstd::vec::Vec; #[cfg(feature = "std")] -use sr_primitives::{generic::BlockId, traits::{ProvideRuntimeApi, Block as BlockT}}; +use sp_runtime::{generic::BlockId, traits::{ProvideRuntimeApi, Block as BlockT}}; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// Session keys runtime api. pub trait SessionKeys { /// Generate a set of session keys with optionally using the given seed. @@ -44,7 +44,7 @@ pub fn generate_initial_session_keys( client: std::sync::Arc, at: &BlockId, seeds: Vec, -) -> Result<(), <::Api as sr_api::ApiExt>::Error> +) -> Result<(), <::Api as sp_api::ApiExt>::Error> where Block: BlockT, T: ProvideRuntimeApi, diff --git a/primitives/sr-api/Cargo.toml b/primitives/sr-api/Cargo.toml index a23a36284d8cb..530c97478fe92 100644 --- a/primitives/sr-api/Cargo.toml +++ b/primitives/sr-api/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "sr-api" +name = "sp-api" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -sr-api-proc-macro = { path = "proc-macro" } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } -sr-version = { path = "../sr-version", default-features = false } -state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine", optional = true } +sp-api-proc-macro = { path = "proc-macro" } +primitives = { package = "sp-core", path = "../core", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } +sp-version = { path = "../sr-version", default-features = false } +state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine", optional = true } [dev-dependencies] criterion = "0.3.0" @@ -27,7 +27,7 @@ std = [ "codec/std", "primitives/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "state-machine", - "sr-version/std", + "sp-version/std", ] diff --git a/primitives/sr-api/benches/bench.rs b/primitives/sr-api/benches/bench.rs index 49c8e1e380415..59bac57f139a6 100644 --- a/primitives/sr-api/benches/bench.rs +++ b/primitives/sr-api/benches/bench.rs @@ -19,10 +19,10 @@ use test_client::{ DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt, runtime::TestAPI, }; -use sr_primitives::{generic::BlockId, traits::ProvideRuntimeApi}; +use sp_runtime::{generic::BlockId, traits::ProvideRuntimeApi}; use state_machine::ExecutionStrategy; -fn sr_api_benchmark(c: &mut Criterion) { +fn sp_api_benchmark(c: &mut Criterion) { c.bench_function("add one with same runtime api", |b| { let client = test_client::new(); let runtime_api = client.runtime_api(); @@ -68,5 +68,5 @@ fn sr_api_benchmark(c: &mut Criterion) { }); } -criterion_group!(benches, sr_api_benchmark); +criterion_group!(benches, sp_api_benchmark); criterion_main!(benches); diff --git a/primitives/sr-api/proc-macro/Cargo.toml b/primitives/sr-api/proc-macro/Cargo.toml index bd6418c458f0a..7eb6bcdb8bb09 100644 --- a/primitives/sr-api/proc-macro/Cargo.toml +++ b/primitives/sr-api/proc-macro/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-api-proc-macro" +name = "sp-api-proc-macro" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -15,9 +15,9 @@ blake2-rfc = "0.2.18" proc-macro-crate = "0.1.4" [dev-dependencies] -sr-api = { path = ".." } -sr-primitives = { path = "../../sr-primitives" } -sr-version = { path = "../../sr-version" } +sp-api = { path = ".." } +sp-runtime = { path = "../../sr-primitives" } +sp-version = { path = "../../sr-version" } test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" } # Required for the doc tests diff --git a/primitives/sr-api/proc-macro/src/lib.rs b/primitives/sr-api/proc-macro/src/lib.rs index 913e6e9d04bfb..d82c31ec9fa62 100644 --- a/primitives/sr-api/proc-macro/src/lib.rs +++ b/primitives/sr-api/proc-macro/src/lib.rs @@ -44,9 +44,9 @@ mod utils; /// # Example /// /// ```rust -/// use sr_version::create_runtime_str; +/// use sp_version::create_runtime_str; /// # -/// # use sr_primitives::traits::GetNodeBlockType; +/// # use sp_runtime::traits::GetNodeBlockType; /// # use test_client::runtime::{Block, Header}; /// # /// # /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -56,7 +56,7 @@ mod utils; /// # type NodeBlock = Block; /// # } /// # -/// # sr_api::decl_runtime_apis! { +/// # sp_api::decl_runtime_apis! { /// # /// Declare the api trait. /// # pub trait Balance { /// # /// Get the balance. @@ -70,9 +70,9 @@ mod utils; /// # } /// /// /// All runtime api implementations need to be done in one call of the macro! -/// sr_api::impl_runtime_apis! { -/// # impl sr_api::Core for Runtime { -/// # fn version() -> sr_version::RuntimeVersion { +/// sp_api::impl_runtime_apis! { +/// # impl sp_api::Core for Runtime { +/// # fn version() -> sp_version::RuntimeVersion { /// # unimplemented!() /// # } /// # fn execute_block(_block: Block) {} @@ -96,7 +96,7 @@ mod utils; /// } /// /// /// Runtime version. This needs to be declared for each runtime. -/// pub const VERSION: sr_version::RuntimeVersion = sr_version::RuntimeVersion { +/// pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion { /// spec_name: create_runtime_str!("node"), /// impl_name: create_runtime_str!("test-node"), /// authoring_version: 1, @@ -127,7 +127,7 @@ pub fn impl_runtime_apis(input: TokenStream) -> TokenStream { /// # Example /// /// ```rust -/// sr_api::decl_runtime_apis! { +/// sp_api::decl_runtime_apis! { /// /// Declare the api trait. /// pub trait Balance { /// /// Get the balance. @@ -159,7 +159,7 @@ pub fn impl_runtime_apis(input: TokenStream) -> TokenStream { /// spec version!). Such a method also does not need to be implemented in the runtime. /// /// ```rust -/// sr_api::decl_runtime_apis! { +/// sp_api::decl_runtime_apis! { /// /// Declare the api trait. /// #[api_version(2)] /// pub trait Balance { diff --git a/primitives/sr-api/proc-macro/src/utils.rs b/primitives/sr-api/proc-macro/src/utils.rs index a46397be1b849..859f37df56bbf 100644 --- a/primitives/sr-api/proc-macro/src/utils.rs +++ b/primitives/sr-api/proc-macro/src/utils.rs @@ -32,22 +32,22 @@ pub fn unwrap_or_error(res: Result) -> TokenStream { } fn generate_hidden_includes_mod_name(unique_id: &'static str) -> Ident { - Ident::new(&format!("sr_api_hidden_includes_{}", unique_id), Span::call_site()) + Ident::new(&format!("sp_api_hidden_includes_{}", unique_id), Span::call_site()) } /// Generates the hidden includes that are required to make the macro independent from its scope. pub fn generate_hidden_includes(unique_id: &'static str) -> TokenStream { - if env::var("CARGO_PKG_NAME").unwrap() == "sr-api" { + if env::var("CARGO_PKG_NAME").unwrap() == "sp-api" { TokenStream::new() } else { let mod_name = generate_hidden_includes_mod_name(unique_id); - match crate_name("sr-api") { + match crate_name("sp-api") { Ok(client_name) => { let client_name = Ident::new(&client_name, Span::call_site()); quote!( #[doc(hidden)] mod #mod_name { - pub extern crate #client_name as sr_api; + pub extern crate #client_name as sp_api; } ) }, @@ -60,13 +60,13 @@ pub fn generate_hidden_includes(unique_id: &'static str) -> TokenStream { }.into() } -/// Generates the access to the `substrate_client` crate. +/// Generates the access to the `sc_client` crate. pub fn generate_crate_access(unique_id: &'static str) -> TokenStream { - if env::var("CARGO_PKG_NAME").unwrap() == "sr-api" { + if env::var("CARGO_PKG_NAME").unwrap() == "sp-api" { quote!( crate ) } else { let mod_name = generate_hidden_includes_mod_name(unique_id); - quote!( self::#mod_name::sr_api ) + quote!( self::#mod_name::sp_api ) }.into() } diff --git a/primitives/sr-api/src/lib.rs b/primitives/sr-api/src/lib.rs index 4a5cbf513f13e..edbf567ea65d5 100644 --- a/primitives/sr-api/src/lib.rs +++ b/primitives/sr-api/src/lib.rs @@ -40,7 +40,7 @@ pub use primitives::NativeOrEncoded; #[cfg(not(feature = "std"))] pub use primitives::to_substrate_wasm_fn_return_value; #[doc(hidden)] -pub use sr_primitives::{ +pub use sp_runtime::{ traits::{ Block as BlockT, GetNodeBlockType, GetRuntimeBlockType, Header as HeaderT, ApiRef, RuntimeApiInfo, Hash as HashT, @@ -50,7 +50,7 @@ pub use sr_primitives::{ #[doc(hidden)] pub use primitives::{offchain, ExecutionContext}; #[doc(hidden)] -pub use sr_version::{ApiId, RuntimeVersion, ApisVec, create_apis_vec}; +pub use sp_version::{ApiId, RuntimeVersion, ApisVec, create_apis_vec}; #[doc(hidden)] pub use rstd::{slice, mem}; #[cfg(feature = "std")] @@ -61,7 +61,7 @@ use primitives::OpaqueMetadata; #[cfg(feature = "std")] use std::{panic::UnwindSafe, cell::RefCell}; -pub use sr_api_proc_macro::{decl_runtime_apis, impl_runtime_apis}; +pub use sp_api_proc_macro::{decl_runtime_apis, impl_runtime_apis}; #[cfg(feature = "std")] /// A type that records all accessed trie nodes and generates a proof out of it. @@ -176,7 +176,7 @@ pub trait CallRuntimeAt { /// Extracts the `Api::Error` for a type that provides a runtime api. #[cfg(feature = "std")] pub type ApiErrorFor = < - ::Api as ApiExt + ::Api as ApiExt >::Error; decl_runtime_apis! { diff --git a/primitives/sr-api/test/Cargo.toml b/primitives/sr-api/test/Cargo.toml index 5cdbdc861e6e3..af3aaf67fa256 100644 --- a/primitives/sr-api/test/Cargo.toml +++ b/primitives/sr-api/test/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "sr-api-test" +name = "sp-api-test" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../" } +sp-api = { path = "../" } test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" } -sr-version = { path = "../../sr-version" } -sr-primitives = { path = "../../sr-primitives" } +sp-version = { path = "../../sr-version" } +sp-runtime = { path = "../../sr-primitives" } sp-blockchain = { path = "../../blockchain" } -consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } +consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } codec = { package = "parity-scale-codec", version = "1.0.0" } -state-machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" } +state-machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" } trybuild = "1.0.17" rustversion = "1.0.0" diff --git a/primitives/sr-api/test/tests/decl_and_impl.rs b/primitives/sr-api/test/tests/decl_and_impl.rs index 6bc5ea908c6ea..d52b5b4070f2a 100644 --- a/primitives/sr-api/test/tests/decl_and_impl.rs +++ b/primitives/sr-api/test/tests/decl_and_impl.rs @@ -14,9 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use sr_api::{RuntimeApiInfo, decl_runtime_apis, impl_runtime_apis}; +use sp_api::{RuntimeApiInfo, decl_runtime_apis, impl_runtime_apis}; -use sr_primitives::{traits::{GetNodeBlockType, Block as BlockT}, generic::BlockId}; +use sp_runtime::{traits::{GetNodeBlockType, Block as BlockT}, generic::BlockId}; use test_client::runtime::Block; use sp_blockchain::Result; @@ -68,8 +68,8 @@ impl_runtime_apis! { fn same_name() {} } - impl sr_api::Core for Runtime { - fn version() -> sr_version::RuntimeVersion { + impl sp_api::Core for Runtime { + fn version() -> sp_version::RuntimeVersion { unimplemented!() } fn execute_block(_: Block) { @@ -124,5 +124,5 @@ fn check_runtime_api_versions_contains() { fn check_runtime_api_versions() { check_runtime_api_versions_contains::>(); check_runtime_api_versions_contains::>(); - check_runtime_api_versions_contains::>(); + check_runtime_api_versions_contains::>(); } diff --git a/primitives/sr-api/test/tests/runtime_calls.rs b/primitives/sr-api/test/tests/runtime_calls.rs index 031d547819a8b..3b09d67a2cf82 100644 --- a/primitives/sr-api/test/tests/runtime_calls.rs +++ b/primitives/sr-api/test/tests/runtime_calls.rs @@ -19,7 +19,7 @@ use test_client::{ DefaultTestClientBuilderExt, TestClientBuilder, runtime::{TestAPI, DecodeFails, Transfer, Header}, }; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{ProvideRuntimeApi, Header as HeaderT, Hash as HashT}, }; diff --git a/primitives/sr-api/test/tests/ui/adding_self_parameter.rs b/primitives/sr-api/test/tests/ui/adding_self_parameter.rs index 9195598b5a437..117fa261886b9 100644 --- a/primitives/sr-api/test/tests/ui/adding_self_parameter.rs +++ b/primitives/sr-api/test/tests/ui/adding_self_parameter.rs @@ -1,4 +1,4 @@ -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(&self); } diff --git a/primitives/sr-api/test/tests/ui/changed_in_unknown_version.rs b/primitives/sr-api/test/tests/ui/changed_in_unknown_version.rs index 1fcb5d4be1e5a..818b50486095d 100644 --- a/primitives/sr-api/test/tests/ui/changed_in_unknown_version.rs +++ b/primitives/sr-api/test/tests/ui/changed_in_unknown_version.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::GetNodeBlockType; +use sp_runtime::traits::GetNodeBlockType; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,7 +8,7 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { #[changed_in(2)] fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/declaring_old_block.rs b/primitives/sr-api/test/tests/ui/declaring_old_block.rs index 962aae4506642..ba98bf9bf6883 100644 --- a/primitives/sr-api/test/tests/ui/declaring_old_block.rs +++ b/primitives/sr-api/test/tests/ui/declaring_old_block.rs @@ -1,6 +1,6 @@ -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(); } diff --git a/primitives/sr-api/test/tests/ui/declaring_old_block.stderr b/primitives/sr-api/test/tests/ui/declaring_old_block.stderr index e27294692b3e0..d46c34f0b30e8 100644 --- a/primitives/sr-api/test/tests/ui/declaring_old_block.stderr +++ b/primitives/sr-api/test/tests/ui/declaring_old_block.stderr @@ -10,10 +10,10 @@ error: `Block: BlockT` generic parameter will be added automatically by the `dec 4 | pub trait Api { | ^^^^^^ -warning: unused import: `sr_primitives::traits::Block as BlockT` +warning: unused import: `sp_runtime::traits::Block as BlockT` --> $DIR/declaring_old_block.rs:1:5 | -1 | use sr_primitives::traits::Block as BlockT; +1 | use sp_runtime::traits::Block as BlockT; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.rs b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.rs index 9a47148256493..67bb9cab10502 100644 --- a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.rs +++ b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.rs @@ -1,6 +1,6 @@ -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(); } diff --git a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr index 88359f19afc72..096456c3f78f6 100644 --- a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr +++ b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr @@ -4,10 +4,10 @@ error: `Block: BlockT` generic parameter will be added automatically by the `dec 4 | pub trait Api { | ^^^^^^ -warning: unused import: `sr_primitives::traits::Block as BlockT` +warning: unused import: `sp_runtime::traits::Block as BlockT` --> $DIR/declaring_own_block_with_different_name.rs:1:5 | -1 | use sr_primitives::traits::Block as BlockT; +1 | use sp_runtime::traits::Block as BlockT; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.rs b/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.rs index fee4e475e39aa..6275979de29c9 100644 --- a/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.rs +++ b/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::GetNodeBlockType; +use sp_runtime::traits::GetNodeBlockType; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,12 +8,12 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } } -sr_api::impl_runtime_apis! {} +sp_api::impl_runtime_apis! {} fn main() {} diff --git a/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.stderr b/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.stderr index e7bf3b8563f93..f927912879ad0 100644 --- a/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.stderr +++ b/primitives/sr-api/test/tests/ui/empty_impl_runtime_apis_call.stderr @@ -1,5 +1,5 @@ error: No api implementation given! --> $DIR/empty_impl_runtime_apis_call.rs:17:1 | -17 | sr_api::impl_runtime_apis! {} +17 | sp_api::impl_runtime_apis! {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in this macro invocation diff --git a/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.rs b/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.rs index 08c3ce8320fb5..cdc1dacb6a75c 100644 --- a/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.rs +++ b/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::{GetNodeBlockType, Block as BlockT}; +use sp_runtime::traits::{GetNodeBlockType, Block as BlockT}; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,18 +8,18 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } } -sr_api::impl_runtime_apis! { +sp_api::impl_runtime_apis! { impl self::Api for Runtime { fn test(data: String) {} } - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> runtime_api::RuntimeVersion { unimplemented!() } diff --git a/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.stderr b/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.stderr index 2bf8da343fe6b..d55e686a114ca 100644 --- a/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.stderr +++ b/primitives/sr-api/test/tests/ui/impl_incorrect_method_signature.stderr @@ -19,14 +19,14 @@ error[E0053]: method `test` has an incompatible type for trait error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for trait --> $DIR/impl_incorrect_method_signature.rs:17:1 | -11 | / sr_api::decl_runtime_apis! { +11 | / sp_api::decl_runtime_apis! { 12 | | pub trait Api { 13 | | fn test(data: u64); 14 | | } 15 | | } | |_- type in trait 16 | -17 | sr_api::impl_runtime_apis! { +17 | sp_api::impl_runtime_apis! { | -^^^^^^^^^^^^^^^^^^^^^^^^^ | | | _expected u64, found struct `std::string::String` @@ -39,13 +39,13 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr 33 | | } | |_- in this macro invocation | - = note: expected type `fn(&RuntimeApiImpl, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` - found type `fn(&RuntimeApiImpl, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` + = note: expected type `fn(&RuntimeApiImpl, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` + found type `fn(&RuntimeApiImpl, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` error[E0308]: mismatched types --> $DIR/impl_incorrect_method_signature.rs:17:1 | -17 | / sr_api::impl_runtime_apis! { +17 | / sp_api::impl_runtime_apis! { 18 | | impl self::Api for Runtime { 19 | | fn test(data: String) {} 20 | | } diff --git a/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.rs b/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.rs index 6aee0ec6c2bb4..4c3ee6b27d1af 100644 --- a/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.rs +++ b/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::GetNodeBlockType; +use sp_runtime::traits::GetNodeBlockType; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,7 +8,7 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } @@ -24,7 +24,7 @@ mod second { } } -sr_api::impl_runtime_apis! { +sp_api::impl_runtime_apis! { impl self::Api for Runtime { fn test(data: u64) {} } diff --git a/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.stderr b/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.stderr index 9aa38805b940f..cc267aaee091b 100644 --- a/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.stderr +++ b/primitives/sr-api/test/tests/ui/impl_two_traits_with_same_name.stderr @@ -13,7 +13,7 @@ error: cannot find macro `decl_runtime_apis` in this scope error[E0425]: cannot find function `test2_call_api_at` in `second::runtime_decl_for_Api` --> $DIR/impl_two_traits_with_same_name.rs:27:1 | -27 | / sr_api::impl_runtime_apis! { +27 | / sp_api::impl_runtime_apis! { 28 | | impl self::Api for Runtime { 29 | | fn test(data: u64) {} 30 | | } @@ -28,7 +28,7 @@ error[E0425]: cannot find function `test2_call_api_at` in `second::runtime_decl_ error[E0425]: cannot find function `test2_native_call_generator` in `second::runtime_decl_for_Api` --> $DIR/impl_two_traits_with_same_name.rs:27:1 | -27 | / sr_api::impl_runtime_apis! { +27 | / sp_api::impl_runtime_apis! { 28 | | impl self::Api for Runtime { 29 | | fn test(data: u64) {} 30 | | } @@ -49,7 +49,7 @@ error[E0576]: cannot find method or associated constant `test2` in `second::runt error[E0603]: module `runtime_decl_for_Api` is private --> $DIR/impl_two_traits_with_same_name.rs:27:1 | -27 | / sr_api::impl_runtime_apis! { +27 | / sp_api::impl_runtime_apis! { 28 | | impl self::Api for Runtime { 29 | | fn test(data: u64) {} 30 | | } @@ -58,7 +58,7 @@ error[E0603]: module `runtime_decl_for_Api` is private 35 | | } | |_^ -error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api, substrate_test_runtime::Extrinsic>>` for type `Runtime`: +error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api, substrate_test_runtime::Extrinsic>>` for type `Runtime`: --> $DIR/impl_two_traits_with_same_name.rs:32:2 | 28 | impl self::Api for Runtime { @@ -67,7 +67,7 @@ error[E0119]: conflicting implementations of trait `runtime_decl_for_Api::Api for Runtime { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Runtime` -error[E0119]: conflicting implementations of trait `Api, substrate_test_runtime::Extrinsic>>` for type `RuntimeApiImpl<_>`: +error[E0119]: conflicting implementations of trait `Api, substrate_test_runtime::Extrinsic>>` for type `RuntimeApiImpl<_>`: --> $DIR/impl_two_traits_with_same_name.rs:32:2 | 28 | impl self::Api for Runtime { diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version.rs b/primitives/sr-api/test/tests/ui/invalid_api_version.rs index 0b7f5e88ff74b..e038dd0aa6585 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version.rs +++ b/primitives/sr-api/test/tests/ui/invalid_api_version.rs @@ -1,4 +1,4 @@ -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { #[api_version] pub trait Api { fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version.stderr b/primitives/sr-api/test/tests/ui/invalid_api_version.stderr index 7e63eb8ebf8a4..6d0bb8d9f34cf 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version.stderr +++ b/primitives/sr-api/test/tests/ui/invalid_api_version.stderr @@ -1,7 +1,7 @@ error: can't qualify macro invocation with `pub` --> $DIR/invalid_api_version.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version] 3 | | pub trait Api { 4 | | fn test(data: u64); @@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub` error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version] 3 | | pub trait Api { 4 | | fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version_2.rs b/primitives/sr-api/test/tests/ui/invalid_api_version_2.rs index 4e29d36e1ba2f..bb8ed8ed11fea 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version_2.rs +++ b/primitives/sr-api/test/tests/ui/invalid_api_version_2.rs @@ -1,4 +1,4 @@ -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { #[api_version("1")] pub trait Api { fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version_2.stderr b/primitives/sr-api/test/tests/ui/invalid_api_version_2.stderr index e080b2dd1a0d6..60d33bff41094 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version_2.stderr +++ b/primitives/sr-api/test/tests/ui/invalid_api_version_2.stderr @@ -1,7 +1,7 @@ error: can't qualify macro invocation with `pub` --> $DIR/invalid_api_version_2.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version("1")] 3 | | pub trait Api { 4 | | fn test(data: u64); @@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub` error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version_2.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version("1")] 3 | | pub trait Api { 4 | | fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version_3.rs b/primitives/sr-api/test/tests/ui/invalid_api_version_3.rs index bafe566840d25..d010866e23731 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version_3.rs +++ b/primitives/sr-api/test/tests/ui/invalid_api_version_3.rs @@ -1,4 +1,4 @@ -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { #[api_version()] pub trait Api { fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/invalid_api_version_3.stderr b/primitives/sr-api/test/tests/ui/invalid_api_version_3.stderr index fd6e15852f74b..c2b64657ffda2 100644 --- a/primitives/sr-api/test/tests/ui/invalid_api_version_3.stderr +++ b/primitives/sr-api/test/tests/ui/invalid_api_version_3.stderr @@ -1,7 +1,7 @@ error: can't qualify macro invocation with `pub` --> $DIR/invalid_api_version_3.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version()] 3 | | pub trait Api { 4 | | fn test(data: u64); @@ -16,7 +16,7 @@ error: can't qualify macro invocation with `pub` error: Unexpected `api_version` attribute. The supported format is `api_version(1)` --> $DIR/invalid_api_version_3.rs:1:1 | -1 | / sr_api::decl_runtime_apis! { +1 | / sp_api::decl_runtime_apis! { 2 | | #[api_version()] 3 | | pub trait Api { 4 | | fn test(data: u64); diff --git a/primitives/sr-api/test/tests/ui/missing_block_generic_parameter.rs b/primitives/sr-api/test/tests/ui/missing_block_generic_parameter.rs index d35253a7219a4..4639ae328cceb 100644 --- a/primitives/sr-api/test/tests/ui/missing_block_generic_parameter.rs +++ b/primitives/sr-api/test/tests/ui/missing_block_generic_parameter.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::GetNodeBlockType; +use sp_runtime::traits::GetNodeBlockType; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,13 +8,13 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } } -sr_api::impl_runtime_apis! { +sp_api::impl_runtime_apis! { impl self::Api for Runtime { fn test(data: u64) { unimplemented!() diff --git a/primitives/sr-api/test/tests/ui/missing_path_for_trait.rs b/primitives/sr-api/test/tests/ui/missing_path_for_trait.rs index fb78374ebdf70..d90756ce1b2ad 100644 --- a/primitives/sr-api/test/tests/ui/missing_path_for_trait.rs +++ b/primitives/sr-api/test/tests/ui/missing_path_for_trait.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::GetNodeBlockType; +use sp_runtime::traits::GetNodeBlockType; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,13 +8,13 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } } -sr_api::impl_runtime_apis! { +sp_api::impl_runtime_apis! { impl Api for Runtime { fn test(data: u64) { unimplemented!() diff --git a/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.rs b/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.rs index 41bbd8a9eee53..809444cb30265 100644 --- a/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.rs +++ b/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.rs @@ -1,4 +1,4 @@ -use sr_primitives::traits::{GetNodeBlockType, Block as BlockT}; +use sp_runtime::traits::{GetNodeBlockType, Block as BlockT}; use test_client::runtime::Block; /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType` @@ -8,20 +8,20 @@ impl GetNodeBlockType for Runtime { type NodeBlock = Block; } -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { pub trait Api { fn test(data: u64); } } -sr_api::impl_runtime_apis! { +sp_api::impl_runtime_apis! { impl self::Api for Runtime { fn test(data: &u64) { unimplemented!() } } - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> runtime_api::RuntimeVersion { unimplemented!() } diff --git a/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.stderr b/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.stderr index 4614fe89b8cea..5129bb6c15220 100644 --- a/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.stderr +++ b/primitives/sr-api/test/tests/ui/type_reference_in_impl_runtime_apis_call.stderr @@ -19,14 +19,14 @@ error[E0053]: method `test` has an incompatible type for trait error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for trait --> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1 | -11 | / sr_api::decl_runtime_apis! { +11 | / sp_api::decl_runtime_apis! { 12 | | pub trait Api { 13 | | fn test(data: u64); 14 | | } 15 | | } | |_- type in trait 16 | -17 | sr_api::impl_runtime_apis! { +17 | sp_api::impl_runtime_apis! { | -^^^^^^^^^^^^^^^^^^^^^^^^^ | | | _expected u64, found &u64 @@ -39,13 +39,13 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr 35 | | } | |_- in this macro invocation | - = note: expected type `fn(&RuntimeApiImpl, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` - found type `fn(&RuntimeApiImpl, &sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::BlockId, substrate_test_runtime::Extrinsic>>, sr_api_hidden_includes_DECL_RUNTIME_APIS::sr_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` + = note: expected type `fn(&RuntimeApiImpl, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` + found type `fn(&RuntimeApiImpl, &sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::BlockId, substrate_test_runtime::Extrinsic>>, sp_api_hidden_includes_DECL_RUNTIME_APIS::sp_api::ExecutionContext, std::option::Option<&u64>, std::vec::Vec) -> std::result::Result, , substrate_test_runtime::Extrinsic>>>::Error>` error[E0308]: mismatched types --> $DIR/type_reference_in_impl_runtime_apis_call.rs:17:1 | -17 | / sr_api::impl_runtime_apis! { +17 | / sp_api::impl_runtime_apis! { 18 | | impl self::Api for Runtime { 19 | | fn test(data: &u64) { 20 | | unimplemented!() diff --git a/primitives/sr-arithmetic/Cargo.toml b/primitives/sr-arithmetic/Cargo.toml index 47b3315e86193..84137a8f5a813 100644 --- a/primitives/sr-arithmetic/Cargo.toml +++ b/primitives/sr-arithmetic/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-arithmetic" +name = "sp-arithmetic" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -8,9 +8,9 @@ edition = "2018" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -substrate-debug-derive = { path = "../../primitives/core/debug-derive", default-features = false } +sp-debug-derive = { path = "../../primitives/core/debug-derive", default-features = false } [dev-dependencies] primitive-types = "0.6.0" @@ -24,7 +24,7 @@ std = [ "num-traits/std", "rstd/std", "serde", - "substrate-debug-derive/std", + "sp-debug-derive/std", ] [[bench]] diff --git a/primitives/sr-arithmetic/benches/bench.rs b/primitives/sr-arithmetic/benches/bench.rs index 22c0ce6f566e9..ea6a2d2fd8cc0 100644 --- a/primitives/sr-arithmetic/benches/bench.rs +++ b/primitives/sr-arithmetic/benches/bench.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . use criterion::{Criterion, Throughput, BenchmarkId, criterion_group, criterion_main}; -use sr_arithmetic::biguint::{BigUint, Single}; +use sp_arithmetic::biguint::{BigUint, Single}; use rand::Rng; fn random_big_uint(size: usize) -> BigUint { diff --git a/primitives/sr-arithmetic/fuzzer/Cargo.toml b/primitives/sr-arithmetic/fuzzer/Cargo.toml index 482905c435010..6784349394a9d 100644 --- a/primitives/sr-arithmetic/fuzzer/Cargo.toml +++ b/primitives/sr-arithmetic/fuzzer/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "sr-arithmetic-fuzzer" +name = "sp-arithmetic-fuzzer" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-arithmetic = { path = ".." } +sp-arithmetic = { path = ".." } honggfuzz = "0.5" primitive-types = "0.6" num-bigint = "0.2" diff --git a/primitives/sr-arithmetic/fuzzer/src/biguint.rs b/primitives/sr-arithmetic/fuzzer/src/biguint.rs index bd270a97cac71..c3dbe81212909 100644 --- a/primitives/sr-arithmetic/fuzzer/src/biguint.rs +++ b/primitives/sr-arithmetic/fuzzer/src/biguint.rs @@ -27,7 +27,7 @@ //! [here](https://docs.rs/honggfuzz/). use honggfuzz::fuzz; -use sr_arithmetic::biguint::{BigUint, Single}; +use sp_arithmetic::biguint::{BigUint, Single}; use std::convert::TryFrom; fn main() { diff --git a/primitives/sr-arithmetic/fuzzer/src/rational128.rs b/primitives/sr-arithmetic/fuzzer/src/rational128.rs index b2a00d754527f..f32caa9010a6b 100644 --- a/primitives/sr-arithmetic/fuzzer/src/rational128.rs +++ b/primitives/sr-arithmetic/fuzzer/src/rational128.rs @@ -27,7 +27,7 @@ //! [here](https://docs.rs/honggfuzz/). use honggfuzz::fuzz; -use sr_arithmetic::{helpers_128bit::multiply_by_rational, traits::Zero}; +use sp_arithmetic::{helpers_128bit::multiply_by_rational, traits::Zero}; fn main() { loop { diff --git a/primitives/sr-arithmetic/src/lib.rs b/primitives/sr-arithmetic/src/lib.rs index 7b285002e5400..fc1d75ae96f26 100644 --- a/primitives/sr-arithmetic/src/lib.rs +++ b/primitives/sr-arithmetic/src/lib.rs @@ -18,7 +18,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -/// Copied from `sr-primitives` and documented there. +/// Copied from `sp-runtime` and documented there. #[cfg(test)] macro_rules! assert_eq_error_rate { ($x:expr, $y:expr, $error:expr $(,)?) => { diff --git a/primitives/sr-arithmetic/src/per_things.rs b/primitives/sr-arithmetic/src/per_things.rs index 2dd1e62d0b4db..ed63039c857c7 100644 --- a/primitives/sr-arithmetic/src/per_things.rs +++ b/primitives/sr-arithmetic/src/per_things.rs @@ -20,7 +20,7 @@ use serde::{Serialize, Deserialize}; use rstd::{ops, prelude::*, convert::TryInto}; use codec::{Encode, Decode, CompactAs}; use crate::traits::{SaturatedConversion, UniqueSaturatedInto, Saturating}; -use substrate_debug_derive::RuntimeDebug; +use sp_debug_derive::RuntimeDebug; macro_rules! implement_per_thing { ($name:ident, $test_mod:ident, [$($test_units:tt),+], $max:tt, $type:ty, $upper_type:ty, $title:expr $(,)?) => { diff --git a/primitives/sr-arithmetic/src/rational128.rs b/primitives/sr-arithmetic/src/rational128.rs index 3247321199d61..124d685a4f5ad 100644 --- a/primitives/sr-arithmetic/src/rational128.rs +++ b/primitives/sr-arithmetic/src/rational128.rs @@ -17,7 +17,7 @@ use rstd::{cmp::Ordering, prelude::*}; use crate::helpers_128bit; use num_traits::Zero; -use substrate_debug_derive::RuntimeDebug; +use sp_debug_derive::RuntimeDebug; /// A wrapper for any rational number with a 128 bit numerator and denominator. #[derive(Clone, Copy, Default, Eq, RuntimeDebug)] diff --git a/primitives/sr-io/Cargo.toml b/primitives/sr-io/Cargo.toml index 52e175d2b80cd..79d25f2d963f0 100644 --- a/primitives/sr-io/Cargo.toml +++ b/primitives/sr-io/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-io" +name = "sp-io" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -7,13 +7,13 @@ edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false } hash-db = { version = "0.15.2", default-features = false } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } libsecp256k1 = { version = "0.3.0", optional = true } -substrate-state-machine = { path = "../../primitives/state-machine", optional = true } -runtime-interface = { package = "substrate-runtime-interface", path = "../runtime-interface", default-features = false } -trie = { package = "substrate-trie", path = "../../primitives/trie", optional = true } -externalities = { package = "substrate-externalities", path = "../externalities", optional = true } +sp-state-machine = { path = "../../primitives/state-machine", optional = true } +runtime-interface = { package = "sp-runtime-interface", path = "../runtime-interface", default-features = false } +trie = { package = "sp-trie", path = "../../primitives/trie", optional = true } +externalities = { package = "sp-externalities", path = "../externalities", optional = true } log = { version = "0.4.8", optional = true } [features] @@ -24,7 +24,7 @@ std = [ "rstd/std", "hash-db/std", "trie", - "substrate-state-machine", + "sp-state-machine", "libsecp256k1", "runtime-interface/std", "externalities", diff --git a/primitives/sr-io/src/lib.rs b/primitives/sr-io/src/lib.rs index 40d52db98b0a8..d4b654ab2931e 100644 --- a/primitives/sr-io/src/lib.rs +++ b/primitives/sr-io/src/lib.rs @@ -781,7 +781,7 @@ pub extern fn oom(_: core::alloc::Layout) -> ! { /// Type alias for Externalities implementation used in tests. #[cfg(feature = "std")] -pub type TestExternalities = substrate_state_machine::TestExternalities; +pub type TestExternalities = sp_state_machine::TestExternalities; /// The host functions Substrate provides for the Wasm runtime environment. /// @@ -803,7 +803,7 @@ pub type SubstrateHostFunctions = ( mod tests { use super::*; use primitives::map; - use substrate_state_machine::BasicExternalities; + use sp_state_machine::BasicExternalities; #[test] fn storage_works() { diff --git a/primitives/sr-primitives/Cargo.toml b/primitives/sr-primitives/Cargo.toml index bd709c68bd4d9..bfec26f0cc971 100644 --- a/primitives/sr-primitives/Cargo.toml +++ b/primitives/sr-primitives/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-primitives" +name = "sp-runtime" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -7,16 +7,16 @@ edition = "2018" [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } -app-crypto = { package = "substrate-application-crypto", path = "../application-crypto", default-features = false } -arithmetic = { package = "sr-arithmetic", path = "../sr-arithmetic", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -runtime_io = { package = "sr-io", path = "../sr-io", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../application-crypto", default-features = false } +arithmetic = { package = "sp-arithmetic", path = "../sr-arithmetic", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +runtime_io = { package = "sp-io", path = "../sr-io", default-features = false } log = { version = "0.4.8", optional = true } paste = "0.1.6" rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.1.3" -inherents = { package = "substrate-inherents", path = "../inherents", default-features = false } +inherents = { package = "sp-inherents", path = "../inherents", default-features = false } [dev-dependencies] serde_json = "1.0.41" diff --git a/primitives/sr-primitives/src/lib.rs b/primitives/sr-primitives/src/lib.rs index 1bbf5ad55a66b..20fdd083dbb7c 100644 --- a/primitives/sr-primitives/src/lib.rs +++ b/primitives/sr-primitives/src/lib.rs @@ -583,15 +583,15 @@ macro_rules! impl_outer_config { /// /// ```rust /// # fn main() { -/// sr_primitives::assert_eq_error_rate!(10, 10, 0); -/// sr_primitives::assert_eq_error_rate!(10, 11, 1); -/// sr_primitives::assert_eq_error_rate!(12, 10, 2); +/// sp_runtime::assert_eq_error_rate!(10, 10, 0); +/// sp_runtime::assert_eq_error_rate!(10, 11, 1); +/// sp_runtime::assert_eq_error_rate!(12, 10, 2); /// # } /// ``` /// /// ```rust,should_panic /// # fn main() { -/// sr_primitives::assert_eq_error_rate!(12, 10, 1); +/// sp_runtime::assert_eq_error_rate!(12, 10, 1); /// # } /// ``` #[macro_export] diff --git a/primitives/sr-primitives/src/offchain/http.rs b/primitives/sr-primitives/src/offchain/http.rs index 50d536fc14dbb..88df90893bdc8 100644 --- a/primitives/sr-primitives/src/offchain/http.rs +++ b/primitives/sr-primitives/src/offchain/http.rs @@ -16,7 +16,7 @@ //! A high-level helpers for making HTTP requests from Offchain Workers. //! -//! `sr-io` crate exposes a low level methods to make and control HTTP requests +//! `sp-io` crate exposes a low level methods to make and control HTTP requests //! available only for Offchain Workers. Those might be hard to use //! and usually that level of control is not really necessary. //! This module aims to provide high-level wrappers for those APIs @@ -25,7 +25,7 @@ //! //! Example: //! ```rust,no_run -//! use sr_primitives::offchain::http::Request; +//! use sp_runtime::offchain::http::Request; //! //! // initiate a GET request to localhost:1234 //! let request: Request = Request::get("http://localhost:1234"); diff --git a/primitives/sr-primitives/src/random_number_generator.rs b/primitives/sr-primitives/src/random_number_generator.rs index cb9acfa028072..487d3b95275c7 100644 --- a/primitives/sr-primitives/src/random_number_generator.rs +++ b/primitives/sr-primitives/src/random_number_generator.rs @@ -28,8 +28,8 @@ use crate::traits::{Hash, TrailingZeroInput}; /// /// Example: /// ``` -/// use sr_primitives::traits::{Hash, BlakeTwo256}; -/// use sr_primitives::RandomNumberGenerator; +/// use sp_runtime::traits::{Hash, BlakeTwo256}; +/// use sp_runtime::RandomNumberGenerator; /// let random_seed = BlakeTwo256::hash(b"Sixty-nine"); /// let mut rng = >::new(random_seed); /// assert_eq!(rng.pick_u32(100), 59); diff --git a/primitives/sr-primitives/src/traits.rs b/primitives/sr-primitives/src/traits.rs index 7c6a88acc2368..e3b06b22607c0 100644 --- a/primitives/sr-primitives/src/traits.rs +++ b/primitives/sr-primitives/src/traits.rs @@ -1112,7 +1112,7 @@ macro_rules! count { /// `KeyTypeIdProviders` is set to the types given as fields. /// /// ```rust -/// use sr_primitives::{ +/// use sp_runtime::{ /// impl_opaque_keys, KeyTypeId, BoundToRuntimeAppPublic, app_crypto::{sr25519, ed25519} /// }; /// diff --git a/primitives/sr-sandbox/Cargo.toml b/primitives/sr-sandbox/Cargo.toml index 97d391d794d65..0380f5b59137d 100755 --- a/primitives/sr-sandbox/Cargo.toml +++ b/primitives/sr-sandbox/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "sr-sandbox" +name = "sp-sandbox" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] wasmi = { version = "0.6.2", optional = true } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -runtime-io = { package = "sr-io", path = "../sr-io", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +runtime-io = { package = "sp-io", path = "../sr-io", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } [dev-dependencies] diff --git a/primitives/sr-staking-primitives/Cargo.toml b/primitives/sr-staking-primitives/Cargo.toml index 25e8f4ccf1529..527364cfd0941 100644 --- a/primitives/sr-staking-primitives/Cargo.toml +++ b/primitives/sr-staking-primitives/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "sr-staking-primitives" +name = "sp-staking" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -sr-primitives = { path = "../sr-primitives", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } [features] default = ["std"] std = [ "codec/std", - "sr-primitives/std", + "sp-runtime/std", "rstd/std", ] diff --git a/primitives/sr-staking-primitives/src/offence.rs b/primitives/sr-staking-primitives/src/offence.rs index 04d887fbe09fc..9a3eb1bbfec48 100644 --- a/primitives/sr-staking-primitives/src/offence.rs +++ b/primitives/sr-staking-primitives/src/offence.rs @@ -20,7 +20,7 @@ use rstd::vec::Vec; use codec::{Encode, Decode}; -use sr_primitives::Perbill; +use sp_runtime::Perbill; use crate::SessionIndex; @@ -135,7 +135,7 @@ impl OnOffenceHandler for () { } /// A details about an offending authority for a particular kind of offence. -#[derive(Clone, PartialEq, Eq, Encode, Decode, sr_primitives::RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, sp_runtime::RuntimeDebug)] pub struct OffenceDetails { /// The offending authority id pub offender: Offender, diff --git a/primitives/sr-std/Cargo.toml b/primitives/sr-std/Cargo.toml index 77021af935ae1..7fdf7d1144b7b 100644 --- a/primitives/sr-std/Cargo.toml +++ b/primitives/sr-std/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-std" +name = "sp-std" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/primitives/sr-std/src/lib.rs b/primitives/sr-std/src/lib.rs index 5aa8e82235247..18533e041b99d 100644 --- a/primitives/sr-std/src/lib.rs +++ b/primitives/sr-std/src/lib.rs @@ -37,7 +37,7 @@ macro_rules! map { /// # Example /// /// ``` -/// use sr_std::if_std; +/// use sp_std::if_std; /// /// if_std! { /// // This code is only being compiled and executed when the `std` feature is enabled. diff --git a/primitives/sr-version/Cargo.toml b/primitives/sr-version/Cargo.toml index 5be3048f827b4..a26487bfcab1c 100644 --- a/primitives/sr-version/Cargo.toml +++ b/primitives/sr-version/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sr-version" +name = "sp-version" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -8,8 +8,8 @@ edition = "2018" impl-serde = { version = "0.2.3", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.5", default-features = false, features = ["derive"] } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } [features] default = ["std"] @@ -18,5 +18,5 @@ std = [ "serde", "codec/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", ] diff --git a/primitives/sr-version/src/lib.rs b/primitives/sr-version/src/lib.rs index d7d829bd4bb67..9b9a311c08a46 100644 --- a/primitives/sr-version/src/lib.rs +++ b/primitives/sr-version/src/lib.rs @@ -25,16 +25,16 @@ use std::fmt; #[cfg(feature = "std")] use std::collections::HashSet; #[cfg(feature = "std")] -use sr_primitives::traits::RuntimeApiInfo; +use sp_runtime::traits::RuntimeApiInfo; use codec::Encode; #[cfg(feature = "std")] use codec::Decode; -use sr_primitives::RuntimeString; -pub use sr_primitives::create_runtime_str; +use sp_runtime::RuntimeString; +pub use sp_runtime::create_runtime_str; #[cfg(feature = "std")] -use sr_primitives::{traits::Block as BlockT, generic::BlockId}; +use sp_runtime::{traits::Block as BlockT, generic::BlockId}; /// The identity of a particular API interface that the runtime might provide. pub type ApiId = [u8; 8]; @@ -65,7 +65,7 @@ macro_rules! create_apis_vec { /// This triplet have different semantics and mis-interpretation could cause problems. /// In particular: bug fixes should result in an increment of `spec_version` and possibly `authoring_version`, /// absolutely not `impl_version` since they change the semantics of the runtime. -#[derive(Clone, PartialEq, Eq, Encode, Default, sr_primitives::RuntimeDebug)] +#[derive(Clone, PartialEq, Eq, Encode, Default, sp_runtime::RuntimeDebug)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Decode))] #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] pub struct RuntimeVersion { diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index 36557803e10e8..cd721c17fdf33 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-state-machine" +name = "sp-state-machine" version = "2.0.0" authors = ["Parity Technologies "] description = "Substrate State Machine" @@ -11,13 +11,13 @@ parking_lot = "0.9.0" hash-db = "0.15.2" trie-db = "0.16.0" trie-root = "0.15.2" -trie = { package = "substrate-trie", path = "../trie" } -primitives = { package = "substrate-primitives", path = "../core" } -panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" } +trie = { package = "sp-trie", path = "../trie" } +primitives = { package = "sp-core", path = "../core" } +panic-handler = { package = "sp-panic-handler", path = "../panic-handler" } codec = { package = "parity-scale-codec", version = "1.0.0" } num-traits = "0.2.8" rand = "0.7.2" -externalities = { package = "substrate-externalities", path = "../externalities" } +externalities = { package = "sp-externalities", path = "../externalities" } [dev-dependencies] hex-literal = "0.2.1" diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index 013a0340eaf48..a41307fde975f 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -5,19 +5,19 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -sr-api = { path = "../sr-api", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } -sr-primitives = { path = "../sr-primitives", default-features = false } +sp-api = { path = "../sr-api", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } +sp-runtime = { path = "../sr-primitives", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -inherents = { package = "substrate-inherents", path = "../inherents", default-features = false } +inherents = { package = "sp-inherents", path = "../inherents", default-features = false } impl-trait-for-tuples = "0.1.3" [features] default = [ "std" ] std = [ - "sr-api/std", + "sp-api/std", "rstd/std", - "sr-primitives/std", + "sp-runtime/std", "codec/std", "inherents/std", ] diff --git a/primitives/timestamp/src/lib.rs b/primitives/timestamp/src/lib.rs index 028f44f378e39..6b20e11ef404a 100644 --- a/primitives/timestamp/src/lib.rs +++ b/primitives/timestamp/src/lib.rs @@ -25,7 +25,7 @@ use codec::Decode; use inherents::ProvideInherentData; use inherents::{InherentIdentifier, IsFatalError, InherentData}; -use sr_primitives::RuntimeString; +use sp_runtime::RuntimeString; /// The identifier for the `timestamp` inherent. pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"timstap0"; @@ -33,7 +33,7 @@ pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"timstap0"; pub type InherentType = u64; /// Errors that can occur while checking the timestamp inherent. -#[derive(Encode, sr_primitives::RuntimeDebug)] +#[derive(Encode, sp_runtime::RuntimeDebug)] #[cfg_attr(feature = "std", derive(Decode))] pub enum InherentError { /// The timestamp is valid in the future. diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index ce20c8acec555..ce723fd61ec7b 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -10,5 +10,5 @@ futures = "0.3.1" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] } codec = { package = "parity-scale-codec", version = "1.0.0" } -primitives = { package = "substrate-primitives", path = "../core" } -sr-primitives = { path = "../sr-primitives" } +primitives = { package = "sp-core", path = "../core" } +sp-runtime = { path = "../sr-primitives" } diff --git a/primitives/transaction-pool/runtime-api/Cargo.toml b/primitives/transaction-pool/runtime-api/Cargo.toml index 2a1014989d91a..4da08fbc7c090 100644 --- a/primitives/transaction-pool/runtime-api/Cargo.toml +++ b/primitives/transaction-pool/runtime-api/Cargo.toml @@ -5,10 +5,10 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -primitives = { package = "substrate-primitives", path = "../../core", default-features = false } -sr-api = { path = "../../sr-api", default-features = false } -sr-primitives = { path = "../../sr-primitives", default-features = false } +primitives = { package = "sp-core", path = "../../core", default-features = false } +sp-api = { path = "../../sr-api", default-features = false } +sp-runtime = { path = "../../sr-primitives", default-features = false } [features] default = [ "std" ] -std = [ "sr-primitives/std", "primitives/std", "sr-api/std" ] +std = [ "sp-runtime/std", "primitives/std", "sp-api/std" ] diff --git a/primitives/transaction-pool/runtime-api/src/lib.rs b/primitives/transaction-pool/runtime-api/src/lib.rs index 48d0f8a85dd31..7017d90a80655 100644 --- a/primitives/transaction-pool/runtime-api/src/lib.rs +++ b/primitives/transaction-pool/runtime-api/src/lib.rs @@ -18,9 +18,9 @@ #![cfg_attr(not(feature = "std"), no_std)] -use sr_primitives::{transaction_validity::TransactionValidity, traits::Block as BlockT}; +use sp_runtime::{transaction_validity::TransactionValidity, traits::Block as BlockT}; -sr_api::decl_runtime_apis! { +sp_api::decl_runtime_apis! { /// The `TaggedTransactionQueue` api trait for interfering with the transaction queue. pub trait TaggedTransactionQueue { /// Validate the given transaction. diff --git a/primitives/transaction-pool/src/error.rs b/primitives/transaction-pool/src/error.rs index 19270f349a460..ce65eaf26c2c5 100644 --- a/primitives/transaction-pool/src/error.rs +++ b/primitives/transaction-pool/src/error.rs @@ -16,7 +16,7 @@ //! Transaction pool errors. -use sr_primitives::transaction_validity::{ +use sp_runtime::transaction_validity::{ TransactionPriority as Priority, InvalidTransaction, UnknownTransaction, }; diff --git a/primitives/transaction-pool/src/lib.rs b/primitives/transaction-pool/src/lib.rs index 30671d4b1a16d..3f834d3253e4f 100644 --- a/primitives/transaction-pool/src/lib.rs +++ b/primitives/transaction-pool/src/lib.rs @@ -21,7 +21,7 @@ pub mod error; pub use error::IntoPoolError; -pub use sr_primitives::transaction_validity::{ +pub use sp_runtime::transaction_validity::{ TransactionLongevity, TransactionPriority, TransactionTag, }; @@ -35,7 +35,7 @@ use futures::{ channel::mpsc, }; use serde::{Deserialize, Serialize}; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, Member}, }; @@ -98,7 +98,7 @@ pub type TransactionStatusStreamFor

= TransactionStatusStream, Bloc /// In-pool transaction interface. /// /// The pool is container of transactions that are implementing this trait. -/// See `sr_primitives::ValidTransaction` for details about every field. +/// See `sp_runtime::ValidTransaction` for details about every field. pub trait InPoolTransaction { /// Transaction type. type Transaction; diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index cc9d1b2dde554..494a7754ae63a 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-trie" +name = "sp-trie" version = "2.0.0" authors = ["Parity Technologies "] description = "Patricia trie stuff using a parity-scale-codec node format" @@ -13,12 +13,12 @@ harness = false [dependencies] codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false } -rstd = { package = "sr-std", path = "../sr-std", default-features = false } +rstd = { package = "sp-std", path = "../sr-std", default-features = false } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.16.0", default-features = false } trie-root = { version = "0.15.2", default-features = false } memory-db = { version = "0.15.2", default-features = false } -primitives = { package = "substrate-primitives", path = "../core", default-features = false } +primitives = { package = "sp-core", path = "../core", default-features = false } [dev-dependencies] trie-bench = "0.17.0" diff --git a/primitives/trie/benches/bench.rs b/primitives/trie/benches/bench.rs index a8a473222285d..347426d0c56e9 100644 --- a/primitives/trie/benches/bench.rs +++ b/primitives/trie/benches/bench.rs @@ -20,11 +20,11 @@ criterion_main!(benches); fn benchmark(c: &mut Criterion) { trie_bench::standard_benchmark::< - substrate_trie::Layout, - substrate_trie::TrieStream, + sp_trie::Layout, + sp_trie::TrieStream, >(c, "substrate-blake2"); trie_bench::standard_benchmark::< - substrate_trie::Layout, - substrate_trie::TrieStream, + sp_trie::Layout, + sp_trie::TrieStream, >(c, "substrate-keccak"); } diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index 90dc7b812d9f9..8f44c8895cfa7 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "substrate-wasm-interface" +name = "sp-wasm-interface" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/test/utils/chain-spec-builder/Cargo.toml b/test/utils/chain-spec-builder/Cargo.toml index 7498880e0f566..32829bdb513cf 100644 --- a/test/utils/chain-spec-builder/Cargo.toml +++ b/test/utils/chain-spec-builder/Cargo.toml @@ -7,8 +7,8 @@ build = "build.rs" [dependencies] ansi_term = "0.12.1" -keystore = { package = "substrate-keystore", path = "../../../client/keystore" } +keystore = { package = "sc-keystore", path = "../../../client/keystore" } node-cli = { path = "../../../bin/node/cli" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } +primitives = { package = "sp-core", path = "../../../primitives/core" } rand = "0.7.2" structopt = "0.3.3" diff --git a/test/utils/client/Cargo.toml b/test/utils/client/Cargo.toml index e1536046034df..02f54b9ca91fe 100644 --- a/test/utils/client/Cargo.toml +++ b/test/utils/client/Cargo.toml @@ -5,16 +5,16 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -client-api = { package = "substrate-client-api", path = "../../../client/api" } -client = { package = "substrate-client", path = "../../../client/" } -client-db = { package = "substrate-client-db", path = "../../../client//db", features = ["test-helpers"] } -consensus = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } -executor = { package = "substrate-executor", path = "../../../client/executor" } +client-api = { package = "sc-client-api", path = "../../../client/api" } +client = { package = "sc-client", path = "../../../client/" } +client-db = { package = "sc-client-db", path = "../../../client//db", features = ["test-helpers"] } +consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" } +executor = { package = "sc-executor", path = "../../../client/executor" } futures = "0.3.1" hash-db = "0.15.2" -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring" } codec = { package = "parity-scale-codec", version = "1.0.0" } -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -sr-primitives = { path = "../../../primitives/sr-primitives" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +sp-runtime = { path = "../../../primitives/sr-primitives" } sp-blockchain = { path = "../../../primitives/blockchain" } -state_machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" } +state_machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" } diff --git a/test/utils/client/src/client_ext.rs b/test/utils/client/src/client_ext.rs index 39010070e1b2d..961d8570d8004 100644 --- a/test/utils/client/src/client_ext.rs +++ b/test/utils/client/src/client_ext.rs @@ -23,9 +23,9 @@ use consensus::{ ForkChoiceStrategy, }; use hash_db::Hasher; -use sr_primitives::Justification; -use sr_primitives::traits::{Block as BlockT}; -use sr_primitives::generic::BlockId; +use sp_runtime::Justification; +use sp_runtime::traits::{Block as BlockT}; +use sp_runtime::generic::BlockId; use primitives::Blake2Hasher; use codec::alloc::collections::hash_map::HashMap; diff --git a/test/utils/client/src/lib.rs b/test/utils/client/src/lib.rs index c4f97aec1daad..29370ba16c634 100644 --- a/test/utils/client/src/lib.rs +++ b/test/utils/client/src/lib.rs @@ -32,14 +32,14 @@ pub use keyring::{ sr25519::Keyring as Sr25519Keyring, }; pub use primitives::{Blake2Hasher, traits::BareCryptoStorePtr}; -pub use sr_primitives::{StorageOverlay, ChildrenStorageOverlay}; +pub use sp_runtime::{StorageOverlay, ChildrenStorageOverlay}; pub use state_machine::ExecutionStrategy; use std::sync::Arc; use std::collections::HashMap; use hash_db::Hasher; use primitives::storage::well_known_keys; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::traits::Block as BlockT; use client::LocalCallExecutor; /// Test client light database backend. diff --git a/test/utils/primitives/Cargo.toml b/test/utils/primitives/Cargo.toml index 92917fdd265e6..9b06e040fc976 100644 --- a/test/utils/primitives/Cargo.toml +++ b/test/utils/primitives/Cargo.toml @@ -5,11 +5,11 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false } +sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } [features] default = [ diff --git a/test/utils/primitives/src/lib.rs b/test/utils/primitives/src/lib.rs index eebdbb165ff5d..773e88066dcdb 100644 --- a/test/utils/primitives/src/lib.rs +++ b/test/utils/primitives/src/lib.rs @@ -24,7 +24,7 @@ use app_crypto::sr25519; pub use app_crypto; pub use primitives::{hash::H256, RuntimeDebug}; -use sr_primitives::traits::{BlakeTwo256, Verify, Extrinsic as ExtrinsicT,}; +use sp_runtime::traits::{BlakeTwo256, Verify, Extrinsic as ExtrinsicT,}; /// Extrinsic for test-runtime. #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)] @@ -69,10 +69,10 @@ pub type BlockNumber = u64; /// Index of a transaction. pub type Index = u64; /// The item of a block digest. -pub type DigestItem = sr_primitives::generic::DigestItem; +pub type DigestItem = sp_runtime::generic::DigestItem; /// The digest of a block. -pub type Digest = sr_primitives::generic::Digest; +pub type Digest = sp_runtime::generic::Digest; /// A test block. -pub type Block = sr_primitives::generic::Block; +pub type Block = sp_runtime::generic::Block; /// A test block's header. -pub type Header = sr_primitives::generic::Header; +pub type Header = sp_runtime::generic::Header; diff --git a/test/utils/runtime/Cargo.toml b/test/utils/runtime/Cargo.toml index f51bceb095fc9..77224c2ef18cb 100644 --- a/test/utils/runtime/Cargo.toml +++ b/test/utils/runtime/Cargo.toml @@ -6,41 +6,41 @@ edition = "2018" build = "build.rs" [dependencies] -app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto", default-features = false } -aura-primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura", default-features = false } -babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe", default-features = false } -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false } +app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto", default-features = false } +aura-primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura", default-features = false } +babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe", default-features = false } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api", default-features = false } cfg-if = "0.1.10" codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } executive = { package = "frame-executive", path = "../../../frame/executive", default-features = false } -inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false } -keyring = { package = "substrate-keyring", path = "../../../primitives/keyring", optional = true } +inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false } +keyring = { package = "sp-keyring", path = "../../../primitives/keyring", optional = true } log = { version = "0.4.8", optional = true } memory-db = { version = "0.15.2", default-features = false } -offchain-primitives = { package = "substrate-offchain-primitives", path = "../../../primitives/offchain", default-features = false} -primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false } -rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false } -runtime-interface = { package = "substrate-runtime-interface", path = "../../../primitives/runtime-interface", default-features = false} -runtime_io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false } +offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false} +primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false } +rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false } +runtime-interface = { package = "sp-runtime-interface", path = "../../../primitives/runtime-interface", default-features = false} +runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false } runtime_support = { package = "frame-support", path = "../../../frame/support", default-features = false } -runtime_version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false } +runtime_version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } -session = { package = "substrate-session", path = "../../../primitives/session", default-features = false } -sr-api = { path = "../../../primitives/sr-api", default-features = false } -sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false } +session = { package = "sp-sesssion", path = "../../../primitives/session", default-features = false } +sp-api = { path = "../../../primitives/sr-api", default-features = false } +sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false } pallet-babe = { path = "../../../frame/babe", default-features = false } frame-system = { path = "../../../frame/system", default-features = false } frame-system-rpc-runtime-api = { path = "../../../frame/system/rpc/runtime-api", default-features = false } pallet-timestamp = { path = "../../../frame/timestamp", default-features = false } -substrate-client = { path = "../../../client", optional = true } -substrate-trie = { path = "../../../primitives/trie", default-features = false } +sc-client = { path = "../../../client", optional = true } +sp-trie = { path = "../../../primitives/trie", default-features = false } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false } trie-db = { version = "0.16.0", default-features = false } [dev-dependencies] -substrate-executor = { path = "../../../client/executor" } +sc-executor = { path = "../../../client/executor" } substrate-test-runtime-client = { path = "./client" } -state_machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" } +state_machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" } [build-dependencies] wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" } @@ -70,14 +70,14 @@ std = [ "runtime_version/std", "serde", "session/std", - "sr-api/std", - "sr-primitives/std", + "sp-api/std", + "sp-runtime/std", "pallet-babe/std", "frame-system-rpc-runtime-api/std", "frame-system/std", "pallet-timestamp/std", - "substrate-client", - "substrate-trie/std", + "sc-client", + "sp-trie/std", "txpool-runtime-api/std", "trie-db/std", ] diff --git a/test/utils/runtime/client/Cargo.toml b/test/utils/runtime/client/Cargo.toml index 22758584c79e7..21b16c5496427 100644 --- a/test/utils/runtime/client/Cargo.toml +++ b/test/utils/runtime/client/Cargo.toml @@ -5,13 +5,13 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -block-builder = { package = "substrate-block-builder", path = "../../../../client/block-builder" } +block-builder = { package = "sc-block-builder", path = "../../../../client/block-builder" } generic-test-client = { package = "substrate-test-client", path = "../../client" } -primitives = { package = "substrate-primitives", path = "../../../../primitives/core" } +primitives = { package = "sp-core", path = "../../../../primitives/core" } runtime = { package = "substrate-test-runtime", path = "../../runtime" } -sr-primitives = { path = "../../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../../primitives/sr-primitives" } sp-blockchain = { path = "../../../../primitives/blockchain" } codec = { package = "parity-scale-codec", version = "1.0.0" } -client-api = { package = "substrate-client-api", path = "../../../../client/api" } -client = { package = "substrate-client", path = "../../../../client/" } +client-api = { package = "sc-client-api", path = "../../../../client/api" } +client = { package = "sc-client", path = "../../../../client/" } futures = "0.3.1" diff --git a/test/utils/runtime/client/src/block_builder_ext.rs b/test/utils/runtime/client/src/block_builder_ext.rs index e6e8ac3249954..a1065c82a0b40 100644 --- a/test/utils/runtime/client/src/block_builder_ext.rs +++ b/test/utils/runtime/client/src/block_builder_ext.rs @@ -17,7 +17,7 @@ //! Block Builder extensions for tests. use runtime; -use sr_primitives::traits::ProvideRuntimeApi; +use sp_runtime::traits::ProvideRuntimeApi; use block_builder::BlockBuilderApi; diff --git a/test/utils/runtime/client/src/lib.rs b/test/utils/runtime/client/src/lib.rs index 57be949bcaf98..cd815b7ea40f3 100644 --- a/test/utils/runtime/client/src/lib.rs +++ b/test/utils/runtime/client/src/lib.rs @@ -30,7 +30,7 @@ pub use runtime; use primitives::sr25519; use runtime::genesismap::{GenesisConfig, additional_storage_with_genesis}; -use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Hash as HashT, NumberFor}; use client::{ light::fetcher::{ Fetcher, diff --git a/test/utils/runtime/client/src/trait_tests.rs b/test/utils/runtime/client/src/trait_tests.rs index bfdab4d942ed2..108924c4dd895 100644 --- a/test/utils/runtime/client/src/trait_tests.rs +++ b/test/utils/runtime/client/src/trait_tests.rs @@ -28,8 +28,8 @@ use crate::{AccountKeyring, ClientExt, TestClientBuilder, TestClientBuilderExt}; use generic_test_client::consensus::BlockOrigin; use primitives::Blake2Hasher; use runtime::{self, Transfer}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::Block as BlockT; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::Block as BlockT; /// helper to test the `leaves` implementation for various backends pub fn test_leaves_for_backend(backend: Arc) where diff --git a/test/utils/runtime/src/genesismap.rs b/test/utils/runtime/src/genesismap.rs index 79cba52323e58..eb2ee144049a6 100644 --- a/test/utils/runtime/src/genesismap.rs +++ b/test/utils/runtime/src/genesismap.rs @@ -21,7 +21,7 @@ use runtime_io::hashing::{blake2_256, twox_128}; use super::{AuthorityId, AccountId, WASM_BINARY, system}; use codec::{Encode, KeyedVec, Joiner}; use primitives::{ChangesTrieConfiguration, map, storage::well_known_keys}; -use sr_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT}; +use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT}; /// Configuration of a general Substrate test genesis block. pub struct GenesisConfig { @@ -105,7 +105,7 @@ pub fn insert_genesis_block( let state_root = <<::Header as HeaderT>::Hashing as HashT>::trie_root( storage.0.clone().into_iter().chain(child_roots).collect() ); - let block: crate::Block = substrate_client::genesis::construct_genesis_block(state_root); + let block: crate::Block = sc_client::genesis::construct_genesis_block(state_root); let genesis_hash = block.header.hash(); storage.0.extend(additional_storage_with_genesis(&block)); genesis_hash diff --git a/test/utils/runtime/src/lib.rs b/test/utils/runtime/src/lib.rs index 7761cfb9444ec..ec8998f597843 100644 --- a/test/utils/runtime/src/lib.rs +++ b/test/utils/runtime/src/lib.rs @@ -29,11 +29,11 @@ use primitives::{Blake2Hasher, OpaqueMetadata, RuntimeDebug}; use app_crypto::{ed25519, sr25519, RuntimeAppPublic}; pub use app_crypto; use trie_db::{TrieMut, Trie}; -use substrate_trie::PrefixedMemoryDB; -use substrate_trie::trie_types::{TrieDB, TrieDBMut}; +use sp_trie::PrefixedMemoryDB; +use sp_trie::trie_types::{TrieDB, TrieDBMut}; -use sr_api::{decl_runtime_apis, impl_runtime_apis}; -use sr_primitives::{ +use sp_api::{decl_runtime_apis, impl_runtime_apis}; +use sp_runtime::{ ApplyExtrinsicResult, create_runtime_str, Perbill, impl_opaque_keys, transaction_validity::{ TransactionValidity, ValidTransaction, TransactionValidityError, InvalidTransaction, @@ -124,7 +124,7 @@ impl BlindCheckable for Extrinsic { match self { Extrinsic::AuthoritiesChange(new_auth) => Ok(Extrinsic::AuthoritiesChange(new_auth)), Extrinsic::Transfer(transfer, signature) => { - if sr_primitives::verify_encoded_lazy(&signature, &transfer, &transfer.from) { + if sp_runtime::verify_encoded_lazy(&signature, &transfer, &transfer.from) { Ok(Extrinsic::Transfer(transfer, signature)) } else { Err(InvalidTransaction::BadProof.into()) @@ -173,17 +173,17 @@ pub type BlockNumber = u64; /// Index of a transaction. pub type Index = u64; /// The item of a block digest. -pub type DigestItem = sr_primitives::generic::DigestItem; +pub type DigestItem = sp_runtime::generic::DigestItem; /// The digest of a block. -pub type Digest = sr_primitives::generic::Digest; +pub type Digest = sp_runtime::generic::Digest; /// A test block. -pub type Block = sr_primitives::generic::Block; +pub type Block = sp_runtime::generic::Block; /// A test block's header. -pub type Header = sr_primitives::generic::Header; +pub type Header = sp_runtime::generic::Header; /// Run whatever tests we have. pub fn run_tests(mut input: &[u8]) -> Vec { - use sr_primitives::print; + use sp_runtime::print; print("run_tests..."); let block = Block::decode(&mut input).unwrap(); @@ -457,7 +457,7 @@ static mut MUTABLE_STATIC: u64 = 32; cfg_if! { if #[cfg(feature = "std")] { impl_runtime_apis! { - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { version() } @@ -471,7 +471,7 @@ cfg_if! { } } - impl sr_api::Metadata for Runtime { + impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { unimplemented!() } @@ -642,7 +642,7 @@ cfg_if! { } } else { impl_runtime_apis! { - impl sr_api::Core for Runtime { + impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { version() } @@ -656,7 +656,7 @@ cfg_if! { } } - impl sr_api::Metadata for Runtime { + impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { unimplemented!() } @@ -937,7 +937,7 @@ mod tests { DefaultTestClientBuilderExt, TestClientBuilder, runtime::TestAPI, }; - use sr_primitives::{ + use sp_runtime::{ generic::BlockId, traits::ProvideRuntimeApi, }; diff --git a/test/utils/runtime/src/system.rs b/test/utils/runtime/src/system.rs index 1a04da1764323..a0c1a2769ec09 100644 --- a/test/utils/runtime/src/system.rs +++ b/test/utils/runtime/src/system.rs @@ -24,7 +24,7 @@ use runtime_io::{ }; use runtime_support::storage; use runtime_support::{decl_storage, decl_module}; -use sr_primitives::{ +use sp_runtime::{ traits::{Hash as HashT, BlakeTwo256, Header as _}, generic, ApplyExtrinsicResult, transaction_validity::{ TransactionValidity, ValidTransaction, InvalidTransaction, TransactionValidityError, @@ -257,7 +257,7 @@ pub fn finalize_block() -> Header { #[inline(always)] fn check_signature(utx: &Extrinsic) -> Result<(), TransactionValidityError> { - use sr_primitives::traits::BlindCheckable; + use sp_runtime::traits::BlindCheckable; utx.clone().check().map_err(|_| InvalidTransaction::BadProof.into()).map(|_| ()) } @@ -325,9 +325,9 @@ fn info_expect_equal_hash(given: &Hash, expected: &Hash) { #[cfg(not(feature = "std"))] fn info_expect_equal_hash(given: &Hash, expected: &Hash) { if given != expected { - sr_primitives::print("Hash not equal"); - sr_primitives::print(given.as_bytes()); - sr_primitives::print(expected.as_bytes()); + sp_runtime::print("Hash not equal"); + sp_runtime::print(given.as_bytes()); + sp_runtime::print(expected.as_bytes()); } } @@ -339,7 +339,7 @@ mod tests { use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring}; use crate::{Header, Transfer, WASM_BINARY}; use primitives::{NeverNativeValue, map, traits::CodeExecutor}; - use substrate_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance}; + use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance}; use runtime_io::hashing::twox_128; // Declare an instance of the native executor dispatch for the test runtime. diff --git a/test/utils/transaction-factory/Cargo.toml b/test/utils/transaction-factory/Cargo.toml index 5c15a887c667d..1414e3baa1083 100644 --- a/test/utils/transaction-factory/Cargo.toml +++ b/test/utils/transaction-factory/Cargo.toml @@ -5,16 +5,16 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" } -cli = { package = "substrate-cli", path = "../../../client/cli" } -client-api = { package = "substrate-client-api", path = "../../../client/api" } -client = { package = "substrate-client", path = "../../../client" } +block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" } +cli = { package = "sc-cli", path = "../../../client/cli" } +client-api = { package = "sc-client-api", path = "../../../client/api" } +client = { package = "sc-client", path = "../../../client" } codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] } -consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" } +consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" } log = "0.4.8" -primitives = { package = "substrate-primitives", path = "../../../primitives/core" } -sr-api = { path = "../../../primitives/sr-api" } -sr-primitives = { path = "../../../primitives/sr-primitives" } -substrate-service = { path = "../../../client/service" } +primitives = { package = "sp-core", path = "../../../primitives/core" } +sp-api = { path = "../../../primitives/sr-api" } +sp-runtime = { path = "../../../primitives/sr-primitives" } +sc-service = { path = "../../../client/service" } sp-blockchain = { path = "../../../primitives/blockchain" } diff --git a/test/utils/transaction-factory/src/complex_mode.rs b/test/utils/transaction-factory/src/complex_mode.rs index bbc01c19ba773..2c82be3b4cd4c 100644 --- a/test/utils/transaction-factory/src/complex_mode.rs +++ b/test/utils/transaction-factory/src/complex_mode.rs @@ -43,10 +43,10 @@ use std::sync::Arc; use log::info; use client::Client; use block_builder_api::BlockBuilder; -use sr_api::ConstructRuntimeApi; +use sp_api::ConstructRuntimeApi; use primitives::{Blake2Hasher, Hasher}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{Block as BlockT, ProvideRuntimeApi, One, Zero}; +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, ProvideRuntimeApi, One, Zero}; use crate::{RuntimeAdapter, create_block}; diff --git a/test/utils/transaction-factory/src/lib.rs b/test/utils/transaction-factory/src/lib.rs index cab30b9a405d6..e9526e6259bd1 100644 --- a/test/utils/transaction-factory/src/lib.rs +++ b/test/utils/transaction-factory/src/lib.rs @@ -28,7 +28,7 @@ use log::info; use client::Client; use block_builder_api::BlockBuilder; -use sr_api::ConstructRuntimeApi; +use sp_api::ConstructRuntimeApi; use consensus_common::{ BlockOrigin, BlockImportParams, InherentData, ForkChoiceStrategy, SelectChain @@ -36,8 +36,8 @@ use consensus_common::{ use consensus_common::block_import::BlockImport; use codec::{Decode, Encode}; use primitives::{Blake2Hasher, Hasher}; -use sr_primitives::generic::BlockId; -use sr_primitives::traits::{ +use sp_runtime::generic::BlockId; +use sp_runtime::traits::{ Block as BlockT, Header as HeaderT, ProvideRuntimeApi, SimpleArithmetic, One, Zero, }; diff --git a/test/utils/transaction-factory/src/simple_modes.rs b/test/utils/transaction-factory/src/simple_modes.rs index 973de45c7ef61..756708b17fec2 100644 --- a/test/utils/transaction-factory/src/simple_modes.rs +++ b/test/utils/transaction-factory/src/simple_modes.rs @@ -38,10 +38,10 @@ use std::sync::Arc; use log::info; use client::Client; use block_builder_api::BlockBuilder; -use sr_api::ConstructRuntimeApi; +use sp_api::ConstructRuntimeApi; use primitives::{Blake2Hasher, Hasher}; -use sr_primitives::traits::{Block as BlockT, ProvideRuntimeApi, One}; -use sr_primitives::generic::BlockId; +use sp_runtime::traits::{Block as BlockT, ProvideRuntimeApi, One}; +use sp_runtime::generic::BlockId; use crate::{Mode, RuntimeAdapter, create_block}; diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index 937acb8295edb..d2ca6c060e224 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -11,7 +11,7 @@ jsonrpc-core = "14" parity-scale-codec = "1" serde = "1" frame-support = { path = "../../../../frame/support" } -substrate-primitives-storage = { path = "../../../../primitives/core/storage" } +sp-core-storage = { path = "../../../../primitives/core/storage" } sc-rpc-api = { path = "../../../../client/rpc/api" } [dev-dependencies] diff --git a/utils/frame/rpc/support/src/lib.rs b/utils/frame/rpc/support/src/lib.rs index c9163bdc306d5..c16e31f7e057e 100644 --- a/utils/frame/rpc/support/src/lib.rs +++ b/utils/frame/rpc/support/src/lib.rs @@ -27,7 +27,7 @@ use serde::{de::DeserializeOwned, Serialize}; use frame_support::storage::generator::{ StorageDoubleMap, StorageLinkedMap, StorageMap, StorageValue }; -use substrate_primitives_storage::{StorageData, StorageKey}; +use sp_core_storage::{StorageData, StorageKey}; use sc_rpc_api::state::StateClient; /// A typed query on chain state usable from an RPC client. diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 9b5b32919c1e1..8447eef7bcce1 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -client = { package = "substrate-client", path = "../../../../client/" } +client = { package = "sc-client", path = "../../../../client/" } codec = { package = "parity-scale-codec", version = "1.0.0" } futures = "0.3.1" jsonrpc-core = "14.0.3" @@ -13,9 +13,9 @@ jsonrpc-core-client = "14.0.3" jsonrpc-derive = "14.0.3" log = "0.4.8" serde = { version = "1.0.101", features = ["derive"] } -sr-primitives = { path = "../../../../primitives/sr-primitives" } +sp-runtime = { path = "../../../../primitives/sr-primitives" } frame-system-rpc-runtime-api = { path = "../../../../frame/system/rpc/runtime-api" } -substrate-primitives = { path = "../../../../primitives/core" } +sp-core = { path = "../../../../primitives/core" } sp-blockchain = { path = "../../../../primitives/blockchain" } txpool-api = { package = "sp-transaction-pool-api", path = "../../../../primitives/transaction-pool" } diff --git a/utils/frame/rpc/system/src/lib.rs b/utils/frame/rpc/system/src/lib.rs index ebda962031921..675965729d885 100644 --- a/utils/frame/rpc/system/src/lib.rs +++ b/utils/frame/rpc/system/src/lib.rs @@ -33,11 +33,11 @@ use sp_blockchain::{ HeaderBackend, Error as ClientError }; -use sr_primitives::{ +use sp_runtime::{ generic::BlockId, traits, }; -use substrate_primitives::hexdisplay::HexDisplay; +use sp_core::hexdisplay::HexDisplay; use txpool_api::{TransactionPool, InPoolTransaction}; pub use frame_system_rpc_runtime_api::AccountNonceApi; From 6f77e0a6ff0f7ab354332c7a1b94848e9d778bd1 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Fri, 29 Nov 2019 11:34:19 +0100 Subject: [PATCH 4/7] fix now minor details in expected stderr --- primitives/sr-api/test/tests/ui/declaring_old_block.stderr | 2 +- .../tests/ui/declaring_own_block_with_different_name.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/sr-api/test/tests/ui/declaring_old_block.stderr b/primitives/sr-api/test/tests/ui/declaring_old_block.stderr index d46c34f0b30e8..373e669c7849a 100644 --- a/primitives/sr-api/test/tests/ui/declaring_old_block.stderr +++ b/primitives/sr-api/test/tests/ui/declaring_old_block.stderr @@ -14,6 +14,6 @@ warning: unused import: `sp_runtime::traits::Block as BlockT` --> $DIR/declaring_old_block.rs:1:5 | 1 | use sp_runtime::traits::Block as BlockT; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr index 096456c3f78f6..fe445b822dd88 100644 --- a/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr +++ b/primitives/sr-api/test/tests/ui/declaring_own_block_with_different_name.stderr @@ -8,6 +8,6 @@ warning: unused import: `sp_runtime::traits::Block as BlockT` --> $DIR/declaring_own_block_with_different_name.rs:1:5 | 1 | use sp_runtime::traits::Block as BlockT; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default From 7c05bd91e97bddae873bccac9eb23d1c741a25a4 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Mon, 2 Dec 2019 10:29:22 +0100 Subject: [PATCH 5/7] Update the Cargo.lock --- Cargo.lock | 3020 ++++++++++++++++++++++++++-------------------------- 1 file changed, 1510 insertions(+), 1510 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2a5b8cde28036..8dfb6135db313 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -476,9 +476,9 @@ dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "node-cli 2.0.0", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-keystore 2.0.0", + "sp-core 2.0.0", "structopt 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-keystore 2.0.0", - "substrate-primitives 2.0.0", ] [[package]] @@ -1246,10 +1246,10 @@ dependencies = [ "pallet-transaction-payment 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -1258,8 +1258,8 @@ version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -1277,13 +1277,13 @@ dependencies = [ "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-arithmetic 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", + "sp-arithmetic 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1325,11 +1325,11 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", "trybuild 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1343,11 +1343,11 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-version 2.0.0", ] [[package]] @@ -1355,7 +1355,7 @@ name = "frame-system-rpc-runtime-api" version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", + "sp-api 2.0.0", ] [[package]] @@ -1367,10 +1367,10 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -2990,38 +2990,38 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-authority-discovery 2.0.0", + "sc-basic-authority 2.0.0", + "sc-chain-spec 2.0.0", + "sc-cli 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-client-db 2.0.0", + "sc-consensus-babe 2.0.0", + "sc-finality-grandpa 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-offchain 2.0.0", + "sc-rpc 2.0.0", + "sc-service 2.0.0", + "sc-service-test 2.0.0", + "sc-telemetry 2.0.0", "sc-transaction-pool 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-authority-discovery 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-finality-granpda 2.0.0", "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", "sp-timestamp 2.0.0", "sp-transaction-pool-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", "structopt 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-authority-discovery 2.0.0", - "substrate-authority-discovery-primitives 2.0.0", - "substrate-basic-authorship 2.0.0", "substrate-build-script-utils 2.0.0", - "substrate-chain-spec 2.0.0", - "substrate-cli 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-client-db 2.0.0", - "substrate-consensus-babe 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-finality-grandpa 2.0.0", - "substrate-finality-grandpa-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-offchain 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc 2.0.0", - "substrate-service 2.0.0", - "substrate-service-test 2.0.0", - "substrate-telemetry 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-factory 0.0.1", @@ -3049,13 +3049,13 @@ dependencies = [ "pallet-transaction-payment 2.0.0", "pallet-treasury 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "substrate-executor 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", + "sc-executor 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-trie 2.0.0", "substrate-test-client 2.0.0", - "substrate-trie 2.0.0", "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3065,9 +3065,9 @@ name = "node-primitives" version = "2.0.0" dependencies = [ "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-serializer 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-serializer 2.0.0", ] [[package]] @@ -3079,9 +3079,9 @@ dependencies = [ "node-runtime 2.0.0", "pallet-contracts-rpc 2.0.0", "pallet-transaction-payment-rpc 2.0.0", + "sc-client 2.0.0", + "sp-runtime 2.0.0", "sp-transaction-pool-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", "substrate-frame-rpc-system 2.0.0", ] @@ -3095,7 +3095,7 @@ dependencies = [ "jsonrpc-core-client 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 2.0.0", - "substrate-rpc 2.0.0", + "sc-rpc 2.0.0", ] [[package]] @@ -3138,21 +3138,21 @@ dependencies = [ "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-sesssion 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-authority-discovery-primitives 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-offchain-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-session 2.0.0", + "sp-version 2.0.0", "substrate-wasm-builder-runner 1.0.4", ] @@ -3167,24 +3167,24 @@ dependencies = [ "node-template-runtime 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-basic-authority 2.0.0", + "sc-cli 2.0.0", + "sc-client 2.0.0", + "sc-consensus-aura 2.0.0", + "sc-executor 2.0.0", + "sc-finality-grandpa 2.0.0", + "sc-network 2.0.0", + "sc-service 2.0.0", "sc-transaction-pool 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-aura 2.0.0", + "sp-core 2.0.0", + "sp-finality-granpda 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", "sp-transaction-pool-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "substrate-basic-authorship 2.0.0", "substrate-build-script-utils 2.0.0", - "substrate-cli 2.0.0", - "substrate-client 2.0.0", - "substrate-consensus-aura 2.0.0", - "substrate-consensus-aura-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-finality-grandpa 2.0.0", - "substrate-finality-grandpa-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3208,18 +3208,18 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-aura 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-sesssion 2.0.0", + "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-consensus-aura-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-offchain-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-session 2.0.0", + "sp-version 2.0.0", "substrate-wasm-builder-runner 1.0.4", ] @@ -3242,12 +3242,12 @@ dependencies = [ "pallet-transaction-payment 2.0.0", "pallet-treasury 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-executor 2.0.0", - "substrate-keyring 2.0.0", - "substrate-primitives 2.0.0", + "sc-client 2.0.0", + "sc-executor 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", "substrate-test-client 2.0.0", "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3404,10 +3404,10 @@ dependencies = [ "frame-system 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3421,15 +3421,15 @@ dependencies = [ "pallet-timestamp 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-consensus-aura 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", "sp-timestamp 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-consensus-aura-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", ] [[package]] @@ -3440,14 +3440,14 @@ dependencies = [ "frame-system 2.0.0", "pallet-session 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-authority-discovery-primitives 2.0.0", - "substrate-primitives 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3459,11 +3459,11 @@ dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sp-authorship 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3479,15 +3479,15 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", "sp-timestamp 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", + "sp-version 2.0.0", "substrate-test-runtime 2.0.0", ] @@ -3501,10 +3501,10 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3518,10 +3518,10 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3539,11 +3539,11 @@ dependencies = [ "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-sandbox 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-sandbox 2.0.0", + "sp-std 2.0.0", "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3559,9 +3559,9 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc-primitives 2.0.0", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", ] [[package]] @@ -3570,9 +3570,9 @@ version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3585,10 +3585,10 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3602,10 +3602,10 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3618,11 +3618,11 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-phragmen 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-phragmen 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", "substrate-test-utils 2.0.0", ] @@ -3640,10 +3640,10 @@ dependencies = [ "rlp 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3655,10 +3655,10 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3670,12 +3670,12 @@ dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", "sp-finality-tracker 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3686,10 +3686,10 @@ dependencies = [ "frame-system 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3702,12 +3702,12 @@ dependencies = [ "pallet-session 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-finality-grandpa-primitives 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-finality-granpda 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3719,13 +3719,13 @@ dependencies = [ "pallet-authorship 0.1.0", "pallet-session 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3738,11 +3738,11 @@ dependencies = [ "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-keyring 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3753,10 +3753,10 @@ dependencies = [ "frame-system 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3768,10 +3768,10 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3783,11 +3783,11 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3798,10 +3798,10 @@ dependencies = [ "frame-system 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3813,10 +3813,10 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3830,14 +3830,14 @@ dependencies = [ "pallet-timestamp 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-primitives 2.0.0", - "substrate-trie 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", ] [[package]] @@ -3854,13 +3854,13 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-staking-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-keyring 2.0.0", - "substrate-phragmen 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-phragmen 2.0.0", + "sp-runtime 2.0.0", + "sp-staking 2.0.0", + "sp-std 2.0.0", "substrate-test-utils 2.0.0", ] @@ -3871,7 +3871,7 @@ dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", + "sp-runtime 2.0.0", "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3883,10 +3883,10 @@ dependencies = [ "frame-system 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3898,12 +3898,12 @@ dependencies = [ "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", "sp-timestamp 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", ] [[package]] @@ -3915,10 +3915,10 @@ dependencies = [ "pallet-balances 2.0.0", "pallet-transaction-payment-rpc-runtime-api 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3932,9 +3932,9 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc-primitives 2.0.0", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", ] [[package]] @@ -3945,9 +3945,9 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -3959,10 +3959,10 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] @@ -4800,6 +4800,606 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sc-application-crypto" +version = "2.0.0" +dependencies = [ + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "substrate-test-runtime-client 2.0.0", +] + +[[package]] +name = "sc-authority-discovery" +version = "2.0.0" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-peerset 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-authority-discovery 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", +] + +[[package]] +name = "sc-basic-authority" +version = "2.0.0" +dependencies = [ + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-telemetry 2.0.0", + "sc-transaction-pool 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool-api 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-block-builder" +version = "2.0.0" +dependencies = [ + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", +] + +[[package]] +name = "sc-chain-spec" +version = "2.0.0" +dependencies = [ + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-chain-spec-derive 2.0.0", + "sc-network 2.0.0", + "sc-telemetry 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", +] + +[[package]] +name = "sc-chain-spec-derive" +version = "2.0.0" +dependencies = [ + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-cli" +version = "2.0.0" +dependencies = [ + "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures01 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-network 2.0.0", + "sc-service 2.0.0", + "sc-telemetry 2.0.0", + "sc-transaction 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "structopt 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-client" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 2.0.0", + "sc-client-api 2.0.0", + "sc-client-db 2.0.0", + "sc-executor 2.0.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-client-api" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 2.0.0", + "sc-client-db 2.0.0", + "sc-executor 2.0.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", + "sp-transaction-pool-api 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "substrate-test-primitives 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-client-db" +version = "2.0.0" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kvdb-rocksdb 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-executor 2.0.0", + "sc-state-db 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-trie 2.0.0", + "substrate-test-runtime-client 2.0.0", +] + +[[package]] +name = "sc-consensus-aura" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-consensus-slots 2.0.0", + "sc-executor 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-service 2.0.0", + "sc-telemetry 2.0.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-aura 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-consensus-babe" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "merlin 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "sc-block-builder 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-consensus-slots 2.0.0", + "sc-consensus-uncles 2.0.0", + "sc-executor 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-service 2.0.0", + "sc-telemetry 2.0.0", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-consensus-pow" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-pow 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-timestamp 2.0.0", +] + +[[package]] +name = "sc-consensus-slots" +version = "2.0.0" +dependencies = [ + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-telemetry 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", +] + +[[package]] +name = "sc-consensus-uncles" +version = "2.0.0" +dependencies = [ + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sp-authorship 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", +] + +[[package]] +name = "sc-executor" +version = "2.0.0" +dependencies = [ + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-codegen 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-frontend 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-native 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cranelift-wasm 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-offchain 2.0.0", + "sc-runtime-test 2.0.0", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-io 2.0.0", + "sp-panic-handler 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-serializer 2.0.0", + "sp-state-machine 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", + "sp-wasm-interface 2.0.0", + "substrate-test-runtime 2.0.0", + "test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-environ 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-jit 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmtime-runtime 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-finality-grandpa" +version = "2.0.0" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "finality-grandpa 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-telemetry 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-finality-granpda 2.0.0", + "sp-finality-tracker 2.0.0", + "sp-inherents 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-keystore" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-network" +version = "2.0.0" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fork-tree 2.0.0", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-peerset 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "substrate-test-client 2.0.0", + "substrate-test-runtime 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-offchain" +version = "2.0.0" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", + "sc-client-db 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-transaction-pool 2.0.0", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool-api 2.0.0", + "substrate-test-runtime-client 2.0.0", + "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-peerset" +version = "2.0.0" +dependencies = [ + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-rpc" +version = "2.0.0" +dependencies = [ + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-executor 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-rpc-api 2.0.0", + "sc-transaction-pool 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-rpc 2.0.0", + "sp-runtime 2.0.0", + "sp-sesssion 2.0.0", + "sp-state-machine 2.0.0", + "sp-transaction-pool-api 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sc-rpc-api" version = "2.0.0" @@ -4815,10 +5415,156 @@ dependencies = [ "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-transaction-pool-api 2.0.0", - "sr-version 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc-primitives 2.0.0", + "sp-core 2.0.0", + "sp-rpc 2.0.0", + "sp-transaction-pool-api 2.0.0", + "sp-version 2.0.0", +] + +[[package]] +name = "sc-rpc-server" +version = "2.0.0" +dependencies = [ + "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-http-server 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-pubsub 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-ws-server 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", +] + +[[package]] +name = "sc-runtime-test" +version = "2.0.0" +dependencies = [ + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-sandbox 2.0.0", + "sp-std 2.0.0", + "substrate-wasm-builder-runner 1.0.4", +] + +[[package]] +name = "sc-service" +version = "2.0.0" +dependencies = [ + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "grafana-data-source 2.0.0", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "sc-chain-spec 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-client-db 2.0.0", + "sc-executor 2.0.0", + "sc-finality-grandpa 2.0.0", + "sc-keystore 2.0.0", + "sc-network 2.0.0", + "sc-offchain 2.0.0", + "sc-rpc 2.0.0", + "sc-rpc-server 2.0.0", + "sc-telemetry 2.0.0", + "sc-transaction 2.0.0", + "sc-transaction-pool 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-blockchain 2.0.0", + "sp-consensus 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-finality-granpda 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-sesssion 2.0.0", + "sp-transaction-pool-api 2.0.0", + "sp-transaction-pool-runtime-api 2.0.0", + "substrate-test-runtime-client 2.0.0", + "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", + "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-service-test" +version = "2.0.0" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-network 2.0.0", + "sc-service 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool-api 2.0.0", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-state-db" +version = "2.0.0" +dependencies = [ + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", +] + +[[package]] +name = "sc-telemetry" +version = "2.0.0" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-async 2.3.0 (git+https://github.com/paritytech/slog-async)", + "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sc-transaction" +version = "2.0.0" +dependencies = [ + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "grafana-data-source 2.0.0", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-telemetry 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4834,9 +5580,9 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", "sp-transaction-pool-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", "substrate-test-runtime 2.0.0", ] @@ -4849,15 +5595,15 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client-api 2.0.0", "sc-transaction-graph 2.0.0", + "sp-api 2.0.0", "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", "sp-transaction-pool-api 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client-api 2.0.0", - "substrate-keyring 2.0.0", - "substrate-primitives 2.0.0", "substrate-test-runtime-client 2.0.0", ] @@ -5070,1480 +5816,775 @@ source = "git+https://github.com/paritytech/slog-async#107848e7ded5e80dc43f6296c dependencies = [ "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "slog-json" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "slog-scope" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arc-swap 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "slog_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "smallvec" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "snow" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "soketto" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sourcefile" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sp-authorship" -version = "2.0.0" -dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", -] - -[[package]] -name = "sp-blockchain" -version = "2.0.0" -dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-state-machine 2.0.0", -] - -[[package]] -name = "sp-finality-tracker" -version = "2.0.0" -dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", -] - -[[package]] -name = "sp-timestamp" -version = "2.0.0" -dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", -] - -[[package]] -name = "sp-transaction-pool-api" -version = "2.0.0" -dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", -] - -[[package]] -name = "sp-transaction-pool-runtime-api" -version = "2.0.0" -dependencies = [ - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-primitives 2.0.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sr-api" -version = "2.0.0" -dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api-proc-macro 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-test-runtime-client 2.0.0", -] - -[[package]] -name = "sr-api-proc-macro" -version = "2.0.0" -dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-version 2.0.0", - "substrate-test-runtime-client 2.0.0", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sr-api-test" -version = "2.0.0" -dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-version 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-test-runtime-client 2.0.0", - "trybuild 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sr-arithmetic" -version = "2.0.0" -dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-debug-derive 2.0.0", -] - -[[package]] -name = "sr-io" -version = "2.0.0" -dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-externalities 2.0.0", - "substrate-primitives 2.0.0", - "substrate-runtime-interface 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-trie 2.0.0", -] - -[[package]] -name = "sr-primitives" -version = "2.0.0" -dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-arithmetic 2.0.0", - "sr-io 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", -] - -[[package]] -name = "sr-sandbox" -version = "2.0.0" -dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sr-staking-primitives" -version = "2.0.0" -dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "sr-std 2.0.0", -] - -[[package]] -name = "sr-std" -version = "2.0.0" - -[[package]] -name = "sr-version" -version = "2.0.0" -dependencies = [ - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "sr-std 2.0.0", -] - -[[package]] -name = "stable_deref_trait" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "stream-cipher" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "string-interner" -version = "0.7.1" +name = "slog-json" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "structopt" -version = "0.3.4" +name = "slog-scope" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "arc-swap 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "structopt-derive" -version = "0.3.4" +name = "slog_derive" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "strum" -version = "0.16.0" +name = "smallvec" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "strum_macros" -version = "0.16.0" +name = "smallvec" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "subkey" -version = "2.0.0" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-system 2.0.0", - "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "node-primitives 2.0.0", - "node-runtime 2.0.0", - "pallet-balances 2.0.0", - "pallet-transaction-payment 2.0.0", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-primitives 2.0.0", - "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "substrate-application-crypto" -version = "2.0.0" +name = "snow" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-runtime-client 2.0.0", + "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-authority-discovery" -version = "2.0.0" +name = "soketto" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-authority-discovery-primitives 2.0.0", - "substrate-client-api 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-peerset 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-runtime-client 2.0.0", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-authority-discovery-primitives" -version = "2.0.0" -dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", -] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "substrate-basic-authorship" +name = "sp-api" version = "2.0.0" dependencies = [ - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-transaction-pool 2.0.0", - "sp-blockchain 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", - "substrate-telemetry 2.0.0", + "sp-api-proc-macro 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", + "sp-version 2.0.0", "substrate-test-runtime-client 2.0.0", - "tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-bip39" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "sp-api-proc-macro" +version = "2.0.0" dependencies = [ - "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-block-builder" +name = "sp-api-test" version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", "sp-blockchain 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", + "sp-consensus 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", + "sp-version 2.0.0", + "substrate-test-runtime-client 2.0.0", + "trybuild 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-block-builder-runtime-api" +name = "sp-arithmetic" version = "2.0.0" dependencies = [ + "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-inherents 2.0.0", + "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-build-script-utils" -version = "2.0.0" - -[[package]] -name = "substrate-chain-spec" +name = "sp-authority-discovery" version = "2.0.0" dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-chain-spec-derive 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-telemetry 2.0.0", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-chain-spec-derive" +name = "sp-authorship" version = "2.0.0" dependencies = [ - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-inherents 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-cli" +name = "sp-block-builder" version = "2.0.0" dependencies = [ - "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures01 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "structopt 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-client-api 2.0.0", - "substrate-keyring 2.0.0", - "substrate-network 2.0.0", - "substrate-panic-handler 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-tracing 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-client" +name = "sp-blockchain" version = "2.0.0" dependencies = [ "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lru 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-client-api 2.0.0", - "substrate-client-db 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-externalities 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-panic-handler 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-trie 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-block-builder 2.0.0", + "sp-consensus 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", ] [[package]] -name = "substrate-client-api" +name = "sp-consensus" version = "2.0.0" dependencies = [ "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-client-db 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-externalities 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-panic-handler 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-primitives 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-version 2.0.0", "substrate-test-runtime-client 2.0.0", - "substrate-trie 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-client-db" +name = "sp-consensus-aura" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-memorydb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kvdb-rocksdb 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-keyring 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-db 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-trie 2.0.0", + "sc-application-crypto 2.0.0", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "sp-timestamp 2.0.0", ] [[package]] -name = "substrate-consensus-aura" +name = "sp-consensus-babe" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", + "sc-application-crypto 2.0.0", + "sc-consensus-slots 2.0.0", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", "sp-timestamp 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-version 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-aura-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-consensus-slots 2.0.0", - "substrate-executor 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-consensus-aura-primitives" +name = "sp-consensus-pow" version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-timestamp 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-inherents 2.0.0", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-consensus-babe" +name = "sp-core" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "ed25519-dalek 1.0.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "merlin 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-timestamp 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-version 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-consensus-slots 2.0.0", - "substrate-consensus-uncles 2.0.0", - "substrate-executor 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core-storage 2.0.0", + "sp-debug-derive 2.0.0", + "sp-externalities 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-serializer 2.0.0", + "sp-std 2.0.0", + "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-consensus-babe-primitives" +name = "sp-core-storage" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-timestamp 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-consensus-slots 2.0.0", - "substrate-inherents 2.0.0", + "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-consensus-common" +name = "sp-debug-derive" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-runtime-client 2.0.0", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-consensus-pow" +name = "sp-externalities" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-timestamp 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-consensus-pow-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", + "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core-storage 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-consensus-pow-primitives" +name = "sp-finality-granpda" version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "sc-application-crypto 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-consensus-slots" +name = "sp-finality-tracker" version = "2.0.0" dependencies = [ - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", + "sp-inherents 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-consensus-uncles" +name = "sp-inherents" version = "2.0.0" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-authorship 2.0.0", - "sr-primitives 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-inherents 2.0.0", - "substrate-primitives 2.0.0", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-debug-derive" +name = "sp-io" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", + "sp-trie 2.0.0", ] [[package]] -name = "substrate-executor" +name = "sp-keyring" version = "2.0.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-codegen 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-frontend 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-native 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cranelift-wasm 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-version 2.0.0", - "substrate-client-api 2.0.0", - "substrate-externalities 2.0.0", - "substrate-offchain 2.0.0", - "substrate-panic-handler 2.0.0", - "substrate-primitives 2.0.0", - "substrate-runtime-interface 2.0.0", - "substrate-runtime-test 2.0.0", - "substrate-serializer 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-test-runtime 2.0.0", - "substrate-trie 2.0.0", - "substrate-wasm-interface 2.0.0", - "test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-environ 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-jit 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmtime-runtime 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-externalities" +name = "sp-offchain" version = "2.0.0" dependencies = [ - "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-primitives-storage 2.0.0", + "sp-api 2.0.0", + "sp-runtime 2.0.0", ] [[package]] -name = "substrate-finality-grandpa" +name = "sp-panic-handler" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "finality-grandpa 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-finality-tracker 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-finality-grandpa-primitives 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-finality-grandpa-primitives" +name = "sp-phragmen" version = "2.0.0" dependencies = [ - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-application-crypto 2.0.0", + "sp-io 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", + "substrate-test-utils 2.0.0", ] [[package]] -name = "substrate-frame-rpc-support" +name = "sp-rpc" version = "2.0.0" dependencies = [ - "frame-support 2.0.0", - "frame-system 2.0.0", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-client-transports 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-rpc-api 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-primitives-storage 2.0.0", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", ] [[package]] -name = "substrate-frame-rpc-system" +name = "sp-runtime" version = "2.0.0" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "frame-system-rpc-runtime-api 2.0.0", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core-client 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-derive 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-transaction-pool 2.0.0", + "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-runtime-client 2.0.0", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-inherents" +name = "sp-runtime-interface" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", + "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-executor 2.0.0", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-io 2.0.0", + "sp-runtime-interface-proc-macro 2.0.0", + "sp-runtime-interface-test-wasm 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", + "sp-wasm-interface 2.0.0", + "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-keyring" +name = "sp-runtime-interface-proc-macro" version = "2.0.0" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-primitives 2.0.0", + "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 2.0.0", + "sp-runtime-interface 2.0.0", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "trybuild 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-keystore" +name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-application-crypto 2.0.0", - "substrate-primitives 2.0.0", - "subtle 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-std 2.0.0", + "substrate-wasm-builder-runner 1.0.4", ] [[package]] -name = "substrate-network" +name = "sp-sandbox" version = "2.0.0" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fork-tree 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lru 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sr-arithmetic 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-keyring 2.0.0", - "substrate-peerset 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-client 2.0.0", - "substrate-test-runtime 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-io 2.0.0", + "sp-std 2.0.0", + "wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-offchain" +name = "sp-serializer" version = "2.0.0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-transaction-pool 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client-api 2.0.0", - "substrate-client-db 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-offchain-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-test-runtime-client 2.0.0", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-offchain-primitives" +name = "sp-sesssion" version = "2.0.0" dependencies = [ - "sr-api 2.0.0", - "sr-primitives 2.0.0", + "sp-api 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-panic-handler" +name = "sp-staking" version = "2.0.0" dependencies = [ - "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-peerset" +name = "sp-state-machine" version = "2.0.0" dependencies = [ - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-externalities 2.0.0", + "sp-panic-handler 2.0.0", + "sp-trie 2.0.0", + "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-phragmen" +name = "sp-std" +version = "2.0.0" + +[[package]] +name = "sp-timestamp" version = "2.0.0" dependencies = [ - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "substrate-test-utils 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-inherents 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-primitives" +name = "sp-transaction-pool-api" version = "2.0.0" dependencies = [ - "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ed25519-dalek 1.0.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hash256-std-hasher 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-debug-derive 2.0.0", - "substrate-externalities 2.0.0", - "substrate-primitives-storage 2.0.0", - "substrate-runtime-interface 2.0.0", - "substrate-serializer 2.0.0", - "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "zeroize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] -name = "substrate-primitives-storage" +name = "sp-transaction-pool-runtime-api" version = "2.0.0" dependencies = [ - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-debug-derive 2.0.0", + "sp-api 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] -name = "substrate-rpc" +name = "sp-trie" version = "2.0.0" dependencies = [ - "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-rpc-api 2.0.0", - "sc-transaction-pool 2.0.0", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-version 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-executor 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc-primitives 2.0.0", - "substrate-session 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-test-runtime-client 2.0.0", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-std 2.0.0", + "trie-bench 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-rpc-primitives" +name = "sp-version" version = "2.0.0" dependencies = [ + "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-primitives 2.0.0", + "sp-runtime 2.0.0", + "sp-std 2.0.0", ] [[package]] -name = "substrate-rpc-servers" +name = "sp-wasm-interface" version = "2.0.0" dependencies = [ - "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-http-server 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-pubsub 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-ws-server 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", + "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-runtime-interface" -version = "2.0.0" +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "stream-cipher" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "environmental 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-io 2.0.0", - "sr-std 2.0.0", - "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-executor 2.0.0", - "substrate-externalities 2.0.0", - "substrate-primitives 2.0.0", - "substrate-runtime-interface-proc-macro 2.0.0", - "substrate-runtime-interface-test-wasm 2.0.0", - "substrate-state-machine 2.0.0", - "substrate-wasm-interface 2.0.0", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-runtime-interface-proc-macro" -version = "2.0.0" +name = "string" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-externalities 2.0.0", - "substrate-runtime-interface 2.0.0", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "trybuild 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-runtime-interface-test-wasm" -version = "2.0.0" +name = "string-interner" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "sr-io 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", - "substrate-runtime-interface 2.0.0", - "substrate-wasm-builder-runner 1.0.4", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-runtime-test" -version = "2.0.0" +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "structopt" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-sandbox 2.0.0", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", - "substrate-wasm-builder-runner 1.0.4", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-serializer" -version = "2.0.0" +name = "structopt-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-service" -version = "2.0.0" +name = "strum" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", - "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "grafana-data-source 2.0.0", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sc-transaction-pool 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-blockchain 2.0.0", - "sp-transaction-pool-api 2.0.0", - "sp-transaction-pool-runtime-api 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-chain-spec 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-client-db 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-finality-grandpa 2.0.0", - "substrate-finality-grandpa-primitives 2.0.0", - "substrate-keystore 2.0.0", - "substrate-network 2.0.0", - "substrate-offchain 2.0.0", - "substrate-primitives 2.0.0", - "substrate-rpc 2.0.0", - "substrate-rpc-servers 2.0.0", - "substrate-session 2.0.0", - "substrate-telemetry 2.0.0", - "substrate-test-runtime-client 2.0.0", - "substrate-tracing 2.0.0", - "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", - "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-service-test" -version = "2.0.0" +name = "strum_macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-transaction-pool-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-network 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-session" +name = "subkey" version = "2.0.0" dependencies = [ - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-system 2.0.0", + "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "node-primitives 2.0.0", + "node-runtime 2.0.0", + "pallet-balances 2.0.0", + "pallet-transaction-payment 2.0.0", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-state-db" -version = "2.0.0" +name = "substrate-bip39" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-primitives 2.0.0", + "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-state-machine" +name = "substrate-build-script-utils" +version = "2.0.0" + +[[package]] +name = "substrate-frame-rpc-support" version = "2.0.0" dependencies = [ - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-support 2.0.0", + "frame-system 2.0.0", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-client-transports 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-externalities 2.0.0", - "substrate-panic-handler 2.0.0", - "substrate-primitives 2.0.0", - "substrate-trie 2.0.0", - "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-rpc-api 2.0.0", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core-storage 2.0.0", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "substrate-telemetry" +name = "substrate-frame-rpc-system" version = "2.0.0" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "frame-system-rpc-runtime-api 2.0.0", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core-client 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-derive 14.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-transaction-pool 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-async 2.3.0 (git+https://github.com/paritytech/slog-async)", - "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-blockchain 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", + "sp-transaction-pool-api 2.0.0", + "substrate-test-runtime-client 2.0.0", ] [[package]] @@ -6553,16 +6594,16 @@ dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-client-db 2.0.0", + "sc-executor 2.0.0", "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-client-db 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-executor 2.0.0", - "substrate-keyring 2.0.0", - "substrate-primitives 2.0.0", - "substrate-state-machine 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-keyring 2.0.0", + "sp-runtime 2.0.0", + "sp-state-machine 2.0.0", ] [[package]] @@ -6570,10 +6611,10 @@ name = "substrate-test-primitives" version = "2.0.0" dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-primitives 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] @@ -6590,28 +6631,28 @@ dependencies = [ "pallet-babe 2.0.0", "pallet-timestamp 2.0.0", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-application-crypto 2.0.0", + "sc-client 2.0.0", + "sc-executor 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", + "sp-consensus-aura 2.0.0", + "sp-consensus-babe 2.0.0", + "sp-core 2.0.0", + "sp-inherents 2.0.0", + "sp-io 2.0.0", + "sp-keyring 2.0.0", + "sp-offchain 2.0.0", + "sp-runtime 2.0.0", + "sp-runtime-interface 2.0.0", + "sp-sesssion 2.0.0", + "sp-state-machine 2.0.0", + "sp-std 2.0.0", "sp-transaction-pool-runtime-api 2.0.0", - "sr-api 2.0.0", - "sr-io 2.0.0", - "sr-primitives 2.0.0", - "sr-std 2.0.0", - "sr-version 2.0.0", - "substrate-application-crypto 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-client 2.0.0", - "substrate-consensus-aura-primitives 2.0.0", - "substrate-consensus-babe-primitives 2.0.0", - "substrate-executor 2.0.0", - "substrate-inherents 2.0.0", - "substrate-keyring 2.0.0", - "substrate-offchain-primitives 2.0.0", - "substrate-primitives 2.0.0", - "substrate-runtime-interface 2.0.0", - "substrate-session 2.0.0", - "substrate-state-machine 2.0.0", + "sp-trie 2.0.0", + "sp-version 2.0.0", "substrate-test-runtime-client 2.0.0", - "substrate-trie 2.0.0", "substrate-wasm-builder-runner 1.0.4", "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6622,12 +6663,12 @@ version = "2.0.0" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-block-builder 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", "sp-blockchain 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-primitives 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", "substrate-test-client 2.0.0", "substrate-test-runtime 2.0.0", ] @@ -6636,39 +6677,6 @@ dependencies = [ name = "substrate-test-utils" version = "2.0.0" -[[package]] -name = "substrate-tracing" -version = "2.0.0" -dependencies = [ - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "grafana-data-source 2.0.0", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", - "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "substrate-telemetry 2.0.0", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "substrate-trie" -version = "2.0.0" -dependencies = [ - "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "memory-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sr-std 2.0.0", - "substrate-primitives 2.0.0", - "trie-bench 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-db 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "substrate-wasm-builder" version = "1.0.8" @@ -6687,14 +6695,6 @@ dependencies = [ name = "substrate-wasm-builder-runner" version = "1.0.4" -[[package]] -name = "substrate-wasm-interface" -version = "2.0.0" -dependencies = [ - "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "subtle" version = "1.0.0" @@ -7206,16 +7206,16 @@ version = "0.0.1" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "sc-cli 2.0.0", + "sc-client 2.0.0", + "sc-client-api 2.0.0", + "sc-service 2.0.0", + "sp-api 2.0.0", + "sp-block-builder 2.0.0", "sp-blockchain 2.0.0", - "sr-api 2.0.0", - "sr-primitives 2.0.0", - "substrate-block-builder-runtime-api 2.0.0", - "substrate-cli 2.0.0", - "substrate-client 2.0.0", - "substrate-client-api 2.0.0", - "substrate-consensus-common 2.0.0", - "substrate-primitives 2.0.0", - "substrate-service 2.0.0", + "sp-consensus 2.0.0", + "sp-core 2.0.0", + "sp-runtime 2.0.0", ] [[package]] From 7e36881ff75c978ebc78e9089a1686b94adf9599 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Mon, 2 Dec 2019 10:46:25 +0100 Subject: [PATCH 6/7] fix name: sc-transaction -> sc-tracing --- Cargo.lock | 26 +++++++++---------- bin/node-template/Cargo.toml | 2 +- bin/node/cli/Cargo.toml | 2 +- client/basic-authorship/Cargo.toml | 2 +- client/cli/Cargo.toml | 2 +- client/cli/src/lib.rs | 4 +-- client/cli/src/params.rs | 10 +++---- client/offchain/Cargo.toml | 2 +- client/rpc/Cargo.toml | 2 +- client/service/Cargo.toml | 4 +-- client/service/src/builder.rs | 2 +- client/service/src/config.rs | 2 +- client/tracing/Cargo.toml | 2 +- client/transaction-pool/Cargo.toml | 4 +-- client/transaction-pool/graph/Cargo.toml | 2 +- .../transaction-pool/graph/benches/basics.rs | 2 +- utils/frame/rpc/system/Cargo.toml | 2 +- 17 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8dfb6135db313..40f091db0f579 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3006,7 +3006,7 @@ dependencies = [ "sc-service 2.0.0", "sc-service-test 2.0.0", "sc-telemetry 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "sp-authority-discovery 2.0.0", "sp-consensus 2.0.0", @@ -3175,7 +3175,7 @@ dependencies = [ "sc-finality-grandpa 2.0.0", "sc-network 2.0.0", "sc-service 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "sp-consensus 2.0.0", "sp-consensus-aura 2.0.0", "sp-core 2.0.0", @@ -4852,7 +4852,7 @@ dependencies = [ "sc-client 2.0.0", "sc-client-api 2.0.0", "sc-telemetry 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "sp-blockchain 2.0.0", "sp-consensus 2.0.0", "sp-core 2.0.0", @@ -4922,7 +4922,7 @@ dependencies = [ "sc-network 2.0.0", "sc-service 2.0.0", "sc-telemetry 2.0.0", - "sc-transaction 2.0.0", + "sc-tracing 2.0.0", "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -5342,7 +5342,7 @@ dependencies = [ "sc-client-db 2.0.0", "sc-keystore 2.0.0", "sc-network 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "sp-api 2.0.0", "sp-core 2.0.0", "sp-offchain 2.0.0", @@ -5384,7 +5384,7 @@ dependencies = [ "sc-keystore 2.0.0", "sc-network 2.0.0", "sc-rpc-api 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", @@ -5474,8 +5474,8 @@ dependencies = [ "sc-rpc 2.0.0", "sc-rpc-server 2.0.0", "sc-telemetry 2.0.0", - "sc-transaction 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing 2.0.0", + "sc-tracing-pool 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5552,7 +5552,7 @@ dependencies = [ ] [[package]] -name = "sc-transaction" +name = "sc-tracing" version = "2.0.0" dependencies = [ "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5568,7 +5568,7 @@ dependencies = [ ] [[package]] -name = "sc-transaction-graph" +name = "sc-tracing-graph" version = "2.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5587,7 +5587,7 @@ dependencies = [ ] [[package]] -name = "sc-transaction-pool" +name = "sc-tracing-pool" version = "2.0.0" dependencies = [ "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5596,7 +5596,7 @@ dependencies = [ "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client-api 2.0.0", - "sc-transaction-graph 2.0.0", + "sc-tracing-graph 2.0.0", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -6578,7 +6578,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client 2.0.0", - "sc-transaction-pool 2.0.0", + "sc-tracing-pool 2.0.0", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", "sp-core 2.0.0", diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index bfe39ee0c77c4..37501cd96bbfc 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -24,7 +24,7 @@ primitives = { package = "sp-core", path = "../../primitives/core" } sc-executor = { path = "../../client/executor" } sc-service = { path = "../../client/service" } inherents = { package = "sp-inherents", path = "../../primitives/inherents" } -txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../../client/transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } network = { package = "sc-network", path = "../../client/network" } aura = { package = "sc-consensus-aura", path = "../../client/consensus/aura" } diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 6b61f7abe0618..4d3556bd51ae6 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -49,7 +49,7 @@ runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" } client-api = { package = "sc-client-api", path = "../../../client/api" } client = { package = "sc-client", path = "../../../client/" } chain-spec = { package = "sc-chain-spec", path = "../../../client/chain-spec" } -txpool = { package = "sc-transaction-pool", path = "../../../client/transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../../../client/transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" } network = { package = "sc-network", path = "../../../client/network" } babe = { package = "sc-consensus-babe", path = "../../../client/consensus/babe" } diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index 3f4cbb0bc61c9..ba61625516c09 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -21,6 +21,6 @@ block-builder = { package = "sc-block-builder", path = "../block-builder" } tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] } [dev-dependencies] -txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../../client/transaction-pool" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } parking_lot = "0.9" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 7c8677475c6f1..ea3023e7a83f1 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -34,7 +34,7 @@ keyring = { package = "sp-keyring", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.3" rpassword = "4.0.1" -sc-transaction = { package = "sc-transaction", path = "../tracing" } +sc-tracing = { package = "sc-tracing", path = "../tracing" } [dev-dependencies] tempfile = "3.1.0" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 14bae2613e2d5..25ec6a17b1af8 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -970,8 +970,8 @@ fn init_logger(pattern: &str) { builder.filter(Some("ws"), log::LevelFilter::Off); builder.filter(Some("hyper"), log::LevelFilter::Warn); builder.filter(Some("cranelift_wasm"), log::LevelFilter::Warn); - // Always log the special target `sc_transaction`, overrides global level - builder.filter(Some("sc_transaction"), log::LevelFilter::Info); + // Always log the special target `sc_tracing`, overrides global level + builder.filter(Some("sc_tracing"), log::LevelFilter::Info); // Enable info for others. builder.filter(None, log::LevelFilter::Info); diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index a8c6417c44df9..58d7cb3ca8a72 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -311,12 +311,12 @@ arg_enum! { } } -impl Into for TracingReceiver { - fn into(self) -> sc_transaction::TracingReceiver { +impl Into for TracingReceiver { + fn into(self) -> sc_tracing::TracingReceiver { match self { - TracingReceiver::Log => sc_transaction::TracingReceiver::Log, - TracingReceiver::Telemetry => sc_transaction::TracingReceiver::Telemetry, - TracingReceiver::Grafana => sc_transaction::TracingReceiver::Grafana, + TracingReceiver::Log => sc_tracing::TracingReceiver::Log, + TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry, + TracingReceiver::Grafana => sc_tracing::TracingReceiver::Grafana, } } } diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 1b30c2fcfff56..dafbffd39b54b 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -35,7 +35,7 @@ client-db = { package = "sc-client-db", path = "../db/", default-features = true env_logger = "0.7.0" test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } tokio = "0.1.22" -txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../../client/transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } [features] diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index 5bb947eb0c15d..b387a3099d3a6 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -36,4 +36,4 @@ rustc-hex = "2.0.1" sp-io = { path = "../../primitives/sr-io" } test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" } tokio = "0.1.22" -txpool = { package = "sc-transaction-pool", path = "../transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../transaction-pool" } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index cb499cccc13d6..ea69b14e42aac 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -45,7 +45,7 @@ txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../. client_db = { package = "sc-client-db", path = "../db" } codec = { package = "parity-scale-codec", version = "1.0.0" } sc-executor = { path = "../executor" } -txpool = { package = "sc-transaction-pool", path = "../transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../transaction-pool" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } rpc-servers = { package = "sc-rpc-server", path = "../rpc-servers" } rpc = { package = "sc-rpc", path = "../rpc" } @@ -53,7 +53,7 @@ tel = { package = "sc-telemetry", path = "../telemetry" } offchain = { package = "sc-offchain", path = "../offchain" } parity-multiaddr = { package = "parity-multiaddr", version = "0.5.0" } grafana-data-source = { path = "../grafana-data-source" } -sc-transaction = { package = "sc-transaction", path = "../tracing" } +sc-tracing = { package = "sc-tracing", path = "../tracing" } tracing = "0.1.10" [dev-dependencies] diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 36ce01275295e..48a1b374f51dd 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -1119,7 +1119,7 @@ ServiceBuilder< // Instrumentation if let Some(tracing_targets) = config.tracing_targets.as_ref() { - let subscriber = sc_transaction::ProfilingSubscriber::new( + let subscriber = sc_tracing::ProfilingSubscriber::new( config.tracing_receiver, tracing_targets ); match tracing::subscriber::set_global_default(subscriber) { diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 05d3f1ab45956..310d185b4dff7 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -103,7 +103,7 @@ pub struct Configuration { /// Tracing targets pub tracing_targets: Option, /// Tracing receiver - pub tracing_receiver: sc_transaction::TracingReceiver, + pub tracing_receiver: sc_tracing::TracingReceiver, } /// Configuration of the database of the client. diff --git a/client/tracing/Cargo.toml b/client/tracing/Cargo.toml index 9ebd3dddad472..b94059edcdc6a 100644 --- a/client/tracing/Cargo.toml +++ b/client/tracing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sc-transaction" +name = "sc-tracing" version = "2.0.0" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index 9ae87d50ed68c..ef84a21c8baf3 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sc-transaction-pool" +name = "sc-tracing-pool" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" @@ -13,7 +13,7 @@ parking_lot = "0.9.0" primitives = { package = "sp-core", path = "../../primitives/core" } sp-api = { path = "../../primitives/sr-api" } sp-runtime = { path = "../../primitives/sr-primitives" } -txpool = { package = "sc-transaction-graph", path = "./graph" } +txpool = { package = "sc-tracing-graph", path = "./graph" } txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" } txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../primitives/transaction-pool/runtime-api" } client-api = { package = "sc-client-api", path = "../api" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index 392a39ab6d459..870604d88cb90 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sc-transaction-graph" +name = "sc-tracing-graph" version = "2.0.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/client/transaction-pool/graph/benches/basics.rs b/client/transaction-pool/graph/benches/basics.rs index 884cffea74afa..b5dc63ed5bfee 100644 --- a/client/transaction-pool/graph/benches/basics.rs +++ b/client/transaction-pool/graph/benches/basics.rs @@ -17,7 +17,7 @@ use criterion::{criterion_group, criterion_main, Criterion}; use futures::executor::block_on; -use sc_transaction_graph::*; +use sc_tracing_graph::*; use sp_runtime::transaction_validity::{ValidTransaction, InvalidTransaction}; use codec::Encode; use test_runtime::{Block, Extrinsic, Transfer, H256, AccountId}; diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 8447eef7bcce1..3bf8055551b82 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -22,4 +22,4 @@ txpool-api = { package = "sp-transaction-pool-api", path = "../../../../primitiv [dev-dependencies] test-client = { package = "substrate-test-runtime-client", path = "../../../../test/utils/runtime/client" } env_logger = "0.7.0" -txpool = { package = "sc-transaction-pool", path = "../../../../client/transaction-pool" } +txpool = { package = "sc-tracing-pool", path = "../../../../client/transaction-pool" } From fb99cf91699db62b0ba6edfdc0c369e6ea53b1cd Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Mon, 2 Dec 2019 10:46:34 +0100 Subject: [PATCH 7/7] fix rename in script, too --- .maintain/rename-crates-for-2.0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maintain/rename-crates-for-2.0.sh b/.maintain/rename-crates-for-2.0.sh index 70f924023f9de..89bd2f9b33a5d 100644 --- a/.maintain/rename-crates-for-2.0.sh +++ b/.maintain/rename-crates-for-2.0.sh @@ -102,7 +102,7 @@ TO_RENAME=( "substrate-service-test sc-service-test" "substrate-state-db sc-state-db" "substrate-telemetry sc-telemetry" - "substrate-tracing sc-transaction" + "substrate-tracing sc-tracing" );