mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 15:17:57 +00:00
80616f6d03
[litep2p](https://github.com/altonen/litep2p) is a libp2p-compatible P2P networking library. It supports all of the features of `rust-libp2p` that are currently being utilized by Polkadot SDK. Compared to `rust-libp2p`, `litep2p` has a quite different architecture which is why the new `litep2p` network backend is only able to use a little of the existing code in `sc-network`. The design has been mainly influenced by how we'd wish to structure our networking-related code in Polkadot SDK: independent higher-levels protocols directly communicating with the network over links that support bidirectional backpressure. A good example would be `NotificationHandle`/`RequestResponseHandle` abstractions which allow, e.g., `SyncingEngine` to directly communicate with peers to announce/request blocks. I've tried running `polkadot --network-backend litep2p` with a few different peer configurations and there is a noticeable reduction in networking CPU usage. For high load (`--out-peers 200`), networking CPU usage goes down from ~110% to ~30% (80 pp) and for normal load (`--out-peers 40`), the usage goes down from ~55% to ~18% (37 pp). These should not be taken as final numbers because: a) there are still some low-hanging optimization fruits, such as enabling [receive window auto-tuning](https://github.com/libp2p/rust-yamux/pull/176), integrating `Peerset` more closely with `litep2p` or improving memory usage of the WebSocket transport b) fixing bugs/instabilities that incorrectly cause `litep2p` to do less work will increase the networking CPU usage c) verification in a more diverse set of tests/conditions is needed Nevertheless, these numbers should give an early estimate for CPU usage of the new networking backend. This PR consists of three separate changes: * introduce a generic `PeerId` (wrapper around `Multihash`) so that we don't have use `NetworkService::PeerId` in every part of the code that uses a `PeerId` * introduce `NetworkBackend` trait, implement it for the libp2p network stack and make Polkadot SDK generic over `NetworkBackend` * implement `NetworkBackend` for litep2p The new library should be considered experimental which is why `rust-libp2p` will remain as the default option for the time being. This PR currently depends on the master branch of `litep2p` but I'll cut a new release for the library once all review comments have been addresses. --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Dmitry Markin <dmitry@markin.tech> Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
639 lines
24 KiB
TOML
639 lines
24 KiB
TOML
[workspace.package]
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2021"
|
|
repository = "https://github.com/paritytech/polkadot-sdk.git"
|
|
license = "GPL-3.0-only"
|
|
homepage = "https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html"
|
|
|
|
[workspace]
|
|
resolver = "2"
|
|
|
|
members = [
|
|
"bridges/bin/runtime-common",
|
|
"bridges/chains/chain-asset-hub-rococo",
|
|
"bridges/chains/chain-asset-hub-westend",
|
|
"bridges/chains/chain-bridge-hub-cumulus",
|
|
"bridges/chains/chain-bridge-hub-kusama",
|
|
"bridges/chains/chain-bridge-hub-polkadot",
|
|
"bridges/chains/chain-bridge-hub-rococo",
|
|
"bridges/chains/chain-bridge-hub-westend",
|
|
"bridges/chains/chain-kusama",
|
|
"bridges/chains/chain-polkadot",
|
|
"bridges/chains/chain-polkadot-bulletin",
|
|
"bridges/chains/chain-rococo",
|
|
"bridges/chains/chain-westend",
|
|
"bridges/modules/grandpa",
|
|
"bridges/modules/messages",
|
|
"bridges/modules/parachains",
|
|
"bridges/modules/relayers",
|
|
"bridges/modules/xcm-bridge-hub",
|
|
"bridges/modules/xcm-bridge-hub-router",
|
|
"bridges/primitives/header-chain",
|
|
"bridges/primitives/messages",
|
|
"bridges/primitives/parachains",
|
|
"bridges/primitives/polkadot-core",
|
|
"bridges/primitives/relayers",
|
|
"bridges/primitives/runtime",
|
|
"bridges/primitives/test-utils",
|
|
"bridges/primitives/xcm-bridge-hub",
|
|
"bridges/primitives/xcm-bridge-hub-router",
|
|
"bridges/snowbridge/pallets/ethereum-client",
|
|
"bridges/snowbridge/pallets/ethereum-client/fixtures",
|
|
"bridges/snowbridge/pallets/inbound-queue",
|
|
"bridges/snowbridge/pallets/inbound-queue/fixtures",
|
|
"bridges/snowbridge/pallets/outbound-queue",
|
|
"bridges/snowbridge/pallets/outbound-queue/merkle-tree",
|
|
"bridges/snowbridge/pallets/outbound-queue/runtime-api",
|
|
"bridges/snowbridge/pallets/system",
|
|
"bridges/snowbridge/pallets/system/runtime-api",
|
|
"bridges/snowbridge/primitives/beacon",
|
|
"bridges/snowbridge/primitives/core",
|
|
"bridges/snowbridge/primitives/ethereum",
|
|
"bridges/snowbridge/primitives/router",
|
|
"bridges/snowbridge/runtime/runtime-common",
|
|
"bridges/snowbridge/runtime/test-common",
|
|
"cumulus/client/cli",
|
|
"cumulus/client/collator",
|
|
"cumulus/client/consensus/aura",
|
|
"cumulus/client/consensus/common",
|
|
"cumulus/client/consensus/proposer",
|
|
"cumulus/client/consensus/relay-chain",
|
|
"cumulus/client/network",
|
|
"cumulus/client/parachain-inherent",
|
|
"cumulus/client/pov-recovery",
|
|
"cumulus/client/relay-chain-inprocess-interface",
|
|
"cumulus/client/relay-chain-interface",
|
|
"cumulus/client/relay-chain-minimal-node",
|
|
"cumulus/client/relay-chain-rpc-interface",
|
|
"cumulus/client/service",
|
|
"cumulus/pallets/aura-ext",
|
|
"cumulus/pallets/collator-selection",
|
|
"cumulus/pallets/dmp-queue",
|
|
"cumulus/pallets/parachain-system",
|
|
"cumulus/pallets/parachain-system/proc-macro",
|
|
"cumulus/pallets/session-benchmarking",
|
|
"cumulus/pallets/solo-to-para",
|
|
"cumulus/pallets/xcm",
|
|
"cumulus/pallets/xcmp-queue",
|
|
"cumulus/parachains/common",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend",
|
|
"cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal",
|
|
"cumulus/parachains/integration-tests/emulated/chains/relays/rococo",
|
|
"cumulus/parachains/integration-tests/emulated/chains/relays/westend",
|
|
"cumulus/parachains/integration-tests/emulated/common",
|
|
"cumulus/parachains/integration-tests/emulated/networks/rococo-system",
|
|
"cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system",
|
|
"cumulus/parachains/integration-tests/emulated/networks/westend-system",
|
|
"cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend",
|
|
"cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend",
|
|
"cumulus/parachains/integration-tests/emulated/tests/people/people-rococo",
|
|
"cumulus/parachains/integration-tests/emulated/tests/people/people-westend",
|
|
"cumulus/parachains/pallets/collective-content",
|
|
"cumulus/parachains/pallets/parachain-info",
|
|
"cumulus/parachains/pallets/ping",
|
|
"cumulus/parachains/runtimes/assets/asset-hub-rococo",
|
|
"cumulus/parachains/runtimes/assets/asset-hub-westend",
|
|
"cumulus/parachains/runtimes/assets/common",
|
|
"cumulus/parachains/runtimes/assets/test-utils",
|
|
"cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo",
|
|
"cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend",
|
|
"cumulus/parachains/runtimes/bridge-hubs/common",
|
|
"cumulus/parachains/runtimes/bridge-hubs/test-utils",
|
|
"cumulus/parachains/runtimes/collectives/collectives-westend",
|
|
"cumulus/parachains/runtimes/constants",
|
|
"cumulus/parachains/runtimes/contracts/contracts-rococo",
|
|
"cumulus/parachains/runtimes/coretime/coretime-rococo",
|
|
"cumulus/parachains/runtimes/coretime/coretime-westend",
|
|
"cumulus/parachains/runtimes/glutton/glutton-westend",
|
|
"cumulus/parachains/runtimes/people/people-rococo",
|
|
"cumulus/parachains/runtimes/people/people-westend",
|
|
"cumulus/parachains/runtimes/starters/seedling",
|
|
"cumulus/parachains/runtimes/starters/shell",
|
|
"cumulus/parachains/runtimes/test-utils",
|
|
"cumulus/parachains/runtimes/testing/penpal",
|
|
"cumulus/parachains/runtimes/testing/rococo-parachain",
|
|
"cumulus/polkadot-parachain",
|
|
"cumulus/primitives/aura",
|
|
"cumulus/primitives/core",
|
|
"cumulus/primitives/parachain-inherent",
|
|
"cumulus/primitives/proof-size-hostfunction",
|
|
"cumulus/primitives/storage-weight-reclaim",
|
|
"cumulus/primitives/timestamp",
|
|
"cumulus/primitives/utility",
|
|
"cumulus/test/client",
|
|
"cumulus/test/relay-sproof-builder",
|
|
"cumulus/test/runtime",
|
|
"cumulus/test/service",
|
|
"cumulus/xcm/xcm-emulator",
|
|
"docs/sdk",
|
|
"polkadot",
|
|
"polkadot/cli",
|
|
"polkadot/core-primitives",
|
|
"polkadot/erasure-coding",
|
|
"polkadot/erasure-coding/fuzzer",
|
|
"polkadot/node/collation-generation",
|
|
"polkadot/node/core/approval-voting",
|
|
"polkadot/node/core/av-store",
|
|
"polkadot/node/core/backing",
|
|
"polkadot/node/core/bitfield-signing",
|
|
"polkadot/node/core/candidate-validation",
|
|
"polkadot/node/core/chain-api",
|
|
"polkadot/node/core/chain-selection",
|
|
"polkadot/node/core/dispute-coordinator",
|
|
"polkadot/node/core/parachains-inherent",
|
|
"polkadot/node/core/prospective-parachains",
|
|
"polkadot/node/core/provisioner",
|
|
"polkadot/node/core/pvf",
|
|
"polkadot/node/core/pvf-checker",
|
|
"polkadot/node/core/pvf/common",
|
|
"polkadot/node/core/pvf/execute-worker",
|
|
"polkadot/node/core/pvf/prepare-worker",
|
|
"polkadot/node/core/runtime-api",
|
|
"polkadot/node/gum",
|
|
"polkadot/node/gum/proc-macro",
|
|
"polkadot/node/jaeger",
|
|
"polkadot/node/malus",
|
|
"polkadot/node/metrics",
|
|
"polkadot/node/network/approval-distribution",
|
|
"polkadot/node/network/availability-distribution",
|
|
"polkadot/node/network/availability-recovery",
|
|
"polkadot/node/network/bitfield-distribution",
|
|
"polkadot/node/network/bridge",
|
|
"polkadot/node/network/collator-protocol",
|
|
"polkadot/node/network/dispute-distribution",
|
|
"polkadot/node/network/gossip-support",
|
|
"polkadot/node/network/protocol",
|
|
"polkadot/node/network/statement-distribution",
|
|
"polkadot/node/overseer",
|
|
"polkadot/node/primitives",
|
|
"polkadot/node/service",
|
|
"polkadot/node/subsystem",
|
|
"polkadot/node/subsystem-bench",
|
|
"polkadot/node/subsystem-test-helpers",
|
|
"polkadot/node/subsystem-types",
|
|
"polkadot/node/subsystem-util",
|
|
"polkadot/node/test/client",
|
|
"polkadot/node/test/service",
|
|
"polkadot/node/tracking-allocator",
|
|
"polkadot/node/zombienet-backchannel",
|
|
"polkadot/parachain",
|
|
"polkadot/parachain/test-parachains",
|
|
"polkadot/parachain/test-parachains/adder",
|
|
"polkadot/parachain/test-parachains/adder/collator",
|
|
"polkadot/parachain/test-parachains/halt",
|
|
"polkadot/parachain/test-parachains/undying",
|
|
"polkadot/parachain/test-parachains/undying/collator",
|
|
"polkadot/primitives",
|
|
"polkadot/primitives/test-helpers",
|
|
"polkadot/rpc",
|
|
"polkadot/runtime/common",
|
|
"polkadot/runtime/common/slot_range_helper",
|
|
"polkadot/runtime/metrics",
|
|
"polkadot/runtime/parachains",
|
|
"polkadot/runtime/rococo",
|
|
"polkadot/runtime/rococo/constants",
|
|
"polkadot/runtime/test-runtime",
|
|
"polkadot/runtime/test-runtime/constants",
|
|
"polkadot/runtime/westend",
|
|
"polkadot/runtime/westend/constants",
|
|
"polkadot/statement-table",
|
|
"polkadot/utils/generate-bags",
|
|
"polkadot/utils/remote-ext-tests/bags-list",
|
|
"polkadot/xcm",
|
|
"polkadot/xcm/pallet-xcm",
|
|
"polkadot/xcm/pallet-xcm-benchmarks",
|
|
"polkadot/xcm/procedural",
|
|
"polkadot/xcm/xcm-builder",
|
|
"polkadot/xcm/xcm-executor",
|
|
"polkadot/xcm/xcm-executor/integration-tests",
|
|
"polkadot/xcm/xcm-fee-payment-runtime-api",
|
|
"polkadot/xcm/xcm-simulator",
|
|
"polkadot/xcm/xcm-simulator/example",
|
|
"polkadot/xcm/xcm-simulator/fuzzer",
|
|
"substrate/bin/node/bench",
|
|
"substrate/bin/node/cli",
|
|
"substrate/bin/node/inspect",
|
|
"substrate/bin/node/primitives",
|
|
"substrate/bin/node/rpc",
|
|
"substrate/bin/node/runtime",
|
|
"substrate/bin/node/testing",
|
|
"substrate/bin/utils/chain-spec-builder",
|
|
"substrate/bin/utils/subkey",
|
|
"substrate/client/allocator",
|
|
"substrate/client/api",
|
|
"substrate/client/authority-discovery",
|
|
"substrate/client/basic-authorship",
|
|
"substrate/client/block-builder",
|
|
"substrate/client/chain-spec",
|
|
"substrate/client/chain-spec/derive",
|
|
"substrate/client/cli",
|
|
"substrate/client/consensus/aura",
|
|
"substrate/client/consensus/babe",
|
|
"substrate/client/consensus/babe/rpc",
|
|
"substrate/client/consensus/beefy",
|
|
"substrate/client/consensus/beefy/rpc",
|
|
"substrate/client/consensus/common",
|
|
"substrate/client/consensus/epochs",
|
|
"substrate/client/consensus/grandpa",
|
|
"substrate/client/consensus/grandpa/rpc",
|
|
"substrate/client/consensus/manual-seal",
|
|
"substrate/client/consensus/pow",
|
|
"substrate/client/consensus/slots",
|
|
"substrate/client/db",
|
|
"substrate/client/executor",
|
|
"substrate/client/executor/common",
|
|
"substrate/client/executor/polkavm",
|
|
"substrate/client/executor/runtime-test",
|
|
"substrate/client/executor/wasmtime",
|
|
"substrate/client/informant",
|
|
"substrate/client/keystore",
|
|
"substrate/client/merkle-mountain-range",
|
|
"substrate/client/merkle-mountain-range/rpc",
|
|
"substrate/client/mixnet",
|
|
"substrate/client/network",
|
|
"substrate/client/network-gossip",
|
|
"substrate/client/network/common",
|
|
"substrate/client/network/light",
|
|
"substrate/client/network/statement",
|
|
"substrate/client/network/sync",
|
|
"substrate/client/network/test",
|
|
"substrate/client/network/transactions",
|
|
"substrate/client/network/types",
|
|
"substrate/client/offchain",
|
|
"substrate/client/proposer-metrics",
|
|
"substrate/client/rpc",
|
|
"substrate/client/rpc-api",
|
|
"substrate/client/rpc-servers",
|
|
"substrate/client/rpc-spec-v2",
|
|
"substrate/client/service",
|
|
"substrate/client/service/test",
|
|
"substrate/client/state-db",
|
|
"substrate/client/statement-store",
|
|
"substrate/client/storage-monitor",
|
|
"substrate/client/sync-state-rpc",
|
|
"substrate/client/sysinfo",
|
|
"substrate/client/telemetry",
|
|
"substrate/client/tracing",
|
|
"substrate/client/tracing/proc-macro",
|
|
"substrate/client/transaction-pool",
|
|
"substrate/client/transaction-pool/api",
|
|
"substrate/client/utils",
|
|
"substrate/deprecated/hashing",
|
|
"substrate/deprecated/hashing/proc-macro",
|
|
"substrate/frame",
|
|
"substrate/frame/alliance",
|
|
"substrate/frame/asset-conversion",
|
|
"substrate/frame/asset-rate",
|
|
"substrate/frame/assets",
|
|
"substrate/frame/atomic-swap",
|
|
"substrate/frame/aura",
|
|
"substrate/frame/authority-discovery",
|
|
"substrate/frame/authorship",
|
|
"substrate/frame/babe",
|
|
"substrate/frame/bags-list",
|
|
"substrate/frame/bags-list/fuzzer",
|
|
"substrate/frame/bags-list/remote-tests",
|
|
"substrate/frame/balances",
|
|
"substrate/frame/beefy",
|
|
"substrate/frame/beefy-mmr",
|
|
"substrate/frame/benchmarking",
|
|
"substrate/frame/benchmarking/pov",
|
|
"substrate/frame/bounties",
|
|
"substrate/frame/broker",
|
|
"substrate/frame/child-bounties",
|
|
"substrate/frame/collective",
|
|
"substrate/frame/contracts",
|
|
"substrate/frame/contracts/fixtures",
|
|
"substrate/frame/contracts/mock-network",
|
|
"substrate/frame/contracts/proc-macro",
|
|
"substrate/frame/contracts/uapi",
|
|
"substrate/frame/conviction-voting",
|
|
"substrate/frame/core-fellowship",
|
|
"substrate/frame/democracy",
|
|
"substrate/frame/election-provider-multi-phase",
|
|
"substrate/frame/election-provider-multi-phase/test-staking-e2e",
|
|
"substrate/frame/election-provider-support",
|
|
"substrate/frame/election-provider-support/benchmarking",
|
|
"substrate/frame/election-provider-support/solution-type",
|
|
"substrate/frame/election-provider-support/solution-type/fuzzer",
|
|
"substrate/frame/elections-phragmen",
|
|
"substrate/frame/examples",
|
|
"substrate/frame/examples/basic",
|
|
"substrate/frame/examples/default-config",
|
|
"substrate/frame/examples/dev-mode",
|
|
"substrate/frame/examples/frame-crate",
|
|
"substrate/frame/examples/kitchensink",
|
|
"substrate/frame/examples/multi-block-migrations",
|
|
"substrate/frame/examples/offchain-worker",
|
|
"substrate/frame/examples/single-block-migrations",
|
|
"substrate/frame/examples/split",
|
|
"substrate/frame/examples/tasks",
|
|
"substrate/frame/executive",
|
|
"substrate/frame/fast-unstake",
|
|
"substrate/frame/glutton",
|
|
"substrate/frame/grandpa",
|
|
"substrate/frame/identity",
|
|
"substrate/frame/im-online",
|
|
"substrate/frame/indices",
|
|
"substrate/frame/insecure-randomness-collective-flip",
|
|
"substrate/frame/lottery",
|
|
"substrate/frame/membership",
|
|
"substrate/frame/merkle-mountain-range",
|
|
"substrate/frame/message-queue",
|
|
"substrate/frame/migrations",
|
|
"substrate/frame/mixnet",
|
|
"substrate/frame/multisig",
|
|
"substrate/frame/nft-fractionalization",
|
|
"substrate/frame/nfts",
|
|
"substrate/frame/nfts/runtime-api",
|
|
"substrate/frame/nis",
|
|
"substrate/frame/node-authorization",
|
|
"substrate/frame/nomination-pools",
|
|
"substrate/frame/nomination-pools/benchmarking",
|
|
"substrate/frame/nomination-pools/fuzzer",
|
|
"substrate/frame/nomination-pools/runtime-api",
|
|
"substrate/frame/nomination-pools/test-staking",
|
|
"substrate/frame/offences",
|
|
"substrate/frame/offences/benchmarking",
|
|
"substrate/frame/paged-list",
|
|
"substrate/frame/paged-list/fuzzer",
|
|
"substrate/frame/parameters",
|
|
"substrate/frame/preimage",
|
|
"substrate/frame/proxy",
|
|
"substrate/frame/ranked-collective",
|
|
"substrate/frame/recovery",
|
|
"substrate/frame/referenda",
|
|
"substrate/frame/remark",
|
|
"substrate/frame/root-offences",
|
|
"substrate/frame/root-testing",
|
|
"substrate/frame/safe-mode",
|
|
"substrate/frame/salary",
|
|
"substrate/frame/sassafras",
|
|
"substrate/frame/scheduler",
|
|
"substrate/frame/scored-pool",
|
|
"substrate/frame/session",
|
|
"substrate/frame/session/benchmarking",
|
|
"substrate/frame/society",
|
|
"substrate/frame/staking",
|
|
"substrate/frame/staking/reward-curve",
|
|
"substrate/frame/staking/reward-fn",
|
|
"substrate/frame/staking/runtime-api",
|
|
"substrate/frame/state-trie-migration",
|
|
"substrate/frame/statement",
|
|
"substrate/frame/sudo",
|
|
"substrate/frame/support",
|
|
"substrate/frame/support/procedural",
|
|
"substrate/frame/support/procedural/tools",
|
|
"substrate/frame/support/procedural/tools/derive",
|
|
"substrate/frame/support/test",
|
|
"substrate/frame/support/test/compile_pass",
|
|
"substrate/frame/support/test/pallet",
|
|
"substrate/frame/support/test/stg_frame_crate",
|
|
"substrate/frame/system",
|
|
"substrate/frame/system/benchmarking",
|
|
"substrate/frame/system/rpc/runtime-api",
|
|
"substrate/frame/timestamp",
|
|
"substrate/frame/tips",
|
|
"substrate/frame/transaction-payment",
|
|
"substrate/frame/transaction-payment/asset-conversion-tx-payment",
|
|
"substrate/frame/transaction-payment/asset-tx-payment",
|
|
"substrate/frame/transaction-payment/rpc",
|
|
"substrate/frame/transaction-payment/rpc/runtime-api",
|
|
"substrate/frame/transaction-payment/skip-feeless-payment",
|
|
"substrate/frame/transaction-storage",
|
|
"substrate/frame/treasury",
|
|
"substrate/frame/try-runtime",
|
|
"substrate/frame/tx-pause",
|
|
"substrate/frame/uniques",
|
|
"substrate/frame/utility",
|
|
"substrate/frame/vesting",
|
|
"substrate/frame/whitelist",
|
|
"substrate/primitives/api",
|
|
"substrate/primitives/api/proc-macro",
|
|
"substrate/primitives/api/test",
|
|
"substrate/primitives/application-crypto",
|
|
"substrate/primitives/application-crypto/test",
|
|
"substrate/primitives/arithmetic",
|
|
"substrate/primitives/arithmetic/fuzzer",
|
|
"substrate/primitives/authority-discovery",
|
|
"substrate/primitives/block-builder",
|
|
"substrate/primitives/blockchain",
|
|
"substrate/primitives/consensus/aura",
|
|
"substrate/primitives/consensus/babe",
|
|
"substrate/primitives/consensus/beefy",
|
|
"substrate/primitives/consensus/common",
|
|
"substrate/primitives/consensus/grandpa",
|
|
"substrate/primitives/consensus/pow",
|
|
"substrate/primitives/consensus/sassafras",
|
|
"substrate/primitives/consensus/slots",
|
|
"substrate/primitives/core",
|
|
"substrate/primitives/core/fuzz",
|
|
"substrate/primitives/crypto/ec-utils",
|
|
"substrate/primitives/crypto/hashing",
|
|
"substrate/primitives/crypto/hashing/proc-macro",
|
|
"substrate/primitives/database",
|
|
"substrate/primitives/debug-derive",
|
|
"substrate/primitives/externalities",
|
|
"substrate/primitives/genesis-builder",
|
|
"substrate/primitives/inherents",
|
|
"substrate/primitives/io",
|
|
"substrate/primitives/keyring",
|
|
"substrate/primitives/keystore",
|
|
"substrate/primitives/maybe-compressed-blob",
|
|
"substrate/primitives/merkle-mountain-range",
|
|
"substrate/primitives/metadata-ir",
|
|
"substrate/primitives/mixnet",
|
|
"substrate/primitives/npos-elections",
|
|
"substrate/primitives/npos-elections/fuzzer",
|
|
"substrate/primitives/offchain",
|
|
"substrate/primitives/panic-handler",
|
|
"substrate/primitives/rpc",
|
|
"substrate/primitives/runtime",
|
|
"substrate/primitives/runtime-interface",
|
|
"substrate/primitives/runtime-interface/proc-macro",
|
|
"substrate/primitives/runtime-interface/test",
|
|
"substrate/primitives/runtime-interface/test-wasm",
|
|
"substrate/primitives/runtime-interface/test-wasm-deprecated",
|
|
"substrate/primitives/session",
|
|
"substrate/primitives/staking",
|
|
"substrate/primitives/state-machine",
|
|
"substrate/primitives/statement-store",
|
|
"substrate/primitives/std",
|
|
"substrate/primitives/storage",
|
|
"substrate/primitives/test-primitives",
|
|
"substrate/primitives/timestamp",
|
|
"substrate/primitives/tracing",
|
|
"substrate/primitives/transaction-pool",
|
|
"substrate/primitives/transaction-storage-proof",
|
|
"substrate/primitives/trie",
|
|
"substrate/primitives/version",
|
|
"substrate/primitives/version/proc-macro",
|
|
"substrate/primitives/wasm-interface",
|
|
"substrate/primitives/weights",
|
|
"substrate/scripts/ci/node-template-release",
|
|
"substrate/test-utils",
|
|
"substrate/test-utils/cli",
|
|
"substrate/test-utils/client",
|
|
"substrate/test-utils/runtime",
|
|
"substrate/test-utils/runtime/client",
|
|
"substrate/test-utils/runtime/transaction-pool",
|
|
"substrate/utils/binary-merkle-tree",
|
|
"substrate/utils/build-script-utils",
|
|
"substrate/utils/fork-tree",
|
|
"substrate/utils/frame/benchmarking-cli",
|
|
"substrate/utils/frame/frame-utilities-cli",
|
|
"substrate/utils/frame/generate-bags",
|
|
"substrate/utils/frame/generate-bags/node-runtime",
|
|
"substrate/utils/frame/omni-bencher",
|
|
"substrate/utils/frame/remote-externalities",
|
|
"substrate/utils/frame/rpc/client",
|
|
"substrate/utils/frame/rpc/state-trie-migration-rpc",
|
|
"substrate/utils/frame/rpc/support",
|
|
"substrate/utils/frame/rpc/system",
|
|
"substrate/utils/frame/try-runtime/cli",
|
|
"substrate/utils/prometheus",
|
|
"substrate/utils/substrate-bip39",
|
|
"substrate/utils/wasm-builder",
|
|
|
|
"templates/minimal/node",
|
|
"templates/minimal/pallets/template",
|
|
"templates/minimal/runtime",
|
|
|
|
"templates/solochain/node",
|
|
"templates/solochain/pallets/template",
|
|
"templates/solochain/runtime",
|
|
|
|
"templates/parachain/node",
|
|
"templates/parachain/pallets/template",
|
|
"templates/parachain/runtime",
|
|
]
|
|
default-members = ["polkadot", "substrate/bin/node/cli"]
|
|
|
|
[workspace.lints.rust]
|
|
suspicious_double_ref_op = { level = "allow", priority = 2 }
|
|
|
|
[workspace.lints.clippy]
|
|
all = { level = "allow", priority = 0 }
|
|
correctness = { level = "warn", priority = 1 }
|
|
complexity = { level = "warn", priority = 1 }
|
|
if-same-then-else = { level = "allow", priority = 2 }
|
|
zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000
|
|
type_complexity = { level = "allow", priority = 2 } # raison d'etre
|
|
nonminimal-bool = { level = "allow", priority = 2 } # maybe
|
|
borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one
|
|
too-many-arguments = { level = "allow", priority = 2 } # (Turning this on would lead to)
|
|
needless-lifetimes = { level = "allow", priority = 2 } # generated code
|
|
unnecessary_cast = { level = "allow", priority = 2 } # Types may change
|
|
identity-op = { level = "allow", priority = 2 } # One case where we do 0 +
|
|
useless_conversion = { level = "allow", priority = 2 } # Types may change
|
|
unit_arg = { level = "allow", priority = 2 } # stylistic
|
|
option-map-unit-fn = { level = "allow", priority = 2 } # stylistic
|
|
bind_instead_of_map = { level = "allow", priority = 2 } # stylistic
|
|
erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS
|
|
eq_op = { level = "allow", priority = 2 } # In tests we test equality.
|
|
while_immutable_condition = { level = "allow", priority = 2 } # false positives
|
|
needless_option_as_deref = { level = "allow", priority = 2 } # false positives
|
|
derivable_impls = { level = "allow", priority = 2 } # false positives
|
|
stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort
|
|
extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic
|
|
default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic
|
|
|
|
[workspace.dependencies]
|
|
polkavm = "0.9.3"
|
|
polkavm-linker = "0.9.2"
|
|
polkavm-derive = "0.9.1"
|
|
log = { version = "0.4.21", default-features = false }
|
|
quote = { version = "1.0.33" }
|
|
serde = { version = "1.0.197", default-features = false }
|
|
serde-big-array = { version = "0.3.2" }
|
|
serde_derive = { version = "1.0.117" }
|
|
serde_json = { version = "1.0.114", default-features = false }
|
|
serde_yaml = { version = "0.9" }
|
|
syn = { version = "2.0.53" }
|
|
thiserror = { version = "1.0.48" }
|
|
tracing-subscriber = { version = "0.3.18" }
|
|
|
|
[profile.release]
|
|
# Polkadot runtime requires unwinding.
|
|
panic = "unwind"
|
|
opt-level = 3
|
|
|
|
# make sure dev builds with backtrace do not slow us down
|
|
[profile.dev.package.backtrace]
|
|
inherits = "release"
|
|
|
|
[profile.production]
|
|
inherits = "release"
|
|
lto = true
|
|
codegen-units = 1
|
|
|
|
[profile.testnet]
|
|
inherits = "release"
|
|
debug = 1 # debug symbols are useful for profilers
|
|
debug-assertions = true
|
|
overflow-checks = true
|
|
|
|
# The list of dependencies below (which can be both direct and indirect dependencies) are crates
|
|
# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of
|
|
# their debug info might be missing) or to require to be frequently recompiled. We compile these
|
|
# dependencies with `opt-level=3` even in "dev" mode in order to make "dev" mode more usable.
|
|
# The majority of these crates are cryptographic libraries.
|
|
#
|
|
# If you see an error mentioning "profile package spec ... did not match any packages", it
|
|
# probably concerns this list.
|
|
#
|
|
# This list is ordered alphabetically.
|
|
[profile.dev.package]
|
|
blake2 = { opt-level = 3 }
|
|
blake2b_simd = { opt-level = 3 }
|
|
chacha20poly1305 = { opt-level = 3 }
|
|
cranelift-codegen = { opt-level = 3 }
|
|
cranelift-wasm = { opt-level = 3 }
|
|
crc32fast = { opt-level = 3 }
|
|
crossbeam-deque = { opt-level = 3 }
|
|
crypto-mac = { opt-level = 3 }
|
|
curve25519-dalek = { opt-level = 3 }
|
|
ed25519-dalek = { opt-level = 3 }
|
|
flate2 = { opt-level = 3 }
|
|
futures-channel = { opt-level = 3 }
|
|
hash-db = { opt-level = 3 }
|
|
hashbrown = { opt-level = 3 }
|
|
hmac = { opt-level = 3 }
|
|
httparse = { opt-level = 3 }
|
|
integer-sqrt = { opt-level = 3 }
|
|
keccak = { opt-level = 3 }
|
|
libm = { opt-level = 3 }
|
|
librocksdb-sys = { opt-level = 3 }
|
|
libsecp256k1 = { opt-level = 3 }
|
|
libz-sys = { opt-level = 3 }
|
|
mio = { opt-level = 3 }
|
|
nalgebra = { opt-level = 3 }
|
|
num-bigint = { opt-level = 3 }
|
|
parking_lot = { opt-level = 3 }
|
|
parking_lot_core = { opt-level = 3 }
|
|
percent-encoding = { opt-level = 3 }
|
|
polkavm-linker = { opt-level = 3 }
|
|
primitive-types = { opt-level = 3 }
|
|
reed-solomon-novelpoly = { opt-level = 3 }
|
|
ring = { opt-level = 3 }
|
|
rustls = { opt-level = 3 }
|
|
sha2 = { opt-level = 3 }
|
|
sha3 = { opt-level = 3 }
|
|
smallvec = { opt-level = 3 }
|
|
snow = { opt-level = 3 }
|
|
substrate-bip39 = { opt-level = 3 }
|
|
twox-hash = { opt-level = 3 }
|
|
uint = { opt-level = 3 }
|
|
wasmi = { opt-level = 3 }
|
|
x25519-dalek = { opt-level = 3 }
|
|
yamux = { opt-level = 3 }
|
|
zeroize = { opt-level = 3 }
|