diff --git a/Cargo.lock b/Cargo.lock index d6a5bd358a..39938adf83 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2315,7 +2315,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", ] @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -2352,7 +2352,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "Inflector", "chrono", @@ -2375,7 +2375,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -2403,7 +2403,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "serde", @@ -2414,7 +2414,7 @@ dependencies = [ [[package]] name = "frame-support" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "bitflags", "frame-metadata", @@ -2441,7 +2441,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2453,7 +2453,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2465,7 +2465,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro2 1.0.27", "quote 1.0.9", @@ -2475,7 +2475,7 @@ dependencies = [ [[package]] name = "frame-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -2506,7 +2506,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-api", @@ -2515,7 +2515,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "parity-scale-codec", @@ -4516,7 +4516,7 @@ dependencies = [ [[package]] name = "max-encoded-len" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-trait-for-tuples", "max-encoded-len-derive", @@ -4527,7 +4527,7 @@ dependencies = [ [[package]] name = "max-encoded-len-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.27", @@ -5150,7 +5150,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5166,7 +5166,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5181,7 +5181,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5195,7 +5195,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5218,7 +5218,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5248,7 +5248,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5282,7 +5282,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5356,7 +5356,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5371,7 +5371,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5390,7 +5390,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5420,7 +5420,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "3.1.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5442,7 +5442,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5457,7 +5457,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5476,7 +5476,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5504,7 +5504,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5519,7 +5519,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5536,7 +5536,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5552,7 +5552,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5570,7 +5570,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5584,7 +5584,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5597,7 +5597,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5613,7 +5613,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5655,7 +5655,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5670,7 +5670,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5703,7 +5703,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5727,7 +5727,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.27", @@ -5738,7 +5738,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5751,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5769,7 +5769,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5783,7 +5783,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-support", "frame-system", @@ -5799,7 +5799,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5816,7 +5816,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5844,7 +5844,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5874,7 +5874,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-benchmarking", "frame-support", @@ -5889,7 +5889,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8168,7 +8168,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "env_logger 0.8.4", "hex", @@ -8472,7 +8472,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "log", "sp-core", @@ -8484,7 +8484,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -8513,7 +8513,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -8536,7 +8536,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8552,7 +8552,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8572,7 +8572,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.27", @@ -8583,7 +8583,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "chrono", "fdlimit", @@ -8621,7 +8621,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "fnv", @@ -8655,7 +8655,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "blake2-rfc", "hash-db", @@ -8685,7 +8685,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "parking_lot 0.11.1", @@ -8698,7 +8698,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -8729,7 +8729,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -8775,7 +8775,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "futures 0.3.15", @@ -8799,7 +8799,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8812,7 +8812,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "futures 0.3.15", @@ -8840,7 +8840,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "sc-client-api", "sp-authorship", @@ -8851,7 +8851,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "lazy_static", @@ -8880,7 +8880,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "parity-scale-codec", @@ -8897,7 +8897,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "log", "parity-scale-codec", @@ -8912,7 +8912,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8931,7 +8931,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -8972,7 +8972,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "finality-grandpa", @@ -8996,7 +8996,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-warp-sync" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "futures 0.3.15", @@ -9017,7 +9017,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "ansi_term 0.12.1", "futures 0.3.15", @@ -9035,7 +9035,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -9055,7 +9055,7 @@ dependencies = [ [[package]] name = "sc-light" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "hash-db", "lazy_static", @@ -9074,7 +9074,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-std", "async-trait", @@ -9127,7 +9127,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "futures-timer 3.0.2", @@ -9144,7 +9144,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "bytes 0.5.6", "fnv", @@ -9172,7 +9172,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "libp2p", @@ -9185,7 +9185,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9194,7 +9194,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "hash-db", @@ -9229,7 +9229,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "futures 0.3.15", @@ -9254,7 +9254,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.1.31", "jsonrpc-core", @@ -9272,7 +9272,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "directories", @@ -9338,7 +9338,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "log", "parity-scale-codec", @@ -9353,7 +9353,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9373,7 +9373,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "chrono", "futures 0.3.15", @@ -9393,7 +9393,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "ansi_term 0.12.1", "atty", @@ -9430,7 +9430,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.27", @@ -9441,7 +9441,7 @@ dependencies = [ [[package]] name = "sc-transaction-graph" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "futures 0.3.15", @@ -9463,7 +9463,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "intervalier", @@ -9934,7 +9934,7 @@ dependencies = [ [[package]] name = "sp-api" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "hash-db", "log", @@ -9951,7 +9951,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9963,7 +9963,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "max-encoded-len", "parity-scale-codec", @@ -9976,7 +9976,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "integer-sqrt", "num-traits", @@ -9990,7 +9990,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-api", @@ -10002,7 +10002,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "parity-scale-codec", @@ -10014,7 +10014,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-api", @@ -10026,7 +10026,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "log", @@ -10044,7 +10044,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "futures 0.3.15", @@ -10071,7 +10071,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "parity-scale-codec", @@ -10088,7 +10088,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "merlin", @@ -10110,7 +10110,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -10120,7 +10120,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10132,7 +10132,7 @@ dependencies = [ [[package]] name = "sp-core" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "base58", "blake2-rfc", @@ -10177,7 +10177,7 @@ dependencies = [ [[package]] name = "sp-database" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -10186,7 +10186,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro2 1.0.27", "quote 1.0.9", @@ -10196,7 +10196,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "environmental", "parity-scale-codec", @@ -10207,7 +10207,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "finality-grandpa", "log", @@ -10224,7 +10224,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10238,7 +10238,7 @@ dependencies = [ [[package]] name = "sp-io" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "hash-db", @@ -10263,7 +10263,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "lazy_static", "sp-core", @@ -10274,7 +10274,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "derive_more 0.99.16", @@ -10291,7 +10291,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "ruzstd", "zstd", @@ -10300,7 +10300,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "serde", @@ -10313,7 +10313,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2 1.0.27", @@ -10324,7 +10324,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "sp-api", "sp-core", @@ -10334,7 +10334,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "backtrace", ] @@ -10342,7 +10342,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "rustc-hash", "serde", @@ -10353,7 +10353,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "either", "hash256-std-hasher", @@ -10375,7 +10375,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10392,7 +10392,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -10417,7 +10417,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "serde", "serde_json", @@ -10426,7 +10426,7 @@ dependencies = [ [[package]] name = "sp-session" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-api", @@ -10439,7 +10439,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -10449,7 +10449,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "hash-db", "log", @@ -10472,12 +10472,12 @@ dependencies = [ [[package]] name = "sp-std" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" [[package]] name = "sp-storage" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10490,7 +10490,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "log", "sp-core", @@ -10503,7 +10503,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -10520,7 +10520,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "erased-serde", "log", @@ -10538,7 +10538,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "derive_more 0.99.16", "futures 0.3.15", @@ -10554,7 +10554,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "log", @@ -10569,7 +10569,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "hash-db", "memory-db", @@ -10583,7 +10583,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "futures 0.3.15", "futures-core", @@ -10595,7 +10595,7 @@ dependencies = [ [[package]] name = "sp-version" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10608,7 +10608,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.0.0", @@ -10620,7 +10620,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10829,7 +10829,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "platforms", ] @@ -10837,7 +10837,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.15", @@ -10860,7 +10860,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-std", "derive_more 0.99.16", @@ -10874,7 +10874,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "async-trait", "futures 0.1.31", @@ -10965,7 +10965,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "ansi_term 0.12.1", "atty", @@ -11672,7 +11672,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.8#74101dc21cfffb4c2d014fcc28edc166d5ca1b16" dependencies = [ "frame-try-runtime", "log", diff --git a/pallets/delegation/Cargo.toml b/pallets/delegation/Cargo.toml index 4b2e647ac7..7dc720f8fc 100644 --- a/pallets/delegation/Cargo.toml +++ b/pallets/delegation/Cargo.toml @@ -23,7 +23,7 @@ sp-keystore = {branch = "polkadot-v0.9.8", default-features = false, git = "http [dependencies] # Internal dependencies ctype = {default-features = false, path = "../ctype", version = "0.24.0"} -kilt-primitives = {default-features = false, optional = true, path = "../../primitives"} +kilt-primitives = {default-features = false, path = "../../primitives"} #External dependencies bitflags = {default-features = false, version = "1.2.1"} @@ -42,7 +42,6 @@ sp-std = {branch = "polkadot-v0.9.8", default-features = false, git = "https://g [features] default = ["std"] mock = [ - "kilt-primitives", "serde", "sp-core", "sp-io", @@ -68,5 +67,6 @@ std = [ "sp-std/std", ] try-runtime = [ - "frame-support/try-runtime" + "frame-support/try-runtime", + "kilt-primitives/try-runtime", ] diff --git a/pallets/delegation/src/migrations.rs b/pallets/delegation/src/migrations.rs index b4a6b447e9..7367ac704b 100644 --- a/pallets/delegation/src/migrations.rs +++ b/pallets/delegation/src/migrations.rs @@ -17,25 +17,13 @@ // If you feel like getting in touch with us, you can do so at info@botlabs.org use codec::{Decode, Encode}; +use kilt_primitives::VersionMigratorTrait; use sp_std::marker::PhantomData; use crate::*; mod v1; -/// A trait that allows version migrators to access the underlying pallet's -/// context, e.g., its Config trait. -/// -/// In this way, the migrator can access the pallet's storage and the pallet's -/// types directly. -pub trait VersionMigratorTrait { - #[cfg(feature = "try-runtime")] - fn pre_migrate(&self) -> Result<(), &str>; - fn migrate(&self) -> Weight; - #[cfg(feature = "try-runtime")] - fn post_migrate(&self) -> Result<(), &str>; -} - /// Storage version of the delegation pallet. #[derive(Copy, Clone, Encode, Eq, Decode, Ord, PartialEq, PartialOrd)] pub enum DelegationStorageVersion { @@ -74,7 +62,7 @@ impl VersionMigratorTrait for DelegationStorageVersion { } } - // It runs the righ migration logic depending on the current storage version. + // It runs the right migration logic depending on the current storage version. fn migrate(&self) -> Weight { match *self { Self::V1 => v1::migrate::(), diff --git a/pallets/did/Cargo.toml b/pallets/did/Cargo.toml index abd2d87e0d..0cfe889217 100644 --- a/pallets/did/Cargo.toml +++ b/pallets/did/Cargo.toml @@ -62,5 +62,6 @@ std = [ "sp-std/std", ] try-runtime = [ - "frame-support/try-runtime" + "frame-support/try-runtime", + "kilt-primitives/try-runtime", ] diff --git a/pallets/did/src/benchmarking.rs b/pallets/did/src/benchmarking.rs index c9d32f99d3..b5e8c1b79d 100644 --- a/pallets/did/src/benchmarking.rs +++ b/pallets/did/src/benchmarking.rs @@ -19,11 +19,11 @@ use codec::Encode; use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite}; use frame_system::RawOrigin; -use kilt_primitives::AccountId; +use kilt_primitives::{AccountId, Hash}; use sp_core::{crypto::KeyTypeId, ecdsa, ed25519, sr25519}; use sp_io::crypto::{ecdsa_generate, ecdsa_sign, ed25519_generate, ed25519_sign, sr25519_generate, sr25519_sign}; use sp_runtime::{traits::IdentifyAccount, MultiSigner, SaturatedConversion}; -use sp_std::{collections::btree_set::BTreeSet, convert::TryInto}; +use sp_std::{collections::btree_set::BTreeSet, convert::TryInto, vec}; use crate::*; use did_details::*; @@ -101,13 +101,20 @@ fn get_ecdsa_public_delegation_key() -> ecdsa::Public { } // Assumes that the length of the URL is larger than 8 (length of the prefix https://) -fn get_url_endpoint(length: u32) -> Url { +fn get_service_endpoints(count: u32, length: u32) -> ServiceEndpoints { let total_length = usize::try_from(length).expect("Failed to convert URL max length value to usize value."); + let total_count = usize::try_from(count).expect("Failed to convert max number of URLs value to usize value."); let mut url_encoded_string = DEFAULT_URL_SCHEME.to_vec(); url_encoded_string.resize(total_length, b'0'); - Url::Http( + let url = Url::Http( HttpUrl::try_from(url_encoded_string.as_ref()).expect("Failed to create default URL with provided length."), - ) + ); + + ServiceEndpoints { + content_hash: Hash::default(), + urls: vec![url; total_count], + content_type: ContentType::ApplicationJson, + } } fn get_did_base_details(auth_key: DidVerificationKey) -> DidDetails { @@ -120,7 +127,7 @@ fn generate_base_did_creation_details(did: DidIdentifierOf) -> Did new_key_agreement_keys: BTreeSet::new(), new_attestation_key: None, new_delegation_key: None, - new_endpoint_url: None, + new_service_endpoints: None, } } @@ -128,9 +135,9 @@ fn generate_base_did_update_details(_did: DidIdentifierOf) -> DidU DidUpdateDetails { new_authentication_key: None, new_key_agreement_keys: BTreeSet::new(), - attestation_key_update: DidVerificationKeyUpdateAction::default(), - delegation_key_update: DidVerificationKeyUpdateAction::default(), - new_endpoint_url: None, + attestation_key_update: DidFragmentUpdateAction::default(), + delegation_key_update: DidFragmentUpdateAction::default(), + service_endpoints_update: DidFragmentUpdateAction::default(), public_keys_to_remove: BTreeSet::new(), } } @@ -158,6 +165,7 @@ benchmarks! { create_ed25519_keys { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let submitter: AccountIdentifierOf = account(DEFAULT_ACCOUNT_ID, 0, DEFAULT_ACCOUNT_SEED); @@ -166,13 +174,13 @@ benchmarks! { let did_key_agreement_keys = get_key_agreement_keys(n); let did_public_att_key = get_ed25519_public_attestation_key(); let did_public_del_key = get_ed25519_public_delegation_key(); - let did_endpoint = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_creation_details = generate_base_did_creation_details::(did_subject.clone()); did_creation_details.new_key_agreement_keys = did_key_agreement_keys; did_creation_details.new_attestation_key = Some(DidVerificationKey::from(did_public_att_key)); did_creation_details.new_delegation_key = Some(DidVerificationKey::from(did_public_del_key)); - did_creation_details.new_endpoint_url = Some(did_endpoint); + did_creation_details.new_service_endpoints = Some(service_endpoints); let did_creation_signature = ed25519_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_creation_details.encode().as_ref()).expect("Failed to create DID signature from raw ed25519 signature."); }: create(RawOrigin::Signed(submitter), did_creation_details.clone(), DidSignature::from(did_creation_signature)) @@ -200,13 +208,14 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_creation_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, did_creation_details.new_service_endpoints); assert_eq!(stored_did.last_tx_counter, 0u64); } create_sr25519_keys { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let submitter: AccountIdentifierOf = account(DEFAULT_ACCOUNT_ID, 0, DEFAULT_ACCOUNT_SEED); @@ -215,13 +224,13 @@ benchmarks! { let did_key_agreement_keys = get_key_agreement_keys(n); let did_public_att_key = get_sr25519_public_attestation_key(); let did_public_del_key = get_sr25519_public_delegation_key(); - let did_endpoint = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_creation_details = generate_base_did_creation_details::(did_subject.clone()); did_creation_details.new_key_agreement_keys = did_key_agreement_keys; did_creation_details.new_attestation_key = Some(DidVerificationKey::from(did_public_att_key)); did_creation_details.new_delegation_key = Some(DidVerificationKey::from(did_public_del_key)); - did_creation_details.new_endpoint_url = Some(did_endpoint); + did_creation_details.new_service_endpoints = Some(service_endpoints); let did_creation_signature = sr25519_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_creation_details.encode().as_ref()).expect("Failed to create DID signature from raw sr25519 signature."); }: create(RawOrigin::Signed(submitter), did_creation_details.clone(), DidSignature::from(did_creation_signature)) @@ -249,13 +258,14 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_creation_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, did_creation_details.new_service_endpoints); assert_eq!(stored_did.last_tx_counter, 0u64); } create_ecdsa_keys { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let submitter: AccountIdentifierOf = account(DEFAULT_ACCOUNT_ID, 0, DEFAULT_ACCOUNT_SEED); @@ -264,13 +274,13 @@ benchmarks! { let did_key_agreement_keys = get_key_agreement_keys(n); let did_public_att_key = get_ecdsa_public_attestation_key(); let did_public_del_key = get_ecdsa_public_delegation_key(); - let did_endpoint = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_creation_details = generate_base_did_creation_details::(did_subject.clone()); did_creation_details.new_key_agreement_keys = did_key_agreement_keys; did_creation_details.new_attestation_key = Some(DidVerificationKey::from(did_public_att_key.clone())); did_creation_details.new_delegation_key = Some(DidVerificationKey::from(did_public_del_key.clone())); - did_creation_details.new_endpoint_url = Some(did_endpoint); + did_creation_details.new_service_endpoints = Some(service_endpoints); let did_creation_signature = ecdsa_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_creation_details.encode().as_ref()).expect("Failed to create DID signature from raw ecdsa signature."); }: create(RawOrigin::Signed(submitter), did_creation_details.clone(), DidSignature::from(did_creation_signature)) @@ -298,7 +308,7 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_creation_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, did_creation_details.new_service_endpoints); assert_eq!(stored_did.last_tx_counter, 0u64); } @@ -306,6 +316,7 @@ benchmarks! { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let m in 1 .. T::MaxVerificationKeysToRevoke::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let did_public_auth_key = get_ed25519_public_authentication_key(); let did_subject: DidIdentifierOf = MultiSigner::from(did_public_auth_key).into_account().into(); @@ -322,15 +333,15 @@ benchmarks! { let new_did_public_del_key = get_ed25519_public_delegation_key(); // Public keys obtained are generated using the same logic as the key agreement keys, so that we are sure they do not generate KeyNotPresent errors let public_keys_to_remove = get_public_keys::(m); - let new_url = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_update_details = generate_base_did_update_details::(did_subject.clone()); did_update_details.new_authentication_key = Some(DidVerificationKey::from(new_did_public_auth_key)); did_update_details.new_key_agreement_keys = new_key_agreement_keys; - did_update_details.attestation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key)); - did_update_details.delegation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key)); + did_update_details.attestation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key)); + did_update_details.delegation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key)); did_update_details.public_keys_to_remove = public_keys_to_remove; - did_update_details.new_endpoint_url = Some(new_url); + did_update_details.service_endpoints_update = DidFragmentUpdateAction::Change(service_endpoints.clone()); let did_update_signature = ed25519_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_update_details.encode().as_ref()).expect("Failed to create DID signature from raw ed25519 signature."); }: update(RawOrigin::Signed(did_subject.clone()), did_update_details.clone()) @@ -358,13 +369,14 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_update_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, Some(service_endpoints)); } update_sr25519_keys { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let m in 1 .. T::MaxVerificationKeysToRevoke::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let submitter: AccountIdentifierOf = account(DEFAULT_ACCOUNT_ID, 0, DEFAULT_ACCOUNT_SEED); @@ -383,15 +395,15 @@ benchmarks! { let new_did_public_del_key = get_sr25519_public_delegation_key(); // Public keys obtained are generated using the same logic as the key agreement keys, so that we are sure they do not generate KeyNotPresent errors let public_keys_to_remove = get_public_keys::(m); - let new_url = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_update_details = generate_base_did_update_details::(did_subject.clone()); did_update_details.new_authentication_key = Some(DidVerificationKey::from(new_did_public_auth_key)); did_update_details.new_key_agreement_keys = new_key_agreement_keys; - did_update_details.attestation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key)); - did_update_details.delegation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key)); + did_update_details.attestation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key)); + did_update_details.delegation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key)); did_update_details.public_keys_to_remove = public_keys_to_remove; - did_update_details.new_endpoint_url = Some(new_url); + did_update_details.service_endpoints_update = DidFragmentUpdateAction::Change(service_endpoints.clone()); let did_update_signature = sr25519_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_update_details.encode().as_ref()).expect("Failed to create DID signature from raw sr25519 signature."); }: update(RawOrigin::Signed(did_subject.clone()), did_update_details.clone()) @@ -419,13 +431,14 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_update_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, Some(service_endpoints)); } update_ecdsa_keys { let n in 1 .. T::MaxNewKeyAgreementKeys::get(); let m in 1 .. T::MaxVerificationKeysToRevoke::get(); let u in (DEFAULT_URL_SCHEME.len().saturated_into::()) .. T::MaxUrlLength::get(); + let c in 1 .. T::MaxEndpointUrlsCount::get(); let submitter: AccountIdentifierOf = account(DEFAULT_ACCOUNT_ID, 0, DEFAULT_ACCOUNT_SEED); @@ -444,15 +457,15 @@ benchmarks! { let new_did_public_del_key = get_ecdsa_public_delegation_key(); // Public keys obtained are generated using the same logic as the key agreement keys, so that we are sure they do not generate KeyNotPresent errors let public_keys_to_remove = get_public_keys::(m); - let new_url = get_url_endpoint(u); + let service_endpoints = get_service_endpoints(c, u); let mut did_update_details = generate_base_did_update_details::(did_subject.clone()); did_update_details.new_authentication_key = Some(DidVerificationKey::from(new_did_public_auth_key.clone())); did_update_details.new_key_agreement_keys = new_key_agreement_keys; - did_update_details.attestation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key.clone())); - did_update_details.delegation_key_update = DidVerificationKeyUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key.clone())); + did_update_details.attestation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_att_key.clone())); + did_update_details.delegation_key_update = DidFragmentUpdateAction::Change(DidVerificationKey::from(new_did_public_del_key.clone())); did_update_details.public_keys_to_remove = public_keys_to_remove; - did_update_details.new_endpoint_url = Some(new_url); + did_update_details.service_endpoints_update = DidFragmentUpdateAction::Change(service_endpoints.clone()); let did_update_signature = ecdsa_sign(AUTHENTICATION_KEY_ID, &did_public_auth_key, did_update_details.encode().as_ref()).expect("Failed to create DID signature from raw ecdsa signature."); }: update(RawOrigin::Signed(did_subject.clone()), did_update_details.clone()) @@ -480,7 +493,7 @@ benchmarks! { stored_did.get_attestation_key_id(), &Some(expected_attestation_key_id) ); - assert_eq!(stored_did.endpoint_url, did_update_details.new_endpoint_url); + assert_eq!(stored_did.service_endpoints, Some(service_endpoints)); } delete { diff --git a/pallets/did/src/default_weights.rs b/pallets/did/src/default_weights.rs index 7a1c3d8f3e..1a5def914a 100644 --- a/pallets/did/src/default_weights.rs +++ b/pallets/did/src/default_weights.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for did //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-04, STEPS: {{cmd.steps}}\, REPEAT: {{cmd.repeat}}\, LOW RANGE: {{cmd.lowest_range_values}}\, HIGH RANGE: {{cmd.highest_range_values}}\ +//! DATE: 2021-08-05, STEPS: {{cmd.steps}}\, REPEAT: {{cmd.repeat}}\, LOW RANGE: {{cmd.lowest_range_values}}\, HIGH RANGE: {{cmd.highest_range_values}}\ //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -48,12 +48,12 @@ use sp_std::marker::PhantomData; /// Weight functions needed for did. pub trait WeightInfo { - fn create_ed25519_keys(n: u32, u: u32, ) -> Weight; - fn create_sr25519_keys(n: u32, u: u32, ) -> Weight; - fn create_ecdsa_keys(n: u32, u: u32, ) -> Weight; - fn update_ed25519_keys(n: u32, m: u32, u: u32, ) -> Weight; - fn update_sr25519_keys(n: u32, m: u32, u: u32, ) -> Weight; - fn update_ecdsa_keys(n: u32, m: u32, u: u32, ) -> Weight; + fn create_ed25519_keys(n: u32, u: u32, c: u32, ) -> Weight; + fn create_sr25519_keys(n: u32, u: u32, c: u32, ) -> Weight; + fn create_ecdsa_keys(n: u32, u: u32, c: u32, ) -> Weight; + fn update_ed25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight; + fn update_sr25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight; + fn update_ecdsa_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight; fn delete() -> Weight; fn submit_did_call_ed25519_key() -> Weight; fn submit_did_call_sr25519_key() -> Weight; @@ -63,83 +63,93 @@ pub trait WeightInfo { /// Weights for did using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - fn create_ed25519_keys(n: u32, u: u32, ) -> Weight { - (77_652_000_u64) - // Standard Error: 35_000 - .saturating_add((1_627_000_u64).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((7_000_u64).saturating_mul(u as Weight)) + fn create_ed25519_keys(n: u32, u: u32, c: u32, ) -> Weight { + (71_462_000_u64) + // Standard Error: 105_000 + .saturating_add((2_176_000_u64).saturating_mul(n as Weight)) + // Standard Error: 4_000 + .saturating_add((19_000_u64).saturating_mul(u as Weight)) + // Standard Error: 475_000 + .saturating_add((2_897_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn create_sr25519_keys(n: u32, u: u32, ) -> Weight { - (77_617_000_u64) - // Standard Error: 43_000 - .saturating_add((1_950_000_u64).saturating_mul(n as Weight)) - // Standard Error: 2_000 - .saturating_add((2_000_u64).saturating_mul(u as Weight)) + fn create_sr25519_keys(n: u32, u: u32, c: u32, ) -> Weight { + (80_034_000_u64) + // Standard Error: 111_000 + .saturating_add((1_580_000_u64).saturating_mul(n as Weight)) + // Standard Error: 5_000 + .saturating_add((20_000_u64).saturating_mul(u as Weight)) + // Standard Error: 502_000 + .saturating_add((1_458_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn create_ecdsa_keys(n: u32, u: u32, ) -> Weight { - (182_132_000_u64) - // Standard Error: 68_000 - .saturating_add((1_606_000_u64).saturating_mul(n as Weight)) + fn create_ecdsa_keys(n: u32, u: u32, c: u32, ) -> Weight { + (163_338_000_u64) + // Standard Error: 70_000 + .saturating_add((2_028_000_u64).saturating_mul(n as Weight)) // Standard Error: 3_000 - .saturating_add((10_000_u64).saturating_mul(u as Weight)) + .saturating_add((22_000_u64).saturating_mul(u as Weight)) + // Standard Error: 315_000 + .saturating_add((3_977_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_ed25519_keys(n: u32, m: u32, u: u32, ) -> Weight { - (19_490_000_u64) - // Standard Error: 46_000 - .saturating_add((3_089_000_u64).saturating_mul(n as Weight)) - // Standard Error: 46_000 - .saturating_add((2_376_000_u64).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((7_000_u64).saturating_mul(u as Weight)) + fn update_ed25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (19_548_000_u64) + // Standard Error: 30_000 + .saturating_add((2_735_000_u64).saturating_mul(n as Weight)) + // Standard Error: 30_000 + .saturating_add((1_923_000_u64).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((8_000_u64).saturating_mul(u as Weight)) + // Standard Error: 138_000 + .saturating_add((1_276_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_sr25519_keys(n: u32, m: u32, u: u32, ) -> Weight { - (24_388_000_u64) - // Standard Error: 26_000 - .saturating_add((2_472_000_u64).saturating_mul(n as Weight)) - // Standard Error: 26_000 - .saturating_add((1_873_000_u64).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((1_000_u64).saturating_mul(u as Weight)) + fn update_sr25519_keys(n: u32, m: u32, _u: u32, c: u32, ) -> Weight { + (22_526_000_u64) + // Standard Error: 73_000 + .saturating_add((3_146_000_u64).saturating_mul(n as Weight)) + // Standard Error: 73_000 + .saturating_add((2_083_000_u64).saturating_mul(m as Weight)) + // Standard Error: 331_000 + .saturating_add((1_177_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_ecdsa_keys(n: u32, m: u32, u: u32, ) -> Weight { - (20_557_000_u64) - // Standard Error: 11_000 - .saturating_add((2_816_000_u64).saturating_mul(n as Weight)) - // Standard Error: 11_000 - .saturating_add((1_874_000_u64).saturating_mul(m as Weight)) + fn update_ecdsa_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (22_988_000_u64) + // Standard Error: 14_000 + .saturating_add((2_823_000_u64).saturating_mul(n as Weight)) + // Standard Error: 14_000 + .saturating_add((1_793_000_u64).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((3_000_u64).saturating_mul(u as Weight)) + .saturating_add((4_000_u64).saturating_mul(u as Weight)) + // Standard Error: 64_000 + .saturating_add((319_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn delete() -> Weight { - (17_563_000_u64) + (17_904_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_ed25519_key() -> Weight { - (66_766_000_u64) + (67_156_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_sr25519_key() -> Weight { - (68_679_000_u64) + (70_993_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_ecdsa_key() -> Weight { - (170_040_000_u64) + (170_751_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -147,83 +157,93 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - fn create_ed25519_keys(n: u32, u: u32, ) -> Weight { - (77_652_000_u64) - // Standard Error: 35_000 - .saturating_add((1_627_000_u64).saturating_mul(n as Weight)) - // Standard Error: 1_000 - .saturating_add((7_000_u64).saturating_mul(u as Weight)) + fn create_ed25519_keys(n: u32, u: u32, c: u32, ) -> Weight { + (71_462_000_u64) + // Standard Error: 105_000 + .saturating_add((2_176_000_u64).saturating_mul(n as Weight)) + // Standard Error: 4_000 + .saturating_add((19_000_u64).saturating_mul(u as Weight)) + // Standard Error: 475_000 + .saturating_add((2_897_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn create_sr25519_keys(n: u32, u: u32, ) -> Weight { - (77_617_000_u64) - // Standard Error: 43_000 - .saturating_add((1_950_000_u64).saturating_mul(n as Weight)) - // Standard Error: 2_000 - .saturating_add((2_000_u64).saturating_mul(u as Weight)) + fn create_sr25519_keys(n: u32, u: u32, c: u32, ) -> Weight { + (80_034_000_u64) + // Standard Error: 111_000 + .saturating_add((1_580_000_u64).saturating_mul(n as Weight)) + // Standard Error: 5_000 + .saturating_add((20_000_u64).saturating_mul(u as Weight)) + // Standard Error: 502_000 + .saturating_add((1_458_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn create_ecdsa_keys(n: u32, u: u32, ) -> Weight { - (182_132_000_u64) - // Standard Error: 68_000 - .saturating_add((1_606_000_u64).saturating_mul(n as Weight)) + fn create_ecdsa_keys(n: u32, u: u32, c: u32, ) -> Weight { + (163_338_000_u64) + // Standard Error: 70_000 + .saturating_add((2_028_000_u64).saturating_mul(n as Weight)) // Standard Error: 3_000 - .saturating_add((10_000_u64).saturating_mul(u as Weight)) + .saturating_add((22_000_u64).saturating_mul(u as Weight)) + // Standard Error: 315_000 + .saturating_add((3_977_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn update_ed25519_keys(n: u32, m: u32, u: u32, ) -> Weight { - (19_490_000_u64) - // Standard Error: 46_000 - .saturating_add((3_089_000_u64).saturating_mul(n as Weight)) - // Standard Error: 46_000 - .saturating_add((2_376_000_u64).saturating_mul(m as Weight)) - // Standard Error: 2_000 - .saturating_add((7_000_u64).saturating_mul(u as Weight)) + fn update_ed25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (19_548_000_u64) + // Standard Error: 30_000 + .saturating_add((2_735_000_u64).saturating_mul(n as Weight)) + // Standard Error: 30_000 + .saturating_add((1_923_000_u64).saturating_mul(m as Weight)) + // Standard Error: 1_000 + .saturating_add((8_000_u64).saturating_mul(u as Weight)) + // Standard Error: 138_000 + .saturating_add((1_276_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn update_sr25519_keys(n: u32, m: u32, u: u32, ) -> Weight { - (24_388_000_u64) - // Standard Error: 26_000 - .saturating_add((2_472_000_u64).saturating_mul(n as Weight)) - // Standard Error: 26_000 - .saturating_add((1_873_000_u64).saturating_mul(m as Weight)) - // Standard Error: 1_000 - .saturating_add((1_000_u64).saturating_mul(u as Weight)) + fn update_sr25519_keys(n: u32, m: u32, _u: u32, c: u32, ) -> Weight { + (22_526_000_u64) + // Standard Error: 73_000 + .saturating_add((3_146_000_u64).saturating_mul(n as Weight)) + // Standard Error: 73_000 + .saturating_add((2_083_000_u64).saturating_mul(m as Weight)) + // Standard Error: 331_000 + .saturating_add((1_177_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - fn update_ecdsa_keys(n: u32, m: u32, u: u32, ) -> Weight { - (20_557_000_u64) - // Standard Error: 11_000 - .saturating_add((2_816_000_u64).saturating_mul(n as Weight)) - // Standard Error: 11_000 - .saturating_add((1_874_000_u64).saturating_mul(m as Weight)) + fn update_ecdsa_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (22_988_000_u64) + // Standard Error: 14_000 + .saturating_add((2_823_000_u64).saturating_mul(n as Weight)) + // Standard Error: 14_000 + .saturating_add((1_793_000_u64).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((3_000_u64).saturating_mul(u as Weight)) + .saturating_add((4_000_u64).saturating_mul(u as Weight)) + // Standard Error: 64_000 + .saturating_add((319_000_u64).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn delete() -> Weight { - (17_563_000_u64) + (17_904_000_u64) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn submit_did_call_ed25519_key() -> Weight { - (66_766_000_u64) + (67_156_000_u64) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn submit_did_call_sr25519_key() -> Weight { - (68_679_000_u64) + (70_993_000_u64) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } fn submit_did_call_ecdsa_key() -> Weight { - (170_040_000_u64) + (170_751_000_u64) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/pallets/did/src/deprecated.rs b/pallets/did/src/deprecated.rs new file mode 100644 index 0000000000..c5330c605e --- /dev/null +++ b/pallets/did/src/deprecated.rs @@ -0,0 +1,77 @@ +// KILT Blockchain – https://botlabs.org +// Copyright (C) 2019-2021 BOTLabs GmbH + +// The KILT Blockchain is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The KILT Blockchain is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// If you feel like getting in touch with us, you can do so at info@botlabs.org + +pub(crate) mod v1 { + use codec::{Decode, Encode}; + use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet}; + + use crate::*; + + /// The details associated to a DID identity. + #[derive(Clone, Debug, Decode, Encode, PartialEq)] + pub struct DidDetails { + pub(crate) authentication_key: KeyIdOf, + pub(crate) key_agreement_keys: BTreeSet>, + pub(crate) delegation_key: Option>, + pub(crate) attestation_key: Option>, + pub(crate) public_keys: BTreeMap, DidPublicKeyDetails>, + pub(crate) endpoint_url: Option, + pub(crate) last_tx_counter: u64, + } + + #[cfg(test)] + impl DidDetails { + pub(crate) fn new(authentication_key: DidVerificationKey, block_number: BlockNumberOf) -> Self { + let mut public_keys: BTreeMap, DidPublicKeyDetails> = BTreeMap::new(); + let authentication_key_id = utils::calculate_key_id::(&authentication_key.clone().into()); + public_keys.insert( + authentication_key_id, + DidPublicKeyDetails { + key: authentication_key.into(), + block_number, + }, + ); + Self { + authentication_key: authentication_key_id, + key_agreement_keys: BTreeSet::new(), + attestation_key: None, + delegation_key: None, + endpoint_url: None, + public_keys, + last_tx_counter: 0u64, + } + } + } + + pub(crate) mod storage { + use frame_support::{decl_module, decl_storage}; + use sp_std::prelude::*; + + use super::*; + + decl_module! { + pub struct OldPallet for enum Call where origin: ::Origin {} + } + + decl_storage! { + trait Store for OldPallet as Did { + pub(crate) Did get(fn did): map hasher(blake2_128_concat) DidIdentifierOf => Option>; + } + } + } +} diff --git a/pallets/did/src/did_details.rs b/pallets/did/src/did_details.rs index 7f42b6efac..127f670b2d 100644 --- a/pallets/did/src/did_details.rs +++ b/pallets/did/src/did_details.rs @@ -17,6 +17,7 @@ // If you feel like getting in touch with us, you can do so at info@botlabs.org use codec::{Decode, Encode, WrapperTypeEncode}; +use kilt_primitives::Hash; use sp_core::{ecdsa, ed25519, sr25519}; use sp_runtime::traits::Verify; use sp_std::{ @@ -190,7 +191,7 @@ impl DidVerifiableIdentifier for kilt_primitives::DidIdentifier { .encode() .try_into() .map_err(|_| SignatureError::InvalidSignature)?; - // ECDSA uses blake2-256 hashing algorihtm for signatures, so we hash the given + // ECDSA uses blake2-256 hashing algorithm for signatures, so we hash the given // message to recover the public key. let hashed_message = sp_io::hashing::blake2_256(payload); let recovered_pk: [u8; 33] = @@ -226,16 +227,16 @@ pub struct DidPublicKeyDetails { pub struct DidDetails { /// The ID of the authentication key, used to authenticate DID-related /// operations. - authentication_key: KeyIdOf, + pub(crate) authentication_key: KeyIdOf, /// The set of the key agreement key IDs, which can be used to encrypt /// data addressed to the DID subject. - key_agreement_keys: BTreeSet>, + pub(crate) key_agreement_keys: BTreeSet>, /// \[OPTIONAL\] The ID of the delegation key, used to verify the /// signatures of the delegations created by the DID subject. - delegation_key: Option>, + pub(crate) delegation_key: Option>, /// \[OPTIONAL\] The ID of the attestation key, used to verify the /// signatures of the attestations created by the DID subject. - attestation_key: Option>, + pub(crate) attestation_key: Option>, /// The map of public keys, with the key label as /// the key map and the tuple (key, addition_block_number) as the map /// value. @@ -245,10 +246,10 @@ pub struct DidDetails { /// the old attestation keys that have been rotated, i.e., they cannot /// be used to create new attestations but can still be used to verify /// previously issued attestations. - public_keys: BTreeMap, DidPublicKeyDetails>, - /// \[OPTIONAL\] The URL pointing to the service endpoints the DID + pub(crate) public_keys: BTreeMap, DidPublicKeyDetails>, + /// \[OPTIONAL\] The service endpoint details the DID /// subject publicly exposes. - pub endpoint_url: Option, + pub service_endpoints: Option, /// The counter used to avoid replay attacks, which is checked and /// updated upon each DID operation involving with the subject as the /// creator. @@ -259,7 +260,7 @@ impl DidDetails { /// Creates a new instance of DID details with the minimum information, /// i.e., an authentication key and the block creation time. /// - /// The tx counter is set by default to 0. + /// The tx counter is automatically set to 0. pub fn new(authentication_key: DidVerificationKey, block_number: BlockNumberOf) -> Self { let mut public_keys: BTreeMap, DidPublicKeyDetails> = BTreeMap::new(); let authentication_key_id = utils::calculate_key_id::(&authentication_key.clone().into()); @@ -275,14 +276,14 @@ impl DidDetails { key_agreement_keys: BTreeSet::new(), attestation_key: None, delegation_key: None, - endpoint_url: None, + service_endpoints: None, public_keys, last_tx_counter: 0u64, } } - // Creates a new DID entry from [DidUpdateDetails] and a given authentication - // key. + // Creates a new DID entry from some [DidCreationDetails] and a given + // authentication key. pub fn from_creation_details( details: DidCreationDetails, new_auth_key: DidVerificationKey, @@ -293,11 +294,8 @@ impl DidDetails { InputError::MaxKeyAgreementKeysLimitExceeded ); - if let Some(ref endpoint_url) = details.new_endpoint_url { - ensure!( - endpoint_url.len() <= T::MaxUrlLength::get().saturated_into::(), - InputError::MaxUrlLengthExceeded - ); + if let Some(ref service_endpoints) = details.new_service_endpoints { + service_endpoints.validate_against_config_limits::()?; } let current_block_number = >::block_number(); @@ -315,7 +313,7 @@ impl DidDetails { new_did_details.update_delegation_key(delegation_key, current_block_number); } - new_did_details.endpoint_url = details.new_endpoint_url; + new_did_details.service_endpoints = details.new_service_endpoints; Ok(new_did_details) } @@ -337,11 +335,10 @@ impl DidDetails { DidError::InputError(InputError::MaxVerificationKeysToRemoveLimitExceeded) ); - if let Some(ref endpoint_url) = update_details.new_endpoint_url { - ensure!( - endpoint_url.len() <= T::MaxUrlLength::get().saturated_into::(), - DidError::InputError(InputError::MaxUrlLengthExceeded) - ); + if let DidFragmentUpdateAction::Change(ref service_endpoints) = update_details.service_endpoints_update { + service_endpoints + .validate_against_config_limits::() + .map_err(DidError::InputError)?; } let current_block_number = >::block_number(); @@ -360,31 +357,35 @@ impl DidDetails { // Update/remove the attestation key, if needed. match update_details.attestation_key_update { - DidVerificationKeyUpdateAction::Delete => { + DidFragmentUpdateAction::Delete => { self.delete_attestation_key(); } - DidVerificationKeyUpdateAction::Change(new_attestation_key) => { + DidFragmentUpdateAction::Change(new_attestation_key) => { self.update_attestation_key(new_attestation_key, current_block_number); } // Nothing happens. - DidVerificationKeyUpdateAction::Ignore => {} + DidFragmentUpdateAction::Ignore => {} } // Update/remove the delegation key, if needed. match update_details.delegation_key_update { - DidVerificationKeyUpdateAction::Delete => { + DidFragmentUpdateAction::Delete => { self.delete_delegation_key(); } - DidVerificationKeyUpdateAction::Change(new_delegation_key) => { + DidFragmentUpdateAction::Change(new_delegation_key) => { self.update_delegation_key(new_delegation_key, current_block_number); } // Nothing happens. - DidVerificationKeyUpdateAction::Ignore => {} + DidFragmentUpdateAction::Ignore => {} } - // Update URL, if needed. - if let Some(new_endpoint_url) = update_details.new_endpoint_url { - self.endpoint_url = Some(new_endpoint_url); + // Update/remove the service endpoints, if needed. + match update_details.service_endpoints_update { + DidFragmentUpdateAction::Delete => self.service_endpoints = None, + DidFragmentUpdateAction::Change(new_service_endpoints) => { + self.service_endpoints = Some(new_service_endpoints) + } + DidFragmentUpdateAction::Ignore => {} } Ok(()) @@ -622,8 +623,8 @@ pub struct DidCreationDetails { pub new_attestation_key: Option, /// \[OPTIONAL\] The new delegation key. pub new_delegation_key: Option, - /// \[OPTIONAL\] The URL containing the DID endpoints description. - pub new_endpoint_url: Option, + /// \[OPTIONAL\] The service endpoints publicly exposed. + pub new_service_endpoints: Option, } /// The details to update a DID. @@ -634,32 +635,57 @@ pub struct DidUpdateDetails { /// A new set of key agreement keys to add to the ones already stored. pub new_key_agreement_keys: BTreeSet, /// \[OPTIONAL\] The attestation key update action. - pub attestation_key_update: DidVerificationKeyUpdateAction, + pub attestation_key_update: DidFragmentUpdateAction, /// \[OPTIONAL\] The delegation key update action. - pub delegation_key_update: DidVerificationKeyUpdateAction, + pub delegation_key_update: DidFragmentUpdateAction, /// The set of old attestation keys to remove, given their identifiers. /// If the operation also replaces the current attestation key, it will /// not be considered for removal in this operation, so it is not /// possible to specify it for removal in this set. pub public_keys_to_remove: BTreeSet>, - /// \[OPTIONAL\] The new endpoint URL. - pub new_endpoint_url: Option, + /// The update action on the service endpoints information. + pub service_endpoints_update: DidFragmentUpdateAction, } -/// Possible actions on a DID verification key within a -/// [DidUpdateOperation]. -#[derive(Clone, Decode, Debug, Encode, Eq, Ord, PartialEq, PartialOrd)] -pub enum DidVerificationKeyUpdateAction { - /// Do not change the verification key. +#[derive(Clone, Debug, Decode, Encode, PartialEq, Eq)] +pub struct ServiceEndpoints { + pub content_hash: Hash, + pub urls: Vec, + pub content_type: ContentType, +} + +impl ServiceEndpoints { + pub(crate) fn validate_against_config_limits(&self) -> Result<(), InputError> { + ensure!( + self.urls.len() <= T::MaxEndpointUrlsCount::get().saturated_into::(), + InputError::MaxUrlsCountExceeded + ); + ensure!( + // Throws InputError::MaxUrlLengthExceeded if any URL is longer than the max allowed size. + !self + .urls + .iter() + .any(|url| { url.len() > T::MaxUrlLength::get().saturated_into::() }), + InputError::MaxUrlLengthExceeded + ); + Ok(()) + } +} + +/// Possible actions on a DID fragment (e.g, a verification key or the endpoint +/// services) within a [DidUpdateOperation]. +#[derive(Copy, Clone, Decode, Debug, Encode, Eq, PartialEq)] +pub enum DidFragmentUpdateAction { + /// Do not change the DID fragment. Ignore, - /// Change the verification key to the new one provided. - Change(DidVerificationKey), - /// Delete the verification key. + /// Change the DID fragment to the new one provided. + Change(FragmentType), + /// Delete the DID fragment. Delete, } // Return the ignore operation by default -impl Default for DidVerificationKeyUpdateAction { +impl Default for DidFragmentUpdateAction { fn default() -> Self { Self::Ignore } diff --git a/pallets/did/src/errors.rs b/pallets/did/src/errors.rs index 8b37443171..a877190b6e 100644 --- a/pallets/did/src/errors.rs +++ b/pallets/did/src/errors.rs @@ -87,4 +87,6 @@ pub enum InputError { MaxVerificationKeysToRemoveLimitExceeded, /// A URL longer than the maximum size allowed has been provided. MaxUrlLengthExceeded, + /// More than the maximum number of URLs have been specified. + MaxUrlsCountExceeded, } diff --git a/pallets/did/src/lib.rs b/pallets/did/src/lib.rs index 32c54f9e99..03b8db6576 100644 --- a/pallets/did/src/lib.rs +++ b/pallets/did/src/lib.rs @@ -60,9 +60,10 @@ //! to any past attestation key that has been rotated but not entirely //! revoked. //! -//! - An optional **endpoint URL**: pointing to the description of the services -//! the DID subject exposes. For more information, check the W3C DID Core -//! specification. +//! - An optional **service endpoints description**: pointing to the description +//! of the services the DID subject exposes and storing a cryptographic hash +//! of that information to ensure the integrity of the content. +//! For more information, check the W3C DID Core specification. //! //! - A **transaction counter**: acts as a nonce to avoid replay or signature //! forgery attacks. Each time a DID-signed transaction is executed, the @@ -74,7 +75,7 @@ //! //! - `create` - Register a new DID on the KILT blockchain under the given DID //! identifier. -//! - `update` - Update any keys or the endpoint URL of an existing DID. +//! - `update` - Update any keys or the service endpoints of an existing DID. //! - `delete` - Delete the specified DID and all related keys from the KILT //! blockchain. //! - `submit_did_call` - Proxy a dispatchable function for an extrinsic that @@ -88,7 +89,9 @@ //! creation or update operation is bounded by `MaxNewKeyAgreementKeys`. //! - The maximum number of new keys that can be deleted in an update operation //! is bounded by `MaxVerificationKeysToRevoke`. -//! - The maximum length in ASCII characters of the endpoint URL is bounded by +//! - The maximum number of endpoint URLs for a new DID service description is +//! bounded by `MaxEndpointUrlsCount`. +//! - The maximum length in ASCII characters of any endpoint URL is bounded by //! `MaxUrlLength`. //! - The chain performs basic checks over the endpoint URLs provided in //! creation and deletion operations. The SDK will perform more in-depth @@ -100,6 +103,7 @@ pub mod default_weights; pub mod did_details; pub mod errors; +pub mod migrations; pub mod origin; pub mod url; @@ -113,12 +117,15 @@ mod mock; #[cfg(test)] mod tests; +mod deprecated; + pub use crate::{default_weights::WeightInfo, did_details::*, errors::*, origin::*, pallet::*, url::*}; use codec::Encode; use frame_support::{ dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo}, ensure, + pallet_prelude::Weight, storage::types::StorageMap, traits::Get, Parameter, @@ -127,7 +134,9 @@ use frame_system::ensure_signed; #[cfg(feature = "runtime-benchmarks")] use frame_system::RawOrigin; use sp_runtime::SaturatedConversion; -use sp_std::{boxed::Box, convert::TryFrom, fmt::Debug, prelude::Clone, vec::Vec}; +use sp_std::{boxed::Box, convert::TryFrom, fmt::Debug, prelude::Clone, vec, vec::Vec}; + +use migrations::*; #[frame_support::pallet] pub mod pallet { @@ -186,6 +195,9 @@ pub mod pallet { /// a creation or update operation. #[pallet::constant] type MaxUrlLength: Get; + /// Maximum number of URLs that a service endpoint can contain. + #[pallet::constant] + type MaxEndpointUrlsCount: Get; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } @@ -195,7 +207,21 @@ pub mod pallet { pub struct Pallet(_); #[pallet::hooks] - impl Hooks> for Pallet {} + impl Hooks> for Pallet { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result<(), &'static str> { + migrations::DidStorageMigrator::::pre_migrate() + } + + fn on_runtime_upgrade() -> Weight { + migrations::DidStorageMigrator::::migrate() + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade() -> Result<(), &'static str> { + migrations::DidStorageMigrator::::post_migrate() + } + } /// DIDs stored on chain. /// @@ -204,6 +230,11 @@ pub mod pallet { #[pallet::getter(fn get_did)] pub type Did = StorageMap<_, Blake2_128Concat, DidIdentifierOf, DidDetails>; + /// Contains the latest storage version deployed. + #[pallet::storage] + #[pallet::getter(fn last_version_migration_used)] + pub(crate) type StorageVersion = StorageValue<_, DidStorageVersion, ValueQuery>; + #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { @@ -259,6 +290,8 @@ pub mod pallet { MaxVerificationKeysToRemoveLimitExceeded, /// A URL longer than the maximum size allowed has been provided. MaxUrlLengthExceeded, + /// More than the maximum number of URLs have been specified. + MaxUrlsCountExceeded, /// An error that is not supposed to take place, yet it happened. InternalError, } @@ -314,6 +347,7 @@ pub mod pallet { InputError::MaxKeyAgreementKeysLimitExceeded => Self::MaxKeyAgreementKeysLimitExceeded, InputError::MaxVerificationKeysToRemoveLimitExceeded => Self::MaxVerificationKeysToRemoveLimitExceeded, InputError::MaxUrlLengthExceeded => Self::MaxUrlLengthExceeded, + InputError::MaxUrlsCountExceeded => Self::MaxUrlsCountExceeded, } } } @@ -342,26 +376,37 @@ pub mod pallet { /// new key agreement keys included in the operation as well as the /// length of the URL endpoint, if present. /// --------- - /// Weight: O(K) + O(E) where K is the number of new key agreement keys - /// bounded by `MaxNewKeyAgreementKeys` and E the length of the endpoint - /// URL bounded by `MaxUrlLength`. + /// Weight: O(K) + O(N * E) where K is the number of new key agreement + /// keys bounded by `MaxNewKeyAgreementKeys`, E the length of the + /// longest endpoint URL bounded by `MaxUrlLength`, and N the maximum + /// amount of endpoint URLs, bounded by `MaxEndpointUrlsCount`. /// - Reads: [Origin Account], Did - /// - Writes: Did (with K new key agreement keys) + /// - Writes: Did (with K new key agreement keys and N endpoint URLs) /// # - #[pallet::weight( - ::WeightInfo::create_ed25519_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - ) - .max(::WeightInfo::create_sr25519_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - )) - .max(::WeightInfo::create_ecdsa_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - )) - )] + #[pallet::weight({ + let new_key_agreement_keys = details.new_key_agreement_keys.len().saturated_into::(); + let new_urls = details.new_service_endpoints.as_ref().map_or(vec![], |endpoint| endpoint.urls.clone()); + // Max 3, so we can iterate quite easily. + let max_url_length = new_urls.iter().map(|url| url.len().saturated_into()).max().unwrap_or(0u32); + + let ed25519_weight = ::WeightInfo::create_ed25519_keys( + new_key_agreement_keys, + new_urls.len().saturated_into(), + max_url_length + ); + let sr25519_weight = ::WeightInfo::create_sr25519_keys( + new_key_agreement_keys, + new_urls.len().saturated_into(), + max_url_length + ); + let ecdsa_weight = ::WeightInfo::create_ecdsa_keys( + new_key_agreement_keys, + new_urls.len().saturated_into(), + max_url_length + ); + + ed25519_weight.max(sr25519_weight).max(ecdsa_weight) + })] pub fn create(origin: OriginFor, details: DidCreationDetails, signature: DidSignature) -> DispatchResult { let sender = ensure_signed(origin)?; @@ -432,34 +477,51 @@ pub mod pallet { /// # /// - The transaction's complexity is mainly dependent on the number of /// new key agreement keys and public keys to remove included in the - /// operation as well as the length of the new URL endpoint, if - /// present. + /// operation as well as the length of the longest URL endpoint and + /// the number of new URL endpoints, if present. /// --------- - /// Weight: O(K) + O(D) + O(E) where K is the number of new key + /// Weight: O(K) + O(D) + O(N * E) where K is the number of new key /// agreement keys bounded by `MaxNewKeyAgreementKeys`, D is the number /// of public keys to remove bounded by `MaxVerificationKeysToRevoke`, - /// and E the length of the new endpoint URL bounded by `MaxUrlLength`. + /// E the length of the longest endpoint + /// URL bounded by `MaxUrlLength`, and N the maximum amount of endpoint + /// URLs, bounded by `MaxEndpointUrlsCount`. /// - Reads: [Origin Account], Did - /// - Writes: Did (with K new key agreement keys and removing D public - /// keys) + /// - Writes: Did (with K new key agreement keys, removing D public + /// keys, and replacing N service endpoint URLs) /// # - #[pallet::weight( - ::WeightInfo::update_ed25519_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.public_keys_to_remove.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - ) - .max(::WeightInfo::update_sr25519_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.public_keys_to_remove.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - )) - .max(::WeightInfo::update_ecdsa_keys( - details.new_key_agreement_keys.len().saturated_into::(), - details.public_keys_to_remove.len().saturated_into::(), - details.new_endpoint_url.as_ref().map_or(0u32, |url| url.len().saturated_into::()) - )) - )] + #[pallet::weight({ + let new_key_agreement_keys = details.new_key_agreement_keys.len().saturated_into::(); + let keys_to_delete = details.public_keys_to_remove.len().saturated_into::(); + let new_urls = if let DidFragmentUpdateAction::Change(ref new_service_endpoints) = details.service_endpoints_update { + new_service_endpoints.urls.clone() + } else { + vec![] + }; + // Again, max 3, so we can iterate quite easily. + let max_url_length = new_urls.iter().map(|url| url.len().saturated_into()).max().unwrap_or(0u32); + + let ed25519_weight = ::WeightInfo::update_ed25519_keys( + new_key_agreement_keys, + keys_to_delete, + new_urls.len().saturated_into(), + max_url_length + ); + let sr25519_weight = ::WeightInfo::update_sr25519_keys( + new_key_agreement_keys, + keys_to_delete, + new_urls.len().saturated_into(), + max_url_length + ); + let ecdsa_weight = ::WeightInfo::update_ecdsa_keys( + new_key_agreement_keys, + keys_to_delete, + new_urls.len().saturated_into(), + max_url_length + ); + + ed25519_weight.max(sr25519_weight).max(ecdsa_weight) + })] pub fn update(origin: OriginFor, details: DidUpdateDetails) -> DispatchResult { let did_subject = T::EnsureOrigin::ensure_origin(origin)?; diff --git a/pallets/did/src/migrations.rs b/pallets/did/src/migrations.rs new file mode 100644 index 0000000000..073146b5a5 --- /dev/null +++ b/pallets/did/src/migrations.rs @@ -0,0 +1,166 @@ +// KILT Blockchain – https://botlabs.org +// Copyright (C) 2019-2021 BOTLabs GmbH + +// The KILT Blockchain is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The KILT Blockchain is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// If you feel like getting in touch with us, you can do so at info@botlabs.org + +use codec::{Decode, Encode}; +use kilt_primitives::VersionMigratorTrait; +use sp_std::marker::PhantomData; + +use crate::*; + +mod v1; + +/// Storage version of the DID pallet. +#[derive(Copy, Clone, Encode, Eq, Decode, Ord, PartialEq, PartialOrd)] +pub enum DidStorageVersion { + V1, + V2, +} + +#[cfg(feature = "try-runtime")] +impl DidStorageVersion { + /// The latest storage version. + fn latest() -> Self { + Self::V2 + } +} + +// All nodes will default to this, which is not bad, as in case the "real" +// version is a later one (i.e. the node has been started with already the +// latest version), the migration will simply do nothing as there's nothing in +// the old storage entries to migrate from. +// +// It might get updated in the future when we know that no node is running this +// old version anymore. +impl Default for DidStorageVersion { + fn default() -> Self { + Self::V1 + } +} + +impl VersionMigratorTrait for DidStorageVersion { + // It runs the right pre_migrate logic depending on the current storage version. + #[cfg(feature = "try-runtime")] + fn pre_migrate(&self) -> Result<(), &str> { + match *self { + Self::V1 => v1::pre_migrate::(), + Self::V2 => Err("Already latest v2 version."), + } + } + + // It runs the right migration logic depending on the current storage version. + fn migrate(&self) -> Weight { + match *self { + Self::V1 => v1::migrate::(), + Self::V2 => 0u64, + } + } + + // It runs the right post_migrate logic depending on the current storage + // version. + #[cfg(feature = "try-runtime")] + fn post_migrate(&self) -> Result<(), &str> { + match *self { + Self::V1 => v1::post_migrate::(), + Self::V2 => Err("Migration from v2 should have never happened in the first place."), + } + } +} + +/// The DID pallet's storage migrator, which handles all version +/// migrations in a sequential fashion. +/// +/// If a node has missed on more than one upgrade, the migrator will apply the +/// needed migrations one after the other. Otherwise, if no migration is needed, +/// the migrator will simply not do anything. +pub struct DidStorageMigrator(PhantomData); + +impl DidStorageMigrator { + // Contains the migration sequence logic. + fn get_next_storage_version(current: DidStorageVersion) -> Option { + // If the version current deployed is at least v1, there is no more migrations + // to run (other than the one from v1). + match current { + DidStorageVersion::V1 => None, + DidStorageVersion::V2 => None, + } + } + + /// Checks whether the latest storage version deployed is lower than the + /// latest possible. + #[cfg(feature = "try-runtime")] + pub(crate) fn pre_migrate() -> Result<(), &'static str> { + ensure!( + StorageVersion::::get() < DidStorageVersion::latest(), + "Already the latest storage version." + ); + + // Don't need to check for any other pre_migrate, as in try-runtime it is also + // called in the migrate() function. Same applies for post_migrate checks for + // each version migrator. + + Ok(()) + } + + /// Applies all the needed migrations from the currently deployed version to + /// the latest possible, one after the other. + /// + /// It returns the total weight consumed by ALL the migrations applied. + pub(crate) fn migrate() -> Weight { + let mut current_version: Option = Some(StorageVersion::::get()); + // Weight for StorageVersion::get(). + let mut total_weight = T::DbWeight::get().reads(1); + + while let Some(ver) = current_version { + // If any of the needed migrations pre-checks fail, the whole chain panics + // (during tests). + #[cfg(feature = "try-runtime")] + if let Err(err) = >::pre_migrate(&ver) { + panic!("{:?}", err); + } + let consumed_weight = >::migrate(&ver); + total_weight = total_weight.saturating_add(consumed_weight); + // If any of the needed migrations post-checks fail, the whole chain panics + // (during tests). + #[cfg(feature = "try-runtime")] + if let Err(err) = >::post_migrate(&ver) { + panic!("{:?}", err); + } + // If more migrations should be applied, current_version will not be None. + current_version = Self::get_next_storage_version(ver); + } + + total_weight + } + + /// Checks whether the storage version after all the needed migrations match + /// the latest one. + #[cfg(feature = "try-runtime")] + pub(crate) fn post_migrate() -> Result<(), &'static str> { + ensure!( + StorageVersion::::get() == DidStorageVersion::latest(), + "Not updated to the latest version." + ); + + Ok(()) + } +} + +// The storage migrator is the same as in the delegation pallet, so those test +// cases will suffice. We might want to refactor this into something generic +// over a type implementing the `VersionMigratorTrait` trait, and have it tested +// only once. diff --git a/pallets/did/src/migrations/v1.rs b/pallets/did/src/migrations/v1.rs new file mode 100644 index 0000000000..628d2d332f --- /dev/null +++ b/pallets/did/src/migrations/v1.rs @@ -0,0 +1,193 @@ +// KILT Blockchain – https://botlabs.org +// Copyright (C) 2019-2021 BOTLabs GmbH + +// The KILT Blockchain is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The KILT Blockchain is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// If you feel like getting in touch with us, you can do so at info@botlabs.org + +use crate::*; + +use sp_runtime::traits::Zero; + +#[cfg(feature = "try-runtime")] +pub(crate) fn pre_migrate() -> Result<(), &'static str> { + ensure!( + StorageVersion::::get() == DidStorageVersion::V1, + "Current deployed version is not v1." + ); + + log::info!("Version storage migrating from v1 to v2"); + Ok(()) +} + +pub(crate) fn migrate() -> Weight { + log::info!("v1 -> v2 DID storage migrator started!"); + let mut total_weight = Weight::zero(); + + Did::::translate_values(|old_did_details: deprecated::v1::DidDetails| { + // Add a read from the old storage and a write for the new storage + total_weight = total_weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); + Some(old_to_new_did_details(old_did_details)) + }); + + StorageVersion::::set(DidStorageVersion::V2); + // Adds a write from StorageVersion::set() weight. + total_weight = total_weight.saturating_add(T::DbWeight::get().writes(1)); + log::debug!("Total weight consumed: {}", total_weight); + log::info!("v1 -> v2 DID storage migrator finished!"); + + total_weight +} + +fn old_to_new_did_details(old: deprecated::v1::DidDetails) -> DidDetails { + DidDetails { + authentication_key: old.authentication_key, + key_agreement_keys: old.key_agreement_keys, + attestation_key: old.attestation_key, + delegation_key: old.delegation_key, + public_keys: old.public_keys, + last_tx_counter: old.last_tx_counter, + // As now service endpoints also contain a hash of the document which was not present before, + // all migrated endpoints would be unusable. Hence, we decide to set the new endpoint to None + // and ask the users to provide a new endpoint that is compliant with the new structure. + service_endpoints: None, + } +} + +#[cfg(feature = "try-runtime")] +pub(crate) fn post_migrate() -> Result<(), &'static str> { + ensure!( + StorageVersion::::get() == DidStorageVersion::V2, + "The version after deployment is not 2 as expected." + ); + ensure!( + !Did::::iter_values().any(|did_details| { did_details.service_endpoints.is_some() }), + "There are DIDs that do not have the new service endpoints set to None." + ); + log::info!("Version storage migrated from v1 to v2"); + Ok(()) +} + +// Tests for the v1 storage migrator. +#[cfg(test)] +mod tests { + use frame_support::StorageMap; + use sp_core::Pair; + + use super::*; + use crate::mock::Test as TestRuntime; + + #[test] + fn fail_version_higher() { + let mut ext = mock::ExtBuilder::default() + .with_storage_version(DidStorageVersion::V2) + .build(None); + ext.execute_with(|| { + #[cfg(feature = "try-runtime")] + assert!( + pre_migrate::().is_err(), + "Pre-migration for v1 should fail." + ); + }); + } + + #[test] + fn ok_no_dids() { + let mut ext = mock::ExtBuilder::default() + .with_storage_version(DidStorageVersion::V1) + .build(None); + ext.execute_with(|| { + #[cfg(feature = "try-runtime")] + assert!( + pre_migrate::().is_ok(), + "Pre-migration for v1 should not fail." + ); + + migrate::(); + + #[cfg(feature = "try-runtime")] + assert!( + post_migrate::().is_ok(), + "Post-migration for v1 should not fail." + ); + }); + } + + #[test] + fn ok_no_prior_endpoint() { + let mut ext = mock::ExtBuilder::default() + .with_storage_version(DidStorageVersion::V1) + .build(None); + ext.execute_with(|| { + let auth_key = mock::get_ed25519_authentication_key(true); + let alice_did = mock::get_did_identifier_from_ed25519_key(auth_key.public()); + let alice_did_details = + deprecated::v1::DidDetails::::new(DidVerificationKey::from(auth_key.public()), 0); + + deprecated::v1::storage::Did::insert(&alice_did, alice_did_details); + + #[cfg(feature = "try-runtime")] + assert!( + pre_migrate::().is_ok(), + "Pre-migration for v1 should not fail." + ); + + migrate::(); + + #[cfg(feature = "try-runtime")] + assert!( + post_migrate::().is_ok(), + "Post-migration for v1 should not fail." + ); + + let new_stored_details = + Did::::get(&alice_did).expect("New DID details should exist in the storage."); + assert!(new_stored_details.service_endpoints.is_none()); + }); + } + + #[test] + fn ok_prior_endpoint() { + let mut ext = mock::ExtBuilder::default() + .with_storage_version(DidStorageVersion::V1) + .build(None); + ext.execute_with(|| { + let auth_key = mock::get_ed25519_authentication_key(true); + let alice_did = mock::get_did_identifier_from_ed25519_key(auth_key.public()); + let mut alice_did_details = + deprecated::v1::DidDetails::::new(DidVerificationKey::from(auth_key.public()), 0); + alice_did_details.endpoint_url = Some(Url::Http(HttpUrl::try_from(b"https://kilt.io".as_ref()).unwrap())); + + deprecated::v1::storage::Did::insert(&alice_did, alice_did_details); + + #[cfg(feature = "try-runtime")] + assert!( + pre_migrate::().is_ok(), + "Pre-migration for v1 should not fail." + ); + + migrate::(); + + #[cfg(feature = "try-runtime")] + assert!( + post_migrate::().is_ok(), + "Post-migration for v1 should not fail." + ); + + let new_stored_details = + Did::::get(&alice_did).expect("New DID details should exist in the storage."); + assert!(new_stored_details.service_endpoints.is_none()); + }); + } +} diff --git a/pallets/did/src/mock.rs b/pallets/did/src/mock.rs index 112a0e6032..a9dfd2686f 100644 --- a/pallets/did/src/mock.rs +++ b/pallets/did/src/mock.rs @@ -19,10 +19,9 @@ #![allow(clippy::from_over_into)] #![allow(unused_must_use)] -#[cfg(feature = "runtime-benchmarks")] -use frame_system::EnsureSigned; - use frame_support::{parameter_types, weights::constants::RocksDbWeight}; +use frame_system::EnsureSigned; +use kilt_primitives::Hash; use sp_core::{ecdsa, ed25519, sr25519, Pair}; use sp_keystore::{testing::KeyStore, KeystoreExt}; use sp_runtime::{ @@ -92,19 +91,18 @@ parameter_types! { pub const MaxNewKeyAgreementKeys: u32 = 10u32; pub const MaxVerificationKeysToRevoke: u32 = 10u32; pub const MaxUrlLength: u32 = 200u32; + pub const MaxEndpointUrlsCount: u32 = 3u32; } impl Config for Test { type DidIdentifier = TestDidIdentifier; type Origin = Origin; type Call = Call; - #[cfg(feature = "runtime-benchmarks")] type EnsureOrigin = EnsureSigned; - #[cfg(not(feature = "runtime-benchmarks"))] - type EnsureOrigin = did::EnsureDidOrigin; type Event = (); type MaxNewKeyAgreementKeys = MaxNewKeyAgreementKeys; type MaxUrlLength = MaxUrlLength; + type MaxEndpointUrlsCount = MaxEndpointUrlsCount; type MaxVerificationKeysToRevoke = MaxVerificationKeysToRevoke; type WeightInfo = (); } @@ -131,6 +129,7 @@ const ALTERNATIVE_ATT_SEED: [u8; 32] = [60u8; 32]; const DEFAULT_DEL_SEED: [u8; 32] = [7u8; 32]; const ALTERNATIVE_DEL_SEED: [u8; 32] = [70u8; 32]; const DEFAULT_URL_SCHEME: [u8; 8] = *b"https://"; +const DEFAULT_SERVICE_ENDPOINT_HASH_SEED: u64 = 200u64; pub fn get_did_identifier_from_ed25519_key(public_key: ed25519::Public) -> TestDidIdentifier { MultiSigner::from(public_key).into_account() @@ -254,13 +253,20 @@ pub fn get_public_keys_to_remove(n_keys: u32) -> BTreeSet { } // Assumes that the length of the URL is larger than 8 (length of the prefix https://) -pub fn get_url_endpoint(length: u32) -> Url { +pub fn get_service_endpoints(count: u32, length: u32) -> ServiceEndpoints { let total_length = usize::try_from(length).expect("Failed to convert URL max length value to usize value."); + let total_count = usize::try_from(count).expect("Failed to convert number (count) of URLs to usize value."); let mut url_encoded_string = DEFAULT_URL_SCHEME.to_vec(); url_encoded_string.resize(total_length, b'0'); - Url::Http( + let url = Url::Http( HttpUrl::try_from(url_encoded_string.as_ref()).expect("Failed to create default URL with provided length."), - ) + ); + + ServiceEndpoints { + content_hash: Hash::from_low_u64_be(DEFAULT_SERVICE_ENDPOINT_HASH_SEED), + urls: vec![url; total_count], + content_type: ContentType::ApplicationJson, + } } pub fn generate_base_did_creation_details(did: TestDidIdentifier) -> did::DidCreationDetails { @@ -269,7 +275,7 @@ pub fn generate_base_did_creation_details(did: TestDidIdentifier) -> did::DidCre new_key_agreement_keys: BTreeSet::new(), new_attestation_key: None, new_delegation_key: None, - new_endpoint_url: None, + new_service_endpoints: None, } } @@ -277,9 +283,9 @@ pub fn generate_base_did_update_details() -> did::DidUpdateDetails { DidUpdateDetails { new_authentication_key: None, new_key_agreement_keys: BTreeSet::new(), - attestation_key_update: DidVerificationKeyUpdateAction::default(), - delegation_key_update: DidVerificationKeyUpdateAction::default(), - new_endpoint_url: None, + attestation_key_update: DidFragmentUpdateAction::default(), + delegation_key_update: DidFragmentUpdateAction::default(), + service_endpoints_update: DidFragmentUpdateAction::default(), public_keys_to_remove: BTreeSet::new(), } } @@ -370,11 +376,15 @@ pub fn initialize_logger() { #[derive(Clone)] pub struct ExtBuilder { dids_stored: Vec<(TestDidIdentifier, did::DidDetails)>, + storage_version: DidStorageVersion, } impl Default for ExtBuilder { fn default() -> Self { - Self { dids_stored: vec![] } + Self { + dids_stored: vec![], + storage_version: DidStorageVersion::default(), + } } } @@ -384,6 +394,11 @@ impl ExtBuilder { self } + pub fn with_storage_version(mut self, storage_version: DidStorageVersion) -> Self { + self.storage_version = storage_version; + self + } + pub fn build(self, ext: Option) -> sp_io::TestExternalities { let mut ext = if let Some(ext) = ext { ext @@ -400,6 +415,10 @@ impl ExtBuilder { }); } + ext.execute_with(|| { + did::StorageVersion::::set(self.storage_version); + }); + ext } diff --git a/pallets/did/src/tests.rs b/pallets/did/src/tests.rs index d432f12e91..cd61296e8c 100644 --- a/pallets/did/src/tests.rs +++ b/pallets/did/src/tests.rs @@ -56,7 +56,7 @@ fn check_successful_simple_ed25519_creation() { assert!(stored_did .get_public_keys() .contains_key(&generate_key_id(&auth_did_key.into()))); - assert_eq!(stored_did.endpoint_url, None); + assert_eq!(stored_did.service_endpoints, None); assert_eq!(stored_did.last_tx_counter, 0u64); } @@ -91,7 +91,7 @@ fn check_successful_simple_sr25519_creation() { assert!(stored_did .get_public_keys() .contains_key(&generate_key_id(&auth_did_key.into()))); - assert_eq!(stored_did.endpoint_url, None); + assert_eq!(stored_did.service_endpoints, None); assert_eq!(stored_did.last_tx_counter, 0u64); } @@ -126,7 +126,7 @@ fn check_successful_simple_ecdsa_creation() { assert!(stored_did .get_public_keys() .contains_key(&generate_key_id(&auth_did_key.into()))); - assert_eq!(stored_did.endpoint_url, None); + assert_eq!(stored_did.service_endpoints, None); assert_eq!(stored_did.last_tx_counter, 0u64); } @@ -142,15 +142,12 @@ fn check_successful_complete_creation() { .collect(); let del_key = get_sr25519_delegation_key(true); let att_key = get_ecdsa_attestation_key(true); - let new_url = did::Url::from( - did::HttpUrl::try_from("https://new_kilt.io".as_bytes()) - .expect("https://new_kilt.io should not be considered an invalid HTTP URL."), - ); + let new_service_endpoints = get_service_endpoints(1, 10); let mut details = generate_base_did_creation_details(alice_did.clone()); details.new_key_agreement_keys = enc_keys.clone(); details.new_attestation_key = Some(did::DidVerificationKey::from(att_key.public())); details.new_delegation_key = Some(did::DidVerificationKey::from(del_key.public())); - details.new_endpoint_url = Some(new_url); + details.new_service_endpoints = Some(new_service_endpoints.clone()); let signature = auth_key.sign(details.encode().as_ref()); @@ -202,6 +199,12 @@ fn check_successful_complete_creation() { assert!(stored_did .get_public_keys() .contains_key(&generate_key_id(&details.new_delegation_key.clone().unwrap().into()))); + assert!(stored_did.service_endpoints.is_some()); + assert_eq!(stored_did.service_endpoints.clone().unwrap().urls.len(), 1); + assert_eq!( + stored_did.service_endpoints.unwrap().urls[0], + new_service_endpoints.urls[0] + ); } #[test] @@ -328,10 +331,11 @@ fn check_max_limit_key_agreement_keys_did_creation() { fn check_url_too_long_did_creation() { let auth_key = get_sr25519_authentication_key(true); let alice_did = get_did_identifier_from_sr25519_key(auth_key.public()); - let url_endpoint = get_url_endpoint(::MaxUrlLength::get().saturating_add(1)); + // Max URL length allowed + 1 + let service_endpoints = get_service_endpoints(1, ::MaxUrlLength::get().saturating_add(1)); + let mut details = generate_base_did_creation_details(alice_did); - // Max length allowed + 1 - details.new_endpoint_url = Some(url_endpoint); + details.new_service_endpoints = Some(service_endpoints); let signature = auth_key.sign(details.encode().as_ref()); @@ -349,6 +353,33 @@ fn check_url_too_long_did_creation() { }); } +#[test] +fn check_too_many_urls_did_creation() { + let auth_key = get_sr25519_authentication_key(true); + let alice_did = get_did_identifier_from_sr25519_key(auth_key.public()); + // Max number of URLs allowed + 1 + let service_endpoints = + get_service_endpoints(::MaxEndpointUrlsCount::get().saturating_add(1), 10); + + let mut details = generate_base_did_creation_details(alice_did); + details.new_service_endpoints = Some(service_endpoints); + + let signature = auth_key.sign(details.encode().as_ref()); + + let mut ext = ExtBuilder::default().build(None); + + ext.execute_with(|| { + assert_noop!( + Did::create( + Origin::signed(DEFAULT_ACCOUNT), + details, + did::DidSignature::from(signature), + ), + did::Error::::MaxUrlsCountExceeded + ); + }); +} + // update #[test] @@ -361,10 +392,7 @@ fn check_successful_complete_update() { let old_att_key = get_ed25519_attestation_key(true); let new_att_key = get_ed25519_attestation_key(false); let new_del_key = get_sr25519_delegation_key(true); - let new_url = did::Url::from( - did::HttpUrl::try_from("https://new_kilt.io".as_bytes()) - .expect("https://new_kilt.io should not be considered an invalid HTTP URL."), - ); + let new_service_endpoints = get_service_endpoints(1, 10); let mut old_did_details = generate_base_did_details(did::DidVerificationKey::from(old_auth_key.public())); old_did_details.add_key_agreement_keys( @@ -385,14 +413,14 @@ fn check_successful_complete_update() { .copied() .collect::>(); details.attestation_key_update = - did::DidVerificationKeyUpdateAction::Change(did::DidVerificationKey::from(new_att_key.public())); + did::DidFragmentUpdateAction::Change(did::DidVerificationKey::from(new_att_key.public())); details.delegation_key_update = - did::DidVerificationKeyUpdateAction::Change(did::DidVerificationKey::from(new_del_key.public())); + did::DidFragmentUpdateAction::Change(did::DidVerificationKey::from(new_del_key.public())); details.public_keys_to_remove = vec![generate_key_id(&old_enc_key.into())] .iter() .copied() .collect::>(); - details.new_endpoint_url = Some(new_url); + details.service_endpoints_update = did::DidFragmentUpdateAction::Change(new_service_endpoints.clone()); let mut ext = ExtBuilder::default() .with_dids(vec![(alice_did.clone(), old_did_details)]) @@ -453,6 +481,13 @@ fn check_successful_complete_update() { assert!(public_keys.contains_key(&generate_key_id( &did::DidVerificationKey::from(new_del_key.public()).into() ))); + // Check for new service endpoints + assert!(new_did_details.service_endpoints.is_some()); + assert_eq!(new_did_details.service_endpoints.clone().unwrap().urls.len(), 1); + assert_eq!( + new_did_details.service_endpoints.unwrap().urls[0], + new_service_endpoints.urls[0] + ); } #[test] @@ -468,8 +503,8 @@ fn check_successful_keys_deletion_update() { // Remove both attestation and delegation key let mut details = generate_base_did_update_details(); - details.attestation_key_update = did::DidVerificationKeyUpdateAction::Delete; - details.delegation_key_update = did::DidVerificationKeyUpdateAction::Delete; + details.attestation_key_update = did::DidFragmentUpdateAction::Delete; + details.delegation_key_update = did::DidFragmentUpdateAction::Delete; let mut ext = ExtBuilder::default() .with_dids(vec![(alice_did.clone(), old_did_details.clone())]) @@ -507,6 +542,81 @@ fn check_successful_keys_deletion_update() { ))); } +#[test] +fn check_successful_endpoints_deletion_update() { + let auth_key = get_ed25519_authentication_key(true); + let alice_did = get_did_identifier_from_ed25519_key(auth_key.public()); + let service_endpoints = get_service_endpoints(1, 10); + + let mut old_did_details = generate_base_did_details(did::DidVerificationKey::from(auth_key.public())); + old_did_details.service_endpoints = Some(service_endpoints); + + // Remove the service endpoints + let mut details = generate_base_did_update_details(); + details.service_endpoints_update = did::DidFragmentUpdateAction::Delete; + + let mut ext = ExtBuilder::default() + .with_dids(vec![(alice_did.clone(), old_did_details.clone())]) + .build(None); + + ext.execute_with(|| { + assert_ok!(Did::update(Origin::signed(alice_did.clone()), details)); + }); + + // Auth key and key agreement key unchanged + let new_did_details = ext.execute_with(|| Did::get_did(&alice_did).expect("ALICE_DID should be present on chain.")); + assert_eq!( + new_did_details.get_authentication_key_id(), + old_did_details.get_authentication_key_id() + ); + assert_eq!( + new_did_details.get_key_agreement_keys_ids(), + old_did_details.get_key_agreement_keys_ids() + ); + assert_eq!(new_did_details.get_attestation_key_id(), &None); + assert_eq!(new_did_details.get_delegation_key_id(), &None); + + // Service endpoints should now be None + assert!(new_did_details.service_endpoints.is_none()); +} + +#[test] +fn check_successful_endpoints_ignore_update() { + let auth_key = get_ed25519_authentication_key(true); + let alice_did = get_did_identifier_from_ed25519_key(auth_key.public()); + let service_endpoints = get_service_endpoints(1, 10); + + let mut old_did_details = generate_base_did_details(did::DidVerificationKey::from(auth_key.public())); + old_did_details.service_endpoints = Some(service_endpoints.clone()); + + // By default all actions are `Ignore`, including the service endpoint action. + let details = generate_base_did_update_details(); + + let mut ext = ExtBuilder::default() + .with_dids(vec![(alice_did.clone(), old_did_details.clone())]) + .build(None); + + ext.execute_with(|| { + assert_ok!(Did::update(Origin::signed(alice_did.clone()), details)); + }); + + // Auth key and key agreement key unchanged + let new_did_details = ext.execute_with(|| Did::get_did(&alice_did).expect("ALICE_DID should be present on chain.")); + assert_eq!( + new_did_details.get_authentication_key_id(), + old_did_details.get_authentication_key_id() + ); + assert_eq!( + new_did_details.get_key_agreement_keys_ids(), + old_did_details.get_key_agreement_keys_ids() + ); + assert_eq!(new_did_details.get_attestation_key_id(), &None); + assert_eq!(new_did_details.get_delegation_key_id(), &None); + + // Service endpoints should remain unchanged + assert_eq!(new_did_details.service_endpoints, Some(service_endpoints)); +} + #[test] fn check_successful_keys_overwrite_update() { let auth_key = get_ed25519_authentication_key(true); @@ -519,7 +629,7 @@ fn check_successful_keys_overwrite_update() { // Remove both attestation and delegation key let mut details = generate_base_did_update_details(); details.attestation_key_update = - did::DidVerificationKeyUpdateAction::Change(did::DidVerificationKey::from(new_att_key.public())); + did::DidFragmentUpdateAction::Change(did::DidVerificationKey::from(new_att_key.public())); let mut ext = ExtBuilder::default() .with_dids(vec![(alice_did.clone(), old_did_details.clone())]) @@ -573,7 +683,7 @@ fn check_successful_keys_multiuse_update() { // Remove attestation key let mut details = generate_base_did_update_details(); - details.attestation_key_update = did::DidVerificationKeyUpdateAction::Delete; + details.attestation_key_update = did::DidFragmentUpdateAction::Delete; let mut ext = ExtBuilder::default() .with_dids(vec![(alice_did.clone(), old_did_details.clone())]) @@ -687,10 +797,10 @@ fn check_url_too_long_did_update() { let old_did_details = generate_base_did_details(did::DidVerificationKey::from(auth_key.public())); // Max URL length allowed + 1 - let new_endpoint_url = get_url_endpoint(::MaxUrlLength::get().saturating_add(1)); + let new_service_endpoints = get_service_endpoints(1, ::MaxUrlLength::get().saturating_add(1)); let mut details = generate_base_did_update_details(); - details.new_endpoint_url = Some(new_endpoint_url); + details.service_endpoints_update = did::DidFragmentUpdateAction::Change(new_service_endpoints); let mut ext = ExtBuilder::default() .with_dids(vec![(alice_did.clone(), old_did_details)]) @@ -707,6 +817,35 @@ fn check_url_too_long_did_update() { }); } +#[test] +fn check_too_many_urls_did_update() { + let auth_key = get_sr25519_authentication_key(true); + let alice_did = get_did_identifier_from_sr25519_key(auth_key.public()); + + let old_did_details = generate_base_did_details(did::DidVerificationKey::from(auth_key.public())); + + // Max URL length allowed + 1 + let new_service_endpoints = + get_service_endpoints(::MaxEndpointUrlsCount::get().saturating_add(1), 10); + + let mut details = generate_base_did_update_details(); + details.service_endpoints_update = did::DidFragmentUpdateAction::Change(new_service_endpoints); + + let mut ext = ExtBuilder::default() + .with_dids(vec![(alice_did.clone(), old_did_details)]) + .build(None); + + let new_block_number: TestBlockNumber = 1; + + ext.execute_with(|| { + System::set_block_number(new_block_number); + assert_noop!( + Did::update(Origin::signed(alice_did.clone()), details), + did::Error::::MaxUrlsCountExceeded + ); + }); +} + #[test] fn check_currently_active_authentication_key_update() { let auth_key = get_ed25519_authentication_key(true); diff --git a/pallets/did/src/url.rs b/pallets/did/src/url.rs index 1f92b74f6f..78862f7c2d 100644 --- a/pallets/did/src/url.rs +++ b/pallets/did/src/url.rs @@ -32,9 +32,18 @@ pub const FTPS_URI_SCHEME: &str = "ftps://"; /// The expected URI scheme for IPFS endpoints. pub const IPFS_URI_SCHEME: &str = "ipfs://"; +/// The content type of a resource pointed by a service URL. +#[derive(Clone, Decode, Debug, Encode, PartialEq, Eq)] +pub enum ContentType { + /// application/json + ApplicationJson, + /// application/json+ld + ApplicationJsonLd, +} + /// A web URL starting with either http:// or https:// /// and containing only ASCII URL-encoded characters. -#[derive(Clone, Decode, Debug, Encode, PartialEq)] +#[derive(Clone, Decode, Debug, Encode, PartialEq, Eq)] pub struct HttpUrl { payload: Vec, } @@ -62,7 +71,7 @@ impl TryFrom<&[u8]> for HttpUrl { /// An FTP URL starting with ftp:// or ftps:// /// and containing only ASCII URL-encoded characters. -#[derive(Clone, Decode, Debug, Encode, PartialEq)] +#[derive(Clone, Decode, Debug, Encode, PartialEq, Eq)] pub struct FtpUrl { payload: Vec, } @@ -89,7 +98,7 @@ impl TryFrom<&[u8]> for FtpUrl { } /// An IPFS URL starting with ipfs://. Both CIDs v0 and v1 supported. -#[derive(Clone, Decode, Debug, Encode, PartialEq)] +#[derive(Clone, Decode, Debug, Encode, PartialEq, Eq)] pub struct IpfsUrl { payload: Vec, } @@ -123,7 +132,7 @@ impl TryFrom<&[u8]> for IpfsUrl { } /// Supported URLs. -#[derive(Clone, Decode, Debug, Encode, PartialEq)] +#[derive(Clone, Decode, Debug, Encode, PartialEq, Eq)] pub enum Url { /// See [HttpUrl]. Http(HttpUrl), diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index db69ff4174..1201bde3e9 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -25,3 +25,6 @@ std = [ "sp-runtime/std", "sp-std/std" ] +try-runtime = [ + "frame-support/try-runtime" +] diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 808882dd76..9430b803ca 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -22,6 +22,7 @@ use codec::{Decode, Encode}; use core::convert::TryFrom; +use frame_support::dispatch::Weight; pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; pub use sp_consensus_aura::sr25519::AuthorityId; @@ -102,3 +103,16 @@ impl TryFrom> for CurrencyId { } } } + +/// A trait that allows version migrators to access the underlying pallet's +/// context, e.g., its Config trait. +/// +/// In this way, the migrator can access the pallet's storage and the pallet's +/// types directly. +pub trait VersionMigratorTrait { + #[cfg(feature = "try-runtime")] + fn pre_migrate(&self) -> Result<(), &str>; + fn migrate(&self) -> Weight; + #[cfg(feature = "try-runtime")] + fn post_migrate(&self) -> Result<(), &str>; +} diff --git a/runtimes/peregrine/src/lib.rs b/runtimes/peregrine/src/lib.rs index 6d755c3c52..d8f9652a9b 100644 --- a/runtimes/peregrine/src/lib.rs +++ b/runtimes/peregrine/src/lib.rs @@ -121,7 +121,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("mashnet-node"), impl_name: create_runtime_str!("mashnet-node"), authoring_version: 4, - spec_version: 18, + spec_version: 19, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -686,6 +686,7 @@ parameter_types! { pub const MaxNewKeyAgreementKeys: u32 = 10u32; pub const MaxVerificationKeysToRevoke: u32 = 10u32; pub const MaxUrlLength: u32 = 200u32; + pub const MaxUrlsEndpointCounts: u32 = 3u32; } impl did::Config for Runtime { @@ -700,6 +701,7 @@ impl did::Config for Runtime { type MaxNewKeyAgreementKeys = MaxNewKeyAgreementKeys; type MaxVerificationKeysToRevoke = MaxVerificationKeysToRevoke; type MaxUrlLength = MaxUrlLength; + type MaxEndpointUrlsCount = MaxUrlsEndpointCounts; type WeightInfo = weights::did::WeightInfo; } diff --git a/runtimes/peregrine/src/weights/did.rs b/runtimes/peregrine/src/weights/did.rs index 08ec0b725d..88109a2ffe 100644 --- a/runtimes/peregrine/src/weights/did.rs +++ b/runtimes/peregrine/src/weights/did.rs @@ -19,7 +19,7 @@ //! Autogenerated weights for did //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-08-04, STEPS: `[1, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-08-05, STEPS: `[1, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -49,79 +49,91 @@ use sp_std::marker::PhantomData; /// Weights for did using the recommended hardware. pub struct WeightInfo(PhantomData); impl did::WeightInfo for WeightInfo { - fn create_ed25519_keys(n: u32, u: u32, ) -> Weight { - (125_979_000_u64) - // Standard Error: 84_000 - .saturating_add((2_372_000_u64).saturating_mul(n as Weight)) - // Standard Error: 3_000 - .saturating_add((8_000_u64).saturating_mul(u as Weight)) + fn create_ed25519_keys(n: u32, u: u32, c: u32, ) -> Weight { + (119_310_000_u64) + // Standard Error: 23_000 + .saturating_add((2_712_000_u64).saturating_mul(n as Weight)) + // Standard Error: 1_000 + .saturating_add((22_000_u64).saturating_mul(u as Weight)) + // Standard Error: 104_000 + .saturating_add((2_170_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn create_sr25519_keys(n: u32, u: u32, ) -> Weight { - (124_731_000_u64) - // Standard Error: 57_000 - .saturating_add((2_682_000_u64).saturating_mul(n as Weight)) - // Standard Error: 2_000 - .saturating_add((13_000_u64).saturating_mul(u as Weight)) + fn create_sr25519_keys(n: u32, u: u32, _c: u32, ) -> Weight { + (135_322_000_u64) + // Standard Error: 96_000 + .saturating_add((2_885_000_u64).saturating_mul(n as Weight)) + // Standard Error: 4_000 + .saturating_add((26_000_u64).saturating_mul(u as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn create_ecdsa_keys(n: u32, u: u32, ) -> Weight { - (262_279_000_u64) - // Standard Error: 209_000 - .saturating_add((1_404_000_u64).saturating_mul(n as Weight)) - // Standard Error: 9_000 - .saturating_add((2_000_u64).saturating_mul(u as Weight)) + fn create_ecdsa_keys(n: u32, u: u32, c: u32, ) -> Weight { + (252_507_000_u64) + // Standard Error: 111_000 + .saturating_add((2_516_000_u64).saturating_mul(n as Weight)) + // Standard Error: 5_000 + .saturating_add((4_000_u64).saturating_mul(u as Weight)) + // Standard Error: 502_000 + .saturating_add((1_663_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_ed25519_keys(n: u32, m: u32, _u: u32, ) -> Weight { - (39_215_000_u64) - // Standard Error: 46_000 - .saturating_add((4_467_000_u64).saturating_mul(n as Weight)) - // Standard Error: 46_000 - .saturating_add((2_842_000_u64).saturating_mul(m as Weight)) + fn update_ed25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (46_422_000_u64) + // Standard Error: 52_000 + .saturating_add((4_590_000_u64).saturating_mul(n as Weight)) + // Standard Error: 52_000 + .saturating_add((2_147_000_u64).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((2_000_u64).saturating_mul(u as Weight)) + // Standard Error: 237_000 + .saturating_add((1_038_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_sr25519_keys(n: u32, m: u32, u: u32, ) -> Weight { - (32_203_000_u64) - // Standard Error: 145_000 - .saturating_add((4_900_000_u64).saturating_mul(n as Weight)) - // Standard Error: 145_000 - .saturating_add((3_101_000_u64).saturating_mul(m as Weight)) - // Standard Error: 6_000 - .saturating_add((18_000_u64).saturating_mul(u as Weight)) + fn update_sr25519_keys(n: u32, m: u32, u: u32, c: u32, ) -> Weight { + (43_904_000_u64) + // Standard Error: 47_000 + .saturating_add((4_510_000_u64).saturating_mul(n as Weight)) + // Standard Error: 47_000 + .saturating_add((2_511_000_u64).saturating_mul(m as Weight)) + // Standard Error: 2_000 + .saturating_add((2_000_u64).saturating_mul(u as Weight)) + // Standard Error: 213_000 + .saturating_add((893_000_u64).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - fn update_ecdsa_keys(n: u32, m: u32, _u: u32, ) -> Weight { - (48_996_000_u64) - // Standard Error: 128_000 - .saturating_add((4_504_000_u64).saturating_mul(n as Weight)) - // Standard Error: 128_000 - .saturating_add((2_235_000_u64).saturating_mul(m as Weight)) + fn update_ecdsa_keys(n: u32, m: u32, u: u32, _c: u32, ) -> Weight { + (47_917_000_u64) + // Standard Error: 79_000 + .saturating_add((4_531_000_u64).saturating_mul(n as Weight)) + // Standard Error: 79_000 + .saturating_add((2_648_000_u64).saturating_mul(m as Weight)) + // Standard Error: 3_000 + .saturating_add((6_000_u64).saturating_mul(u as Weight)) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn delete() -> Weight { - (32_491_000_u64) + (33_142_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_ed25519_key() -> Weight { - (112_430_000_u64) + (113_963_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_sr25519_key() -> Weight { - (114_584_000_u64) + (117_320_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } fn submit_did_call_ecdsa_key() -> Weight { - (234_789_000_u64) + (241_051_000_u64) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } diff --git a/runtimes/spiritnet/src/lib.rs b/runtimes/spiritnet/src/lib.rs index b7613f5392..e881c7c16b 100644 --- a/runtimes/spiritnet/src/lib.rs +++ b/runtimes/spiritnet/src/lib.rs @@ -102,7 +102,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kilt-spiritnet"), impl_name: create_runtime_str!("kilt-spiritnet"), authoring_version: 1, - spec_version: 18, + spec_version: 19, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/runtimes/standalone/src/lib.rs b/runtimes/standalone/src/lib.rs index 56aa463ac2..c10a871ed0 100644 --- a/runtimes/standalone/src/lib.rs +++ b/runtimes/standalone/src/lib.rs @@ -109,7 +109,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("mashnet-node"), impl_name: create_runtime_str!("mashnet-node"), authoring_version: 4, - spec_version: 18, + spec_version: 19, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -364,6 +364,7 @@ parameter_types! { pub const MaxNewKeyAgreementKeys: u32 = 10u32; pub const MaxVerificationKeysToRevoke: u32 = 10u32; pub const MaxUrlLength: u32 = 200u32; + pub const MaxUrlsEndpointCounts: u32 = 3u32; } impl did::Config for Runtime { @@ -378,6 +379,7 @@ impl did::Config for Runtime { type MaxNewKeyAgreementKeys = MaxNewKeyAgreementKeys; type MaxVerificationKeysToRevoke = MaxVerificationKeysToRevoke; type MaxUrlLength = MaxUrlLength; + type MaxEndpointUrlsCount = MaxUrlsEndpointCounts; type WeightInfo = (); }