diff --git a/Cargo.lock b/Cargo.lock index ea23b6391433b..a68f014e98ea2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,7 +322,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -342,12 +342,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - [[package]] name = "autocfg" version = "1.0.1" @@ -428,12 +422,14 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" -version = "0.17.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +checksum = "f5011ffc90248764d7005b0e10c7294f5aa1bd87d9dd7248f4ad475b347c294d" dependencies = [ - "either", + "funty", "radium", + "tap", + "wyz", ] [[package]] @@ -563,9 +559,9 @@ checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "byte-slice-cast" -version = "0.3.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" +checksum = "65c1bf4a04a88c54f589125563643d773f3254b5c38571395e2b591c693bbc81" [[package]] name = "byte-tools" @@ -575,9 +571,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" @@ -1000,7 +996,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", @@ -1040,7 +1036,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "lazy_static", ] @@ -1051,7 +1047,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec91540d98355f690a86367e566ecad2e9e579f230230eb7c21398372be73ea5" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 1.0.0", "const_fn", "lazy_static", @@ -1471,18 +1467,18 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b" +checksum = "2cd795898c348a8ec9edc66ec9e014031c764d4c88cc26d09b492cd93eb41339" dependencies = [ "either", "futures 0.3.9", - "futures-timer 2.0.2", + "futures-timer 3.0.2", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.9.0", - "rand 0.6.5", + "parking_lot 0.11.1", + "rand 0.8.1", ] [[package]] @@ -1770,6 +1766,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "futures" version = "0.1.30" @@ -2429,9 +2431,9 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" +checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed" dependencies = [ "parity-scale-codec", ] @@ -2473,7 +2475,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ - "autocfg 1.0.1", + "autocfg", "hashbrown", "serde", ] @@ -2733,9 +2735,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92312348daade49976a6dc59263ad39ed54f840aacb5664874f7c9aa16e5f848" +checksum = "8891bd853eff90e33024195d79d578dc984c82f9e0715fcd2b525a0c19d52811" dependencies = [ "parity-util-mem", "smallvec 1.5.0", @@ -2743,9 +2745,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986052a8d16c692eaebe775391f9a3ac26714f3907132658500b601dec94c8c2" +checksum = "30a0da8e08caf08d384a620ec19bb6c9b85c84137248e202617fb91881f25912" dependencies = [ "kvdb", "parity-util-mem", @@ -2754,9 +2756,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d92c36be64baba5ea549116ff0d7ffd445456a7be8aaee21ec05882b980cd11" +checksum = "34446c373ccc494c2124439281c198c7636ccdc2752c06722bbffd56d459c1e4" dependencies = [ "fs-swap", "kvdb", @@ -2772,9 +2774,9 @@ dependencies = [ [[package]] name = "kvdb-web" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7bfe11b3202691673766b1224c432996f6b8047db17ceb743675bef3404e714" +checksum = "eb1e98ba343d0b35f9009a8844cd2b87fa3192f7e79033ac05b00aeae0f3b0b5" dependencies = [ "futures 0.3.9", "js-sys", @@ -3433,14 +3435,14 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "memory-db" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbd2a22f201c03cc1706a727842490abfea17b7b53260358239828208daba3c" +checksum = "814bbecfc0451fc314eeea34f05bbcd5b98a7ad7af37faee088b86a1e633f1d4" dependencies = [ "hash-db", "hashbrown", @@ -3492,7 +3494,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -4141,7 +4143,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-integer", "num-traits", ] @@ -4152,7 +4154,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-traits", ] @@ -4162,7 +4164,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-traits", ] @@ -4172,7 +4174,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-bigint", "num-integer", "num-traits", @@ -4184,7 +4186,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1", + "autocfg", "libm", ] @@ -4460,7 +4462,7 @@ dependencies = [ "pretty_assertions", "pwasm-utils 0.16.0", "rand 0.7.3", - "rand_pcg 0.2.1", + "rand_pcg", "serde", "sp-core", "sp-io", @@ -5245,9 +5247,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "1.3.6" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79602888a81ace83e3d1d4b2873286c1f5f906c84db667594e8db8da3506c383" +checksum = "75c823fdae1bb5ff5708ee61a62697e6296175dc671710876871c853f48592b3" dependencies = [ "arrayvec 0.5.2", "bitvec", @@ -5258,9 +5260,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "1.2.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db82bb1c18fc00176004462dd809b2a6d851669550aa17af6dacd21ae0c14" +checksum = "9029e65297c7fd6d7013f0579e193ec2b34ae78eabca854c9417504ad8a2d214" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5295,9 +5297,9 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f17f15cb05897127bf36a240085a1f0bbef7bce3024849eccf7f93f6171bc27" +checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" dependencies = [ "cfg-if 1.0.0", "hashbrown", @@ -5716,9 +5718,9 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3824ae2c5e27160113b9e029a10ec9e3f0237bad8029f69c7724393c9fdefd8" +checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" dependencies = [ "fixed-hash", "impl-codec", @@ -5936,9 +5938,9 @@ dependencies = [ [[package]] name = "radium" -version = "0.3.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "e9e006811e1fdd12672b0820a7f44c18dde429f367d50cec003d22aa9b3c8ddc" [[package]] name = "rand" @@ -5963,25 +5965,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg 0.1.2", - "rand_xorshift", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -5993,7 +5976,7 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", - "rand_pcg 0.2.1", + "rand_pcg", ] [[package]] @@ -6005,16 +5988,7 @@ dependencies = [ "libc", "rand_chacha 0.3.0", "rand_core 0.6.1", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", + "rand_hc 0.3.0", ] [[package]] @@ -6079,15 +6053,6 @@ dependencies = [ "rand 0.7.3", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -6098,47 +6063,12 @@ dependencies = [ ] [[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi 0.0.3", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", + "rand_core 0.6.1", ] [[package]] @@ -6150,15 +6080,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "raw-cpuid" version = "7.0.3" @@ -6182,7 +6103,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ - "autocfg 1.0.1", + "autocfg", "crossbeam-deque 0.8.0", "either", "rayon-core", @@ -9231,6 +9152,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +[[package]] +name = "tap" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" + [[package]] name = "target-lexicon" version = "0.10.0" @@ -9754,9 +9681,9 @@ checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trie-bench" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d03b477b8837fd2e6bd17df374e5de60959c54058208de98833347c02b778c" +checksum = "568257edb909a5c532b1f4ab38ee6b5dedfbf8775be6a55a29020513ebe3e072" dependencies = [ "criterion", "hash-db", @@ -10484,6 +10411,12 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "x25519-dalek" version = "1.1.0" diff --git a/bin/node-template/pallets/template/Cargo.toml b/bin/node-template/pallets/template/Cargo.toml index d4e6636c64f54..a2f0011b54220 100644 --- a/bin/node-template/pallets/template/Cargo.toml +++ b/bin/node-template/pallets/template/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [dev-dependencies] serde = { version = "1.0.101" } diff --git a/bin/node-template/runtime/Cargo.toml b/bin/node-template/runtime/Cargo.toml index 7cf1519941dc8..3f860655cb5fe 100644 --- a/bin/node-template/runtime/Cargo.toml +++ b/bin/node-template/runtime/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } pallet-aura = { version = "2.0.0", default-features = false, path = "../../../frame/aura" } pallet-balances = { version = "2.0.0", default-features = false, path = "../../../frame/balances" } diff --git a/bin/node/bench/Cargo.toml b/bin/node/bench/Cargo.toml index 06d89ff7d0d55..a9c52324a047e 100644 --- a/bin/node/bench/Cargo.toml +++ b/bin/node/bench/Cargo.toml @@ -21,8 +21,8 @@ serde = "1.0.101" serde_json = "1.0.41" structopt = "0.3" derive_more = "0.99.2" -kvdb = "0.8.0" -kvdb-rocksdb = "0.10.0" +kvdb = "0.9.0" +kvdb-rocksdb = "0.11.0" sp-trie = { version = "2.0.0", path = "../../../primitives/trie" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" } @@ -37,7 +37,7 @@ fs_extra = "1" hex = "0.4.0" rand = { version = "0.7.2", features = ["small_rng"] } lazy_static = "1.4.0" -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } parity-db = { version = "0.1.2" } sc-transaction-pool = { version = "2.0.0", path = "../../../client/transaction-pool" } futures = { version = "0.3.4", features = ["thread-pool"] } diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 4c245dcf629fb..af27b52377a43 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -34,7 +34,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] # third-party dependencies -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } serde = { version = "1.0.102", features = ["derive"] } futures = { version = "0.3.9", features = ["compat"] } hex-literal = "0.3.1" diff --git a/bin/node/executor/Cargo.toml b/bin/node/executor/Cargo.toml index a2177ac9cd79d..36af51bd80fdc 100644 --- a/bin/node/executor/Cargo.toml +++ b/bin/node/executor/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } node-primitives = { version = "2.0.0", path = "../primitives" } node-runtime = { version = "2.0.0", path = "../runtime" } sc-executor = { version = "0.8.0", path = "../../../client/executor" } diff --git a/bin/node/inspect/Cargo.toml b/bin/node/inspect/Cargo.toml index 7f94e15bb8fc8..14acb18956016 100644 --- a/bin/node/inspect/Cargo.toml +++ b/bin/node/inspect/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } derive_more = "0.99" log = "0.4.8" sc-cli = { version = "0.8.0", path = "../../../client/cli" } diff --git a/bin/node/primitives/Cargo.toml b/bin/node/primitives/Cargo.toml index db28472087fe2..7a4b29cacea30 100644 --- a/bin/node/primitives/Cargo.toml +++ b/bin/node/primitives/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/paritytech/substrate/" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-system = { version = "2.0.0", default-features = false, path = "../../../frame/system" } sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../../primitives/application-crypto" } sp-core = { version = "2.0.0", default-features = false, path = "../../../primitives/core" } diff --git a/bin/node/runtime/Cargo.toml b/bin/node/runtime/Cargo.toml index 6ff98e5b3aa2f..d6b38802fe691 100644 --- a/bin/node/runtime/Cargo.toml +++ b/bin/node/runtime/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # third-party dependencies -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.102", optional = true } static_assertions = "1.1.0" hex-literal = { version = "0.3.1", optional = true } diff --git a/bin/node/testing/Cargo.toml b/bin/node/testing/Cargo.toml index f6cf92d77e8e8..e92e475952df3 100644 --- a/bin/node/testing/Cargo.toml +++ b/bin/node/testing/Cargo.toml @@ -17,7 +17,7 @@ pallet-balances = { version = "2.0.0", path = "../../../frame/balances" } sc-service = { version = "0.8.0", features = ["test-helpers", "db"], path = "../../../client/service" } sc-client-db = { version = "0.8.0", path = "../../../client/db/", features = ["kvdb-rocksdb", "parity-db"] } sc-client-api = { version = "2.0.0", path = "../../../client/api/" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" } pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" } pallet-indices = { version = "2.0.0", path = "../../../frame/indices" } diff --git a/client/api/Cargo.toml b/client/api/Cargo.toml index 205d5a51cde34..4ccdbc5415635 100644 --- a/client/api/Cargo.toml +++ b/client/api/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" } derive_more = "0.99.2" sc-executor = { version = "0.8.0", path = "../executor" } @@ -24,7 +24,7 @@ futures = "0.3.1" hash-db = { version = "0.15.2", default-features = false } sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } -kvdb = "0.8.0" +kvdb = "0.9.0" log = "0.4.8" parking_lot = "0.11.1" lazy_static = "1.4.0" @@ -43,7 +43,7 @@ sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction- prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0", path = "../../utils/prometheus" } [dev-dependencies] -kvdb-memorydb = "0.8.0" +kvdb-memorydb = "0.9.0" sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" } substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" } thiserror = "1.0.21" diff --git a/client/api/src/execution_extensions.rs b/client/api/src/execution_extensions.rs index 68b412a0d778b..1b13f2c6cffd2 100644 --- a/client/api/src/execution_extensions.rs +++ b/client/api/src/execution_extensions.rs @@ -213,7 +213,7 @@ impl offchain::TransactionPool for TransactionPoolAdapter< let xt = match Block::Extrinsic::decode(&mut &*data) { Ok(xt) => xt, Err(e) => { - log::warn!("Unable to decode extrinsic: {:?}: {}", data, e.what()); + log::warn!("Unable to decode extrinsic: {:?}: {}", data, e); return Err(()); }, }; diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index d2ba2cf4152fc..d4b82f3238064 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -18,7 +18,7 @@ prost-build = "0.7" [dependencies] async-trait = "0.1" -codec = { package = "parity-scale-codec", default-features = false, version = "1.3.6" } +codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" } derive_more = "0.99.2" either = "1.5.3" futures = "0.3.9" diff --git a/client/basic-authorship/Cargo.toml b/client/basic-authorship/Cargo.toml index c1df76253a46a..2c0e8a2d1c5e2 100644 --- a/client/basic-authorship/Cargo.toml +++ b/client/basic-authorship/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } futures = "0.3.9" futures-timer = "3.0.1" log = "0.4.8" diff --git a/client/block-builder/Cargo.toml b/client/block-builder/Cargo.toml index 64a82505a9fa4..b0a20857b86d3 100644 --- a/client/block-builder/Cargo.toml +++ b/client/block-builder/Cargo.toml @@ -23,7 +23,7 @@ sp-core = { version = "2.0.0", path = "../../primitives/core" } sp-block-builder = { version = "2.0.0", path = "../../primitives/block-builder" } sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" } sc-client-api = { version = "2.0.0", path = "../api" } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } [dev-dependencies] substrate-test-runtime-client = { path = "../../test-utils/runtime/client" } diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index e7144d330c693..3903ebf21d5d2 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -22,7 +22,7 @@ serde_json = "1.0.41" sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } sp-chain-spec = { version = "2.0.0", path = "../../primitives/chain-spec" } sc-telemetry = { version = "2.0.0", path = "../telemetry" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-consensus-babe = { version = "0.8.0-rc6", path = "../consensus/babe" } sp-consensus-babe = { version = "0.8.0-rc6", path = "../../primitives/consensus/babe" } sc-consensus-epochs = { version = "0.8.0-rc6", path = "../consensus/epochs" } diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 17390a5f225c4..48b038981d935 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -19,7 +19,7 @@ tokio = { version = "0.2.21", features = [ "signal", "rt-core", "rt-threaded", " futures = "0.3.9" fdlimit = "0.2.1" libp2p = "0.34.0" -parity-scale-codec = "1.3.6" +parity-scale-codec = "2.0.0" hex = "0.4.2" rand = "0.7.3" tiny-bip39 = "0.8.0" diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index 3b8241480a8d2..55b6bb5e0660d 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -18,7 +18,7 @@ sp-consensus-aura = { version = "0.8.0", path = "../../../primitives/consensus/a sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" } sc-block-builder = { version = "0.8.0", path = "../../block-builder" } sc-client-api = { version = "2.0.0", path = "../../api" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" } sp-consensus-slots = { version = "0.8.0", path = "../../../primitives/consensus/slots" } derive_more = "0.99.2" diff --git a/client/consensus/babe/Cargo.toml b/client/consensus/babe/Cargo.toml index 52d84435407cd..de73d869fe70e 100644 --- a/client/consensus/babe/Cargo.toml +++ b/client/consensus/babe/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } sp-consensus-babe = { version = "0.8.0", path = "../../../primitives/consensus/babe" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" } diff --git a/client/consensus/babe/src/aux_schema.rs b/client/consensus/babe/src/aux_schema.rs index acc8d57cc9333..7d5df77c92176 100644 --- a/client/consensus/babe/src/aux_schema.rs +++ b/client/consensus/babe/src/aux_schema.rs @@ -44,7 +44,7 @@ fn load_decode(backend: &B, key: &[u8]) -> ClientResult> T: Decode, { let corrupt = |e: codec::Error| { - ClientError::Backend(format!("BABE DB is corrupted. Decode error: {}", e.what())) + ClientError::Backend(format!("BABE DB is corrupted. Decode error: {}", e)) }; match backend.get_aux(key)? { None => Ok(None), diff --git a/client/consensus/epochs/Cargo.toml b/client/consensus/epochs/Cargo.toml index 752280e3547dd..7d1f74ab76d61 100644 --- a/client/consensus/epochs/Cargo.toml +++ b/client/consensus/epochs/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } parking_lot = "0.11.1" fork-tree = { version = "2.0.0", path = "../../../utils/fork-tree" } sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0"} diff --git a/client/consensus/manual-seal/Cargo.toml b/client/consensus/manual-seal/Cargo.toml index e725465b04285..737e4c4ff24c1 100644 --- a/client/consensus/manual-seal/Cargo.toml +++ b/client/consensus/manual-seal/Cargo.toml @@ -20,7 +20,7 @@ jsonrpc-core-client = "15.1.0" jsonrpc-derive = "15.1.0" log = "0.4.8" parking_lot = "0.11.1" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } serde = { version = "1.0", features=["derive"] } assert_matches = "1.3.0" diff --git a/client/consensus/pow/Cargo.toml b/client/consensus/pow/Cargo.toml index b5112f9fa628f..2aae25ef931fe 100644 --- a/client/consensus/pow/Cargo.toml +++ b/client/consensus/pow/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } diff --git a/client/consensus/slots/Cargo.toml b/client/consensus/slots/Cargo.toml index bdf28f35236b2..03bf48bd6246f 100644 --- a/client/consensus/slots/Cargo.toml +++ b/client/consensus/slots/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-client-api = { version = "2.0.0", path = "../../api" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-trie = { version = "2.0.0", path = "../../../primitives/trie" } diff --git a/client/consensus/slots/src/aux_schema.rs b/client/consensus/slots/src/aux_schema.rs index 70a137de43303..db94ec48855e4 100644 --- a/client/consensus/slots/src/aux_schema.rs +++ b/client/consensus/slots/src/aux_schema.rs @@ -41,7 +41,7 @@ fn load_decode(backend: &C, key: &[u8]) -> ClientResult> None => Ok(None), Some(t) => T::decode(&mut &t[..]) .map_err( - |e| ClientError::Backend(format!("Slots DB is corrupted. Decode error: {}", e.what())), + |e| ClientError::Backend(format!("Slots DB is corrupted. Decode error: {}", e)), ) .map(Some) } diff --git a/client/db/Cargo.toml b/client/db/Cargo.toml index 23f6fa9b1f628..33c70894c4330 100644 --- a/client/db/Cargo.toml +++ b/client/db/Cargo.toml @@ -15,13 +15,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] parking_lot = "0.11.1" log = "0.4.8" -kvdb = "0.8.0" -kvdb-rocksdb = { version = "0.10.0", optional = true } -kvdb-memorydb = "0.8.0" +kvdb = "0.9.0" +kvdb-rocksdb = { version = "0.11.0", optional = true } +kvdb-memorydb = "0.9.0" linked-hash-map = "0.5.2" hash-db = "0.15.2" -parity-util-mem = { version = "0.8.0", default-features = false, features = ["std"] } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["std"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } blake2-rfc = "0.2.18" sc-client-api = { version = "2.0.0", path = "../api" } @@ -43,7 +43,7 @@ sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } sp-tracing = { version = "2.0.0", path = "../../primitives/tracing" } substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } quickcheck = "0.9" -kvdb-rocksdb = "0.10.0" +kvdb-rocksdb = "0.11.0" tempfile = "3" [features] diff --git a/client/executor/Cargo.toml b/client/executor/Cargo.toml index 8cfbe8d600d49..bfa50518aeebf 100644 --- a/client/executor/Cargo.toml +++ b/client/executor/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] derive_more = "0.99.2" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sp-io = { version = "2.0.0", path = "../../primitives/io" } sp-core = { version = "2.0.0", path = "../../primitives/core" } sp-tasks = { version = "2.0.0", path = "../../primitives/tasks" } diff --git a/client/executor/common/Cargo.toml b/client/executor/common/Cargo.toml index a479f4e1f4ddb..b8f735f0c1798 100644 --- a/client/executor/common/Cargo.toml +++ b/client/executor/common/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] derive_more = "0.99.2" parity-wasm = "0.41.0" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } wasmi = "0.6.2" sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-allocator = { version = "2.0.0", path = "../../../primitives/allocator" } diff --git a/client/executor/wasmi/Cargo.toml b/client/executor/wasmi/Cargo.toml index 38d1cf3072a1e..ea571b91f12bc 100644 --- a/client/executor/wasmi/Cargo.toml +++ b/client/executor/wasmi/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = "0.4.8" wasmi = "0.6.2" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-executor-common = { version = "0.8.0", path = "../common" } sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" } sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" } diff --git a/client/executor/wasmtime/Cargo.toml b/client/executor/wasmtime/Cargo.toml index 071cbc66001d6..dcd162c900fb6 100644 --- a/client/executor/wasmtime/Cargo.toml +++ b/client/executor/wasmtime/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] log = "0.4.8" scoped-tls = "1.0" parity-wasm = "0.41.0" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-executor-common = { version = "0.8.0", path = "../common" } sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" } sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" } diff --git a/client/finality-grandpa-warp-sync/Cargo.toml b/client/finality-grandpa-warp-sync/Cargo.toml index 4f7ee0301f417..38aa08f4a2bb9 100644 --- a/client/finality-grandpa-warp-sync/Cargo.toml +++ b/client/finality-grandpa-warp-sync/Cargo.toml @@ -22,7 +22,7 @@ sc-service = { version = "0.8.0", path = "../service" } futures = "0.3.8" log = "0.4.11" derive_more = "0.99.11" -codec = { package = "parity-scale-codec", version = "1.3.5" } +codec = { package = "parity-scale-codec", version = "2.0.0" } prost = "0.6.1" num-traits = "0.2.14" parking_lot = "0.11.1" diff --git a/client/finality-grandpa/Cargo.toml b/client/finality-grandpa/Cargo.toml index 1b410b32013a3..951c6f93b5a7d 100644 --- a/client/finality-grandpa/Cargo.toml +++ b/client/finality-grandpa/Cargo.toml @@ -22,7 +22,7 @@ futures-timer = "3.0.1" log = "0.4.8" parking_lot = "0.11.1" rand = "0.7.2" -parity-scale-codec = { version = "1.3.6", features = ["derive"] } +parity-scale-codec = { version = "2.0.0", features = ["derive"] } sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" } sp-arithmetic = { version = "2.0.0", path = "../../primitives/arithmetic" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } @@ -43,13 +43,13 @@ sc-network-gossip = { version = "0.8.0", path = "../network-gossip" } sp-finality-grandpa = { version = "2.0.0", path = "../../primitives/finality-grandpa" } prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"} sc-block-builder = { version = "0.8.0", path = "../block-builder" } -finality-grandpa = { version = "0.12.3", features = ["derive-codec"] } +finality-grandpa = { version = "0.13.0", features = ["derive-codec"] } pin-project = "0.4.6" linked-hash-map = "0.5.2" [dev-dependencies] assert_matches = "1.3.0" -finality-grandpa = { version = "0.12.3", features = ["derive-codec", "test-helpers"] } +finality-grandpa = { version = "0.13.0", features = ["derive-codec", "test-helpers"] } sc-network = { version = "0.8.0", path = "../network" } sc-network-test = { version = "0.8.0", path = "../network/test" } sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } diff --git a/client/finality-grandpa/rpc/Cargo.toml b/client/finality-grandpa/rpc/Cargo.toml index 52f6b094a8dd9..c8d18d6595c1b 100644 --- a/client/finality-grandpa/rpc/Cargo.toml +++ b/client/finality-grandpa/rpc/Cargo.toml @@ -14,7 +14,7 @@ sc-rpc = { version = "2.0.0", path = "../../rpc" } sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } -finality-grandpa = { version = "0.12.3", features = ["derive-codec"] } +finality-grandpa = { version = "0.13.0", features = ["derive-codec"] } jsonrpc-core = "15.1.0" jsonrpc-core-client = "15.1.0" jsonrpc-derive = "15.1.0" @@ -24,7 +24,7 @@ serde = { version = "1.0.105", features = ["derive"] } serde_json = "1.0.50" log = "0.4.8" derive_more = "0.99.2" -parity-scale-codec = { version = "1.3.6", features = ["derive"] } +parity-scale-codec = { version = "2.0.0", features = ["derive"] } sc-client-api = { version = "2.0.0", path = "../../api" } [dev-dependencies] diff --git a/client/finality-grandpa/src/aux_schema.rs b/client/finality-grandpa/src/aux_schema.rs index a5092334b99f5..1ce3c7999f24c 100644 --- a/client/finality-grandpa/src/aux_schema.rs +++ b/client/finality-grandpa/src/aux_schema.rs @@ -143,7 +143,7 @@ pub(crate) fn load_decode( match backend.get_aux(key)? { None => Ok(None), Some(t) => T::decode(&mut &t[..]) - .map_err(|e| ClientError::Backend(format!("GRANDPA DB is corrupted: {}", e.what()))) + .map_err(|e| ClientError::Backend(format!("GRANDPA DB is corrupted: {}", e))) .map(Some) } } diff --git a/client/finality-grandpa/src/communication/gossip.rs b/client/finality-grandpa/src/communication/gossip.rs index c217218aecc4f..1e616f3fa3f17 100644 --- a/client/finality-grandpa/src/communication/gossip.rs +++ b/client/finality-grandpa/src/communication/gossip.rs @@ -370,7 +370,7 @@ pub(super) struct NeighborPacket { /// A versioned neighbor packet. #[derive(Debug, Encode, Decode)] pub(super) enum VersionedNeighborPacket { - #[codec(index = "1")] + #[codec(index = 1)] V1(NeighborPacket), } @@ -1415,7 +1415,7 @@ impl GossipValidator { } Err(e) => { message_name = None; - debug!(target: "afg", "Error decoding message: {}", e.what()); + debug!(target: "afg", "Error decoding message: {}", e); telemetry!(CONSENSUS_DEBUG; "afg.err_decoding_msg"; "" => ""); let len = std::cmp::min(i32::max_value() as usize, data.len()) as i32; diff --git a/client/informant/Cargo.toml b/client/informant/Cargo.toml index fe5ae3857f097..9b58b036f054c 100644 --- a/client/informant/Cargo.toml +++ b/client/informant/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] ansi_term = "0.12.1" futures = "0.3.9" log = "0.4.8" -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } sc-client-api = { version = "2.0.0", path = "../api" } sc-network = { version = "0.8.0", path = "../network" } sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" } diff --git a/client/light/Cargo.toml b/client/light/Cargo.toml index 60d16ff0359ce..5ec87419332fa 100644 --- a/client/light/Cargo.toml +++ b/client/light/Cargo.toml @@ -21,7 +21,7 @@ sp-core = { version = "2.0.0", path = "../../primitives/core" } sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine" } sc-client-api = { version = "2.0.0", path = "../api" } sp-api = { version = "2.0.0", path = "../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-executor = { version = "0.8.0", path = "../executor" } [features] diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index bf948ff4dd37d..8c6fc4e668d08 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -22,7 +22,7 @@ async-std = "1.6.5" bitflags = "1.2.0" bs58 = "0.4.0" bytes = "1" -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } derive_more = "0.99.2" either = "1.5.3" erased-serde = "0.3.9" diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs index e0e2e63cad006..60b6a02cc7bab 100644 --- a/client/network/src/protocol.rs +++ b/client/network/src/protocol.rs @@ -656,7 +656,7 @@ impl Protocol { "Couldn't decode packet sent by {}: {:?}: {}", who, data, - err.what(), + err, ); self.peerset_handle.report_peer(who, rep::BAD_MESSAGE); return CustomMessageOutcome::None; @@ -1737,7 +1737,7 @@ impl NetworkBehaviour for Protocol { "Couldn't decode handshake sent by {}: {:?}: {} & {}", peer_id, received_handshake, - err.what(), + err, err2, ); self.peerset_handle.report_peer(peer_id, rep::BAD_MESSAGE); diff --git a/client/network/src/protocol/message.rs b/client/network/src/protocol/message.rs index 3aa1e2cf34a78..3161f91e533c0 100644 --- a/client/network/src/protocol/message.rs +++ b/client/network/src/protocol/message.rs @@ -95,7 +95,7 @@ impl BlockAttributes { } impl Encode for BlockAttributes { - fn encode_to(&self, dest: &mut T) { + fn encode_to(&self, dest: &mut T) { dest.push_byte(self.bits()) } } @@ -198,7 +198,7 @@ pub mod generic { } impl codec::Encode for Roles { - fn encode_to(&self, dest: &mut T) { + fn encode_to(&self, dest: &mut T) { dest.push_byte(self.bits()) } } @@ -282,7 +282,7 @@ pub mod generic { /// Batch of consensus protocol messages. // NOTE: index is incremented by 2 due to finality proof related // messages that were removed. - #[codec(index = "17")] + #[codec(index = 17)] ConsensusBatch(Vec), } @@ -402,7 +402,7 @@ pub mod generic { // This assumes that the packet contains nothing but the announcement message. // TODO: Get rid of it once protocol v4 is common. impl Encode for BlockAnnounce { - fn encode_to(&self, dest: &mut T) { + fn encode_to(&self, dest: &mut T) { self.header.encode_to(dest); if let Some(state) = &self.state { state.encode_to(dest); diff --git a/client/offchain/Cargo.toml b/client/offchain/Cargo.toml index 7d0f01a0c7ed7..b53ff5616db45 100644 --- a/client/offchain/Cargo.toml +++ b/client/offchain/Cargo.toml @@ -23,7 +23,7 @@ log = "0.4.8" threadpool = "1.7" num_cpus = "1.10" sp-offchain = { version = "2.0.0", path = "../../primitives/offchain" } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } parking_lot = "0.11.1" sp-core = { version = "2.0.0", path = "../../primitives/core" } rand = "0.7.2" diff --git a/client/rpc-api/Cargo.toml b/client/rpc-api/Cargo.toml index 546deb1283c57..9e51b8ce6b5ea 100644 --- a/client/rpc-api/Cargo.toml +++ b/client/rpc-api/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } derive_more = "0.99.2" futures = { version = "0.3.1", features = ["compat"] } jsonrpc-core = "15.1.0" diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index bab436c93a7f2..54f0aa78e5c8d 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] sc-rpc-api = { version = "0.8.0", path = "../rpc-api" } sc-client-api = { version = "2.0.0", path = "../api" } sp-api = { version = "2.0.0", path = "../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } futures = { version = "0.3.1", features = ["compat"] } jsonrpc-pubsub = "15.1.0" log = "0.4.8" diff --git a/client/rpc/src/state/state_light.rs b/client/rpc/src/state/state_light.rs index c1294dd27b08f..c8c921345877c 100644 --- a/client/rpc/src/state/state_light.rs +++ b/client/rpc/src/state/state_light.rs @@ -590,7 +590,7 @@ fn runtime_version>( ) .then(|version| ready(version.and_then(|version| Decode::decode(&mut &version.0[..]) - .map_err(|e| client_err(ClientError::VersionInvalid(e.what().into()))) + .map_err(|e| client_err(ClientError::VersionInvalid(e.to_string()))) ))) } diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 95ce02e195f1e..10caca86e6216 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -61,7 +61,7 @@ sc-light = { version = "2.0.0", path = "../light" } sc-client-api = { version = "2.0.0", path = "../api" } sp-api = { version = "2.0.0", path = "../../primitives/api" } sc-client-db = { version = "0.8.0", default-features = false, path = "../db" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-executor = { version = "0.8.0", path = "../executor" } sc-transaction-pool = { version = "2.0.0", path = "../transaction-pool" } sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" } @@ -77,7 +77,7 @@ sc-tracing = { version = "2.0.0", path = "../tracing" } sp-tracing = { version = "2.0.0", path = "../../primitives/tracing" } tracing = "0.1.22" tracing-futures = { version = "0.2.4" } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } [target.'cfg(not(target_os = "unknown"))'.dependencies] tempfile = "3.1.0" diff --git a/client/service/test/Cargo.toml b/client/service/test/Cargo.toml index 8fcd09b8298dd..d1347fa9d3ccf 100644 --- a/client/service/test/Cargo.toml +++ b/client/service/test/Cargo.toml @@ -40,5 +40,5 @@ sc-client-api = { version = "2.0.0", path = "../../api" } sc-block-builder = { version = "0.8.0", path = "../../block-builder" } sc-executor = { version = "0.8.0", path = "../../executor" } sp-panic-handler = { version = "2.0.0", path = "../../../primitives/panic-handler" } -parity-scale-codec = "1.3.6" +parity-scale-codec = "2.0.0" sp-tracing = { version = "2.0.0", path = "../../../primitives/tracing" } diff --git a/client/state-db/Cargo.toml b/client/state-db/Cargo.toml index 26939b769b8a7..d8c022aa4887f 100644 --- a/client/state-db/Cargo.toml +++ b/client/state-db/Cargo.toml @@ -18,6 +18,6 @@ parking_lot = "0.11.1" log = "0.4.11" sc-client-api = { version = "2.0.0", path = "../api" } sp-core = { version = "2.0.0", path = "../../primitives/core" } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } parity-util-mem-derive = "0.1.0" diff --git a/client/state-db/src/lib.rs b/client/state-db/src/lib.rs index 8fd02ee17b996..dd2baf9d18ace 100644 --- a/client/state-db/src/lib.rs +++ b/client/state-db/src/lib.rs @@ -107,7 +107,7 @@ impl fmt::Debug for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Error::Db(e) => e.fmt(f), - Error::Decoding(e) => write!(f, "Error decoding sliceable value: {}", e.what()), + Error::Decoding(e) => write!(f, "Error decoding sliceable value: {}", e), Error::InvalidBlock => write!(f, "Trying to canonicalize invalid block"), Error::InvalidBlockNumber => write!(f, "Trying to insert block with invalid number"), Error::InvalidParent => write!(f, "Trying to insert block with unknown parent"), diff --git a/client/transaction-pool/Cargo.toml b/client/transaction-pool/Cargo.toml index e68e39f5542dd..f424f1777d091 100644 --- a/client/transaction-pool/Cargo.toml +++ b/client/transaction-pool/Cargo.toml @@ -13,13 +13,13 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } thiserror = "1.0.21" futures = { version = "0.3.1", features = ["compat"] } futures-diagnose = "1.0" intervalier = "0.4.0" log = "0.4.8" -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } parking_lot = "0.11.1" prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"} sc-client-api = { version = "2.0.0", path = "../api" } diff --git a/client/transaction-pool/graph/Cargo.toml b/client/transaction-pool/graph/Cargo.toml index f6143f8837bfd..97b35a0706763 100644 --- a/client/transaction-pool/graph/Cargo.toml +++ b/client/transaction-pool/graph/Cargo.toml @@ -25,13 +25,13 @@ sp-utils = { version = "2.0.0", path = "../../../primitives/utils" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } linked-hash-map = "0.5.2" retain_mut = "0.1.2" [dev-dependencies] assert_matches = "1.3.0" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" } criterion = "0.3" diff --git a/frame/assets/Cargo.toml b/frame/assets/Cargo.toml index 4dddd1c59cdea..8c6c55b2d07e8 100644 --- a/frame/assets/Cargo.toml +++ b/frame/assets/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } # Needed for various traits. In our case, `OnFinalize`. sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/atomic-swap/Cargo.toml b/frame/atomic-swap/Cargo.toml index 55d8de86582ac..0f166c9be791a 100644 --- a/frame/atomic-swap/Cargo.toml +++ b/frame/atomic-swap/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/aura/Cargo.toml b/frame/aura/Cargo.toml index cc8e678fb559b..467f684af594a 100644 --- a/frame/aura/Cargo.toml +++ b/frame/aura/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } diff --git a/frame/authority-discovery/Cargo.toml b/frame/authority-discovery/Cargo.toml index 3538d8a5f81ca..5b83de19a515d 100644 --- a/frame/authority-discovery/Cargo.toml +++ b/frame/authority-discovery/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-authority-discovery = { version = "2.0.0", default-features = false, path = "../../primitives/authority-discovery" } sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } pallet-session = { version = "2.0.0", features = ["historical" ], path = "../session", default-features = false } diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index 64e3fb12b0d4e..04c95d02a6435 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } sp-authorship = { version = "2.0.0", default-features = false, path = "../../primitives/authorship" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } diff --git a/frame/babe/Cargo.toml b/frame/babe/Cargo.toml index 13ac2e4034c9f..787835e33fe04 100644 --- a/frame/babe/Cargo.toml +++ b/frame/babe/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index 82f0e3f6b0750..1105950ccfdaa 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true } diff --git a/frame/benchmarking/Cargo.toml b/frame/benchmarking/Cargo.toml index e045f259be77e..960c7d731f0b9 100644 --- a/frame/benchmarking/Cargo.toml +++ b/frame/benchmarking/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] linregress = { version = "0.4.0", optional = true } paste = "0.1" -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-api = { version = "2.0.0", path = "../../primitives/api", default-features = false } sp-runtime-interface = { version = "2.0.0", path = "../../primitives/runtime-interface", default-features = false } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime", default-features = false } diff --git a/frame/bounties/Cargo.toml b/frame/bounties/Cargo.toml index 0e37e3b9d4a57..83a47087db49d 100644 --- a/frame/bounties/Cargo.toml +++ b/frame/bounties/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/collective/Cargo.toml b/frame/collective/Cargo.toml index 47f8414ef4bb6..400321d7c70f4 100644 --- a/frame/collective/Cargo.toml +++ b/frame/collective/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/contracts/Cargo.toml b/frame/contracts/Cargo.toml index 710258037e7aa..d9e4f0d0e7edd 100644 --- a/frame/contracts/Cargo.toml +++ b/frame/contracts/Cargo.toml @@ -16,7 +16,7 @@ publish = false targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } diff --git a/frame/contracts/common/Cargo.toml b/frame/contracts/common/Cargo.toml index ff5f38637765d..8ef6022db9f07 100644 --- a/frame/contracts/common/Cargo.toml +++ b/frame/contracts/common/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # This crate should not rely on any of the frame primitives. bitflags = "1.0" -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } diff --git a/frame/contracts/rpc/Cargo.toml b/frame/contracts/rpc/Cargo.toml index 39c3b373c8cf8..c714f0002a829 100644 --- a/frame/contracts/rpc/Cargo.toml +++ b/frame/contracts/rpc/Cargo.toml @@ -14,7 +14,7 @@ publish = false targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } jsonrpc-core = "15.1.0" jsonrpc-core-client = "15.1.0" jsonrpc-derive = "15.1.0" diff --git a/frame/contracts/rpc/runtime-api/Cargo.toml b/frame/contracts/rpc/runtime-api/Cargo.toml index fe1cb91b84535..7d7c7bd4f5ed2 100644 --- a/frame/contracts/rpc/runtime-api/Cargo.toml +++ b/frame/contracts/rpc/runtime-api/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../../../primitives/runtime" } pallet-contracts-primitives = { version = "2.0.0", default-features = false, path = "../../common" } diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index a633829225459..6a67b9545185c 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/democracy/src/vote.rs b/frame/democracy/src/vote.rs index fdf13b944d62e..5adc76f4ae00b 100644 --- a/frame/democracy/src/vote.rs +++ b/frame/democracy/src/vote.rs @@ -30,7 +30,7 @@ pub struct Vote { } impl Encode for Vote { - fn encode_to(&self, output: &mut T) { + fn encode_to(&self, output: &mut T) { output.push_byte(u8::from(self.conviction) | if self.aye { 0b1000_0000 } else { 0 }); } } diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 2571dff7c8904..2103196ce5587 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } sp-npos-elections = { version = "2.0.0", default-features = false, path = "../../primitives/npos-elections" } diff --git a/frame/elections/Cargo.toml b/frame/elections/Cargo.toml index 90e69ea212754..becb519be0a9d 100644 --- a/frame/elections/Cargo.toml +++ b/frame/elections/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/example-offchain-worker/Cargo.toml b/frame/example-offchain-worker/Cargo.toml index be3c03e4c4541..db52d4760670b 100644 --- a/frame/example-offchain-worker/Cargo.toml +++ b/frame/example-offchain-worker/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } diff --git a/frame/example-parallel/Cargo.toml b/frame/example-parallel/Cargo.toml index ee816d963be98..359a295b1687b 100644 --- a/frame/example-parallel/Cargo.toml +++ b/frame/example-parallel/Cargo.toml @@ -12,7 +12,7 @@ description = "FRAME example pallet using runtime worker threads" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/example/Cargo.toml b/frame/example/Cargo.toml index e805a27a96b82..59828c3eae835 100644 --- a/frame/example/Cargo.toml +++ b/frame/example/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } diff --git a/frame/executive/Cargo.toml b/frame/executive/Cargo.toml index 3f9820b5f3f57..6ee378b222ca3 100644 --- a/frame/executive/Cargo.toml +++ b/frame/executive/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } serde = { version = "1.0.101", optional = true } diff --git a/frame/grandpa/Cargo.toml b/frame/grandpa/Cargo.toml index c6a76de23e454..f4d11543797c0 100644 --- a/frame/grandpa/Cargo.toml +++ b/frame/grandpa/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-finality-grandpa = { version = "2.0.0", default-features = false, path = "../../primitives/finality-grandpa" } @@ -30,7 +30,7 @@ pallet-session = { version = "2.0.0", default-features = false, path = "../sessi [dev-dependencies] frame-benchmarking = { version = "2.0.0", path = "../benchmarking" } -grandpa = { package = "finality-grandpa", version = "0.12.3", features = ["derive-codec"] } +grandpa = { package = "finality-grandpa", version = "0.13.0", features = ["derive-codec"] } sp-io = { version = "2.0.0", path = "../../primitives/io" } sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } pallet-balances = { version = "2.0.0", path = "../balances" } diff --git a/frame/identity/Cargo.toml b/frame/identity/Cargo.toml index 124ac4f006448..982df0a0e5ed3 100644 --- a/frame/identity/Cargo.toml +++ b/frame/identity/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/im-online/Cargo.toml b/frame/im-online/Cargo.toml index 95948c86de490..fc84a8d8cb1ba 100644 --- a/frame/im-online/Cargo.toml +++ b/frame/im-online/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../primitives/application-crypto" } pallet-authorship = { version = "2.0.0", default-features = false, path = "../authorship" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } diff --git a/frame/indices/Cargo.toml b/frame/indices/Cargo.toml index afe315cfaa6b3..cc5bc67c35dcf 100644 --- a/frame/indices/Cargo.toml +++ b/frame/indices/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/lottery/Cargo.toml b/frame/lottery/Cargo.toml index b223625c87a02..49ae53ff1dfd3 100644 --- a/frame/lottery/Cargo.toml +++ b/frame/lottery/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/membership/Cargo.toml b/frame/membership/Cargo.toml index f1ce20df17ed3..ba46b555afac1 100644 --- a/frame/membership/Cargo.toml +++ b/frame/membership/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/merkle-mountain-range/Cargo.toml b/frame/merkle-mountain-range/Cargo.toml index f6441b103f6dc..60fba2de97c54 100644 --- a/frame/merkle-mountain-range/Cargo.toml +++ b/frame/merkle-mountain-range/Cargo.toml @@ -12,7 +12,7 @@ description = "FRAME Merkle Mountain Range pallet." targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } diff --git a/frame/merkle-mountain-range/primitives/Cargo.toml b/frame/merkle-mountain-range/primitives/Cargo.toml index 1db7bf2fd3f60..9f8eb9a1c2d86 100644 --- a/frame/merkle-mountain-range/primitives/Cargo.toml +++ b/frame/merkle-mountain-range/primitives/Cargo.toml @@ -12,7 +12,7 @@ description = "FRAME Merkle Mountain Range primitives." targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../../support" } frame-system = { version = "2.0.0", default-features = false, path = "../../system" } serde = { version = "1.0.101", optional = true, features = ["derive"] } diff --git a/frame/merkle-mountain-range/primitives/src/lib.rs b/frame/merkle-mountain-range/primitives/src/lib.rs index b8258d9b73737..d57f8565b6081 100644 --- a/frame/merkle-mountain-range/primitives/src/lib.rs +++ b/frame/merkle-mountain-range/primitives/src/lib.rs @@ -127,7 +127,7 @@ mod encoding { } impl codec::Encode for DataOrHash { - fn encode_to(&self, dest: &mut T) { + fn encode_to(&self, dest: &mut T) { match self { Self::Data(l) => l.using_encoded( |data| Either::<&[u8], &H::Output>::Left(data).encode_to(dest), false diff --git a/frame/metadata/Cargo.toml b/frame/metadata/Cargo.toml index c809b3d1fcbd4..3965e581b3784 100644 --- a/frame/metadata/Cargo.toml +++ b/frame/metadata/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/metadata/src/lib.rs b/frame/metadata/src/lib.rs index 8e6b8b6bd796d..a63da82ca00db 100644 --- a/frame/metadata/src/lib.rs +++ b/frame/metadata/src/lib.rs @@ -53,7 +53,7 @@ pub enum DecodeDifferent where B: 'static, O: 'static { } impl Encode for DecodeDifferent where B: Encode + 'static, O: Encode + 'static { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { match self { DecodeDifferent::Encode(b) => b.encode_to(dest), DecodeDifferent::Decoded(o) => o.encode_to(dest), @@ -139,7 +139,7 @@ pub struct FunctionArgumentMetadata { pub struct FnEncode(pub fn() -> E) where E: Encode + 'static; impl Encode for FnEncode { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { self.0().encode_to(dest); } } @@ -238,7 +238,7 @@ pub struct DefaultByteGetter(pub &'static dyn DefaultByte); pub type ByteGetter = DecodeDifferent>; impl Encode for DefaultByteGetter { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { self.0.default_byte().encode_to(dest) } } @@ -374,7 +374,7 @@ pub enum RuntimeMetadata { pub enum RuntimeMetadataDeprecated { } impl Encode for RuntimeMetadataDeprecated { - fn encode_to(&self, _dest: &mut W) {} + fn encode_to(&self, _dest: &mut W) {} } impl codec::EncodeLike for RuntimeMetadataDeprecated {} diff --git a/frame/multisig/Cargo.toml b/frame/multisig/Cargo.toml index 70412fa6de0ad..33289f98ec141 100644 --- a/frame/multisig/Cargo.toml +++ b/frame/multisig/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/nicks/Cargo.toml b/frame/nicks/Cargo.toml index 3e1ddf897d34c..aaba763e4d128 100644 --- a/frame/nicks/Cargo.toml +++ b/frame/nicks/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/node-authorization/Cargo.toml b/frame/node-authorization/Cargo.toml index d78ffd13fd579..b0a7eefc6c648 100644 --- a/frame/node-authorization/Cargo.toml +++ b/frame/node-authorization/Cargo.toml @@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/offences/Cargo.toml b/frame/offences/Cargo.toml index 2860e3ef8ee2f..17df3d0a2b4af 100644 --- a/frame/offences/Cargo.toml +++ b/frame/offences/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } serde = { version = "1.0.101", optional = true } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/offences/benchmarking/Cargo.toml b/frame/offences/benchmarking/Cargo.toml index 80492288d74bf..0199d23d38583 100644 --- a/frame/offences/benchmarking/Cargo.toml +++ b/frame/offences/benchmarking/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../../benchmarking" } frame-support = { version = "2.0.0", default-features = false, path = "../../support" } frame-system = { version = "2.0.0", default-features = false, path = "../../system" } diff --git a/frame/proxy/Cargo.toml b/frame/proxy/Cargo.toml index da3d50ab22345..fff6aab6abfdd 100644 --- a/frame/proxy/Cargo.toml +++ b/frame/proxy/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/randomness-collective-flip/Cargo.toml b/frame/randomness-collective-flip/Cargo.toml index 9d2683a8a8f85..d4b516c32ecf8 100644 --- a/frame/randomness-collective-flip/Cargo.toml +++ b/frame/randomness-collective-flip/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] safe-mix = { version = "1.0", default-features = false } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } diff --git a/frame/recovery/Cargo.toml b/frame/recovery/Cargo.toml index a0d4c0f14df5d..c333e6ea99570 100644 --- a/frame/recovery/Cargo.toml +++ b/frame/recovery/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/scheduler/Cargo.toml b/frame/scheduler/Cargo.toml index 7d21b125e6e65..90c3799d1cd3b 100644 --- a/frame/scheduler/Cargo.toml +++ b/frame/scheduler/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/scored-pool/Cargo.toml b/frame/scored-pool/Cargo.toml index 6c9bceb32e007..33588230adda1 100644 --- a/frame/scored-pool/Cargo.toml +++ b/frame/scored-pool/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index 3a9f4609a2e25..8a13f905f0dc0 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/session/benchmarking/Cargo.toml b/frame/session/benchmarking/Cargo.toml index fc3099e1b95cb..5404cea88baa5 100644 --- a/frame/session/benchmarking/Cargo.toml +++ b/frame/session/benchmarking/Cargo.toml @@ -25,7 +25,7 @@ rand = { version = "0.7.2", default-features = false } [dev-dependencies] serde = { version = "1.0.101" } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } sp-core = { version = "2.0.0", path = "../../../primitives/core" } pallet-staking-reward-curve = { version = "2.0.0", path = "../../staking/reward-curve" } sp-io ={ version = "2.0.0", path = "../../../primitives/io" } diff --git a/frame/society/Cargo.toml b/frame/society/Cargo.toml index fce6ebe51bb30..9f49b29bf3d55 100644 --- a/frame/society/Cargo.toml +++ b/frame/society/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index 7c2fc21fde54e..2cd25daa8094e 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] static_assertions = "1.1.0" serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-npos-elections = { version = "2.0.0", default-features = false, path = "../../primitives/npos-elections" } sp-io ={ version = "2.0.0", default-features = false, path = "../../primitives/io" } diff --git a/frame/staking/fuzzer/Cargo.toml b/frame/staking/fuzzer/Cargo.toml index db65e347d8e2a..920f53c86939a 100644 --- a/frame/staking/fuzzer/Cargo.toml +++ b/frame/staking/fuzzer/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] honggfuzz = "0.5" -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } pallet-staking = { version = "2.0.0", path = "..", features = ["runtime-benchmarks"] } pallet-staking-reward-curve = { version = "2.0.0", path = "../reward-curve" } pallet-session = { version = "2.0.0", path = "../../session" } diff --git a/frame/sudo/Cargo.toml b/frame/sudo/Cargo.toml index a566cd2a9f061..cae9615cdabb4 100644 --- a/frame/sudo/Cargo.toml +++ b/frame/sudo/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index 9353dc6e121d1..3354f17d27c90 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = "0.4" serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-metadata = { version = "12.0.0", default-features = false, path = "../metadata" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io" } @@ -35,7 +35,7 @@ smallvec = "1.4.1" [dev-dependencies] pretty_assertions = "0.6.1" frame-system = { version = "2.0.0", path = "../system" } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } sp-api = { version = "2.0.0", default-features = false, path = "../../primitives/api" } diff --git a/frame/support/procedural/src/construct_runtime/mod.rs b/frame/support/procedural/src/construct_runtime/mod.rs index 4644c217cfdd9..705c2cfcb44c9 100644 --- a/frame/support/procedural/src/construct_runtime/mod.rs +++ b/frame/support/procedural/src/construct_runtime/mod.rs @@ -348,7 +348,7 @@ fn decl_outer_dispatch<'a>( .map(|module_declaration| { let module = &module_declaration.module; let name = &module_declaration.name; - let index = module_declaration.index.to_string(); + let index = module_declaration.index; quote!(#[codec(index = #index)] #module::#name) }); @@ -381,14 +381,14 @@ fn decl_outer_origin<'a>( ); return Err(syn::Error::new(module_declaration.name.span(), msg)); } - let index = module_declaration.index.to_string(); + let index = module_declaration.index; let tokens = quote!(#[codec(index = #index)] #module #instance #generics,); modules_tokens.extend(tokens); } } let system_name = &system_module.module; - let system_index = system_module.index.to_string(); + let system_index = system_module.index; Ok(quote!( #scrate::impl_outer_origin! { @@ -422,7 +422,7 @@ fn decl_outer_event<'a>( return Err(syn::Error::new(module_declaration.name.span(), msg)); } - let index = module_declaration.index.to_string(); + let index = module_declaration.index; let tokens = quote!(#[codec(index = #index)] #module #instance #generics,); modules_tokens.extend(tokens); } diff --git a/frame/support/src/event.rs b/frame/support/src/event.rs index b55f5d7e0b2ae..39baee29bc0cd 100644 --- a/frame/support/src/event.rs +++ b/frame/support/src/event.rs @@ -713,7 +713,7 @@ mod tests { pub enum TestEventSystemRenamed for TestRuntime2 { system_renamed, event_module, - #[codec(index = "5")] event_module2, + #[codec(index = 5)] event_module2, event_module3, } } diff --git a/frame/support/src/origin.rs b/frame/support/src/origin.rs index c17c617b86b78..19b24fb84bb1a 100644 --- a/frame/support/src/origin.rs +++ b/frame/support/src/origin.rs @@ -478,9 +478,9 @@ mod tests { ); impl_outer_origin!( - pub enum OriginIndices for TestRuntime where system = frame_system, system_index = "11" { + pub enum OriginIndices for TestRuntime where system = frame_system, system_index = 11 { origin_with_generic, - #[codec(index = "10")] origin_without_generic, + #[codec(index = 10)] origin_without_generic, } ); diff --git a/frame/support/test/Cargo.toml b/frame/support/test/Cargo.toml index ef66bd1902155..a34ba3e45ef9f 100644 --- a/frame/support/test/Cargo.toml +++ b/frame/support/test/Cargo.toml @@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", default-features = false, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-io = { version = "2.0.0", path = "../../../primitives/io", default-features = false } sp-state-machine = { version = "0.8.0", optional = true, path = "../../../primitives/state-machine" } frame-support = { version = "2.0.0", default-features = false, path = "../" } diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 49f3056aff2ff..0866a0c1d0b64 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", path = "../../primitives/io", default-features = false } diff --git a/frame/system/benchmarking/Cargo.toml b/frame/system/benchmarking/Cargo.toml index e164a0d62e0fb..0569ba1f84e39 100644 --- a/frame/system/benchmarking/Cargo.toml +++ b/frame/system/benchmarking/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../../primitives/runtime" } frame-benchmarking = { version = "2.0.0", default-features = false, path = "../../benchmarking" } diff --git a/frame/system/rpc/runtime-api/Cargo.toml b/frame/system/rpc/runtime-api/Cargo.toml index 4820df10fe16d..77421fd1fa3ca 100644 --- a/frame/system/rpc/runtime-api/Cargo.toml +++ b/frame/system/rpc/runtime-api/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } [features] default = ["std"] diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 79d8e30935f77..2e71d09f2c203 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-io = { version = "2.0.0", default-features = false, path = "../../primitives/io", optional = true } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/tips/Cargo.toml b/frame/tips/Cargo.toml index 0ce81a6d5d1b8..dde071d585f53 100644 --- a/frame/tips/Cargo.toml +++ b/frame/tips/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/transaction-payment/Cargo.toml b/frame/transaction-payment/Cargo.toml index 1f64ae03995bc..e9741fbbb05c8 100644 --- a/frame/transaction-payment/Cargo.toml +++ b/frame/transaction-payment/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/frame/transaction-payment/rpc/Cargo.toml b/frame/transaction-payment/rpc/Cargo.toml index 410827d0efb5b..167fe56ff049d 100644 --- a/frame/transaction-payment/rpc/Cargo.toml +++ b/frame/transaction-payment/rpc/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } jsonrpc-core = "15.1.0" jsonrpc-core-client = "15.1.0" jsonrpc-derive = "15.1.0" diff --git a/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 64c082b420c93..1a1980a91b31c 100644 --- a/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-api = { version = "2.0.0", default-features = false, path = "../../../../primitives/api" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../../../../primitives/runtime" } pallet-transaction-payment = { version = "2.0.0", default-features = false, path = "../../../transaction-payment" } diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index 07b22002ee384..dd3bd9bb10907 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } diff --git a/frame/utility/Cargo.toml b/frame/utility/Cargo.toml index ea8dc1ac015c7..5b800ab6495f6 100644 --- a/frame/utility/Cargo.toml +++ b/frame/utility/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index a151219501559..af48fdace81a0 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } enumflags2 = { version = "0.6.2" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } diff --git a/primitives/api/Cargo.toml b/primitives/api/Cargo.toml index c1effc523fcb6..1a66d460023d3 100644 --- a/primitives/api/Cargo.toml +++ b/primitives/api/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-api-proc-macro = { version = "2.0.0", path = "proc-macro" } sp-core = { version = "2.0.0", default-features = false, path = "../core" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } diff --git a/primitives/api/proc-macro/src/decl_runtime_apis.rs b/primitives/api/proc-macro/src/decl_runtime_apis.rs index 62ea5ed32b5b1..ed5f33ef603e5 100644 --- a/primitives/api/proc-macro/src/decl_runtime_apis.rs +++ b/primitives/api/proc-macro/src/decl_runtime_apis.rs @@ -194,7 +194,7 @@ fn generate_native_call_generators(decl: &ItemTrait) -> Result { ::decode_with_depth_limit( #crate_::MAX_EXTRINSIC_DEPTH, &mut &#crate_::Encode::encode(input)[..], - ).map_err(|e| format!("{} {}", error_desc, e.what())) + ).map_err(|e| format!("{} {}", error_desc, e)) } )); diff --git a/primitives/api/proc-macro/src/impl_runtime_apis.rs b/primitives/api/proc-macro/src/impl_runtime_apis.rs index 8a057383efaaf..f8d7c74b9738b 100644 --- a/primitives/api/proc-macro/src/impl_runtime_apis.rs +++ b/primitives/api/proc-macro/src/impl_runtime_apis.rs @@ -86,7 +86,7 @@ fn generate_impl_call( &#input, ) { Ok(res) => res, - Err(e) => panic!("Bad input data provided to {}: {}", #fn_name_str, e.what()), + Err(e) => panic!("Bad input data provided to {}: {}", #fn_name_str, e), }; #[allow(deprecated)] diff --git a/primitives/api/test/Cargo.toml b/primitives/api/test/Cargo.toml index 310840d1ca9c7..458a805c7552f 100644 --- a/primitives/api/test/Cargo.toml +++ b/primitives/api/test/Cargo.toml @@ -19,7 +19,7 @@ sp-runtime = { version = "2.0.0", path = "../../runtime" } sp-blockchain = { version = "2.0.0", path = "../../blockchain" } sp-consensus = { version = "0.8.0", path = "../../consensus/common" } sc-block-builder = { version = "0.8.0", path = "../../../client/block-builder" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sp-state-machine = { version = "0.8.0", path = "../../state-machine" } trybuild = "1.0.38" rustversion = "1.0.0" diff --git a/primitives/application-crypto/Cargo.toml b/primitives/application-crypto/Cargo.toml index 8791ce4174bbf..9709ed9fc18ae 100644 --- a/primitives/application-crypto/Cargo.toml +++ b/primitives/application-crypto/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-core = { version = "2.0.0", default-features = false, path = "../core" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-io = { version = "2.0.0", default-features = false, path = "../io" } diff --git a/primitives/arithmetic/Cargo.toml b/primitives/arithmetic/Cargo.toml index 5f951d8d248d1..0e8dd2be5295f 100644 --- a/primitives/arithmetic/Cargo.toml +++ b/primitives/arithmetic/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } integer-sqrt = "0.1.2" num-traits = { version = "0.2.8", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../std" } @@ -26,7 +26,7 @@ sp-debug-derive = { version = "2.0.0", default-features = false, path = "../debu rand = "0.7.2" criterion = "0.3" serde_json = "1.0" -primitive-types = "0.8.0" +primitive-types = "0.9.0" [features] default = ["std"] diff --git a/primitives/arithmetic/fuzzer/Cargo.toml b/primitives/arithmetic/fuzzer/Cargo.toml index 74b9d782ef89d..1026db92d06dd 100644 --- a/primitives/arithmetic/fuzzer/Cargo.toml +++ b/primitives/arithmetic/fuzzer/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-arithmetic = { version = "2.0.0", path = ".." } honggfuzz = "0.5.49" -primitive-types = "0.8.0" +primitive-types = "0.9.0" num-bigint = "0.2" num-traits = "0.2" diff --git a/primitives/arithmetic/src/per_things.rs b/primitives/arithmetic/src/per_things.rs index 5c86e55c2f4e8..caaa4c33cd431 100644 --- a/primitives/arithmetic/src/per_things.rs +++ b/primitives/arithmetic/src/per_things.rs @@ -338,9 +338,9 @@ macro_rules! implement_per_thing { fn encode_as(&self) -> &Self::As { &self.0 } - fn decode_from(x: Self::As) -> Self { + fn decode_from(x: Self::As) -> Result { // Saturates if `x` is more than `$max` internally. - Self::from_parts(x) + Ok(Self::from_parts(x)) } } diff --git a/primitives/authority-discovery/Cargo.toml b/primitives/authority-discovery/Cargo.toml index 917f3eb024ae0..ff469b22797ab 100644 --- a/primitives/authority-discovery/Cargo.toml +++ b/primitives/authority-discovery/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } -codec = { package = "parity-scale-codec", default-features = false, version = "1.3.6" } +codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-api = { version = "2.0.0", default-features = false, path = "../api" } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } diff --git a/primitives/authorship/Cargo.toml b/primitives/authorship/Cargo.toml index a63f75467ebf3..e37994b73a9f0 100644 --- a/primitives/authorship/Cargo.toml +++ b/primitives/authorship/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] diff --git a/primitives/block-builder/Cargo.toml b/primitives/block-builder/Cargo.toml index 5c6dad5ab7676..87246f4d9e67e 100644 --- a/primitives/block-builder/Cargo.toml +++ b/primitives/block-builder/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } sp-api = { version = "2.0.0", default-features = false, path = "../api" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } [features] diff --git a/primitives/blockchain/Cargo.toml b/primitives/blockchain/Cargo.toml index 7d2d64de85e7a..fea84adc819c4 100644 --- a/primitives/blockchain/Cargo.toml +++ b/primitives/blockchain/Cargo.toml @@ -19,7 +19,7 @@ lru = "0.6.1" parking_lot = "0.11.1" thiserror = "1.0.21" futures = "0.3.9" -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-consensus = { version = "0.8.0", path = "../consensus/common" } sp-runtime = { version = "2.0.0", path = "../runtime" } sp-state-machine = { version = "0.8.0", path = "../state-machine" } diff --git a/primitives/consensus/aura/Cargo.toml b/primitives/consensus/aura/Cargo.toml index 782dd3bfba3e5..d587f1d725042 100644 --- a/primitives/consensus/aura/Cargo.toml +++ b/primitives/consensus/aura/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../../std" } sp-api = { version = "2.0.0", default-features = false, path = "../../api" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } diff --git a/primitives/consensus/aura/src/lib.rs b/primitives/consensus/aura/src/lib.rs index f3de26da90d38..428a3c2f6f458 100644 --- a/primitives/consensus/aura/src/lib.rs +++ b/primitives/consensus/aura/src/lib.rs @@ -71,10 +71,10 @@ pub type AuthorityIndex = u32; #[derive(Decode, Encode)] pub enum ConsensusLog { /// The authorities have changed. - #[codec(index = "1")] + #[codec(index = 1)] AuthoritiesChange(Vec), /// Disable the authority with given index. - #[codec(index = "2")] + #[codec(index = 2)] OnDisabled(AuthorityIndex), } diff --git a/primitives/consensus/babe/Cargo.toml b/primitives/consensus/babe/Cargo.toml index 65321d324a695..83f62d8643ca7 100644 --- a/primitives/consensus/babe/Cargo.toml +++ b/primitives/consensus/babe/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } merlin = { version = "2.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../../std" } sp-api = { version = "2.0.0", default-features = false, path = "../../api" } diff --git a/primitives/consensus/babe/src/digests.rs b/primitives/consensus/babe/src/digests.rs index b5b3f6d2b7a6c..5a89e1fbc015f 100644 --- a/primitives/consensus/babe/src/digests.rs +++ b/primitives/consensus/babe/src/digests.rs @@ -73,13 +73,13 @@ pub struct SecondaryVRFPreDigest { #[derive(Clone, RuntimeDebug, Encode, Decode)] pub enum PreDigest { /// A primary VRF-based slot assignment. - #[codec(index = "1")] + #[codec(index = 1)] Primary(PrimaryPreDigest), /// A secondary deterministic slot assignment. - #[codec(index = "2")] + #[codec(index = 2)] SecondaryPlain(SecondaryPlainPreDigest), /// A secondary deterministic slot assignment with VRF outputs. - #[codec(index = "3")] + #[codec(index = 3)] SecondaryVRF(SecondaryVRFPreDigest), } @@ -137,7 +137,7 @@ pub struct NextEpochDescriptor { #[derive(Decode, Encode, PartialEq, Eq, Clone, RuntimeDebug)] pub enum NextConfigDescriptor { /// Version 1. - #[codec(index = "1")] + #[codec(index = 1)] V1 { /// Value of `c` in `BabeEpochConfiguration`. c: (u64, u64), diff --git a/primitives/consensus/babe/src/lib.rs b/primitives/consensus/babe/src/lib.rs index 5ab225812734c..6987796c114a0 100644 --- a/primitives/consensus/babe/src/lib.rs +++ b/primitives/consensus/babe/src/lib.rs @@ -125,14 +125,14 @@ pub enum ConsensusLog { /// The epoch has changed. This provides information about the _next_ /// epoch - information about the _current_ epoch (i.e. the one we've just /// entered) should already be available earlier in the chain. - #[codec(index = "1")] + #[codec(index = 1)] NextEpochData(NextEpochDescriptor), /// Disable the authority with given index. - #[codec(index = "2")] + #[codec(index = 2)] OnDisabled(AuthorityIndex), /// The epoch has changed, and the epoch after the current one will /// enact different epoch configurations. - #[codec(index = "3")] + #[codec(index = 3)] NextConfigData(NextConfigDescriptor), } diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index a9d2d92998a69..aa9c14ae94c90 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -29,7 +29,7 @@ sp-runtime = { version = "2.0.0", path = "../../runtime" } sp-utils = { version = "2.0.0", path = "../../utils" } sp-trie = { version = "2.0.0", path = "../../trie" } sp-api = { version = "2.0.0", path = "../../api" } -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } parking_lot = "0.11.1" serde = { version = "1.0", features = ["derive"] } prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.8.0"} diff --git a/primitives/consensus/pow/Cargo.toml b/primitives/consensus/pow/Cargo.toml index 15b37d6690ba1..e4a7963131b27 100644 --- a/primitives/consensus/pow/Cargo.toml +++ b/primitives/consensus/pow/Cargo.toml @@ -17,7 +17,7 @@ sp-api = { version = "2.0.0", default-features = false, path = "../../api" } sp-std = { version = "2.0.0", default-features = false, path = "../../std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } sp-core = { version = "2.0.0", default-features = false, path = "../../core" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [features] default = ["std"] diff --git a/primitives/consensus/slots/Cargo.toml b/primitives/consensus/slots/Cargo.toml index 73841e7eb1ba2..f2e036626315b 100644 --- a/primitives/consensus/slots/Cargo.toml +++ b/primitives/consensus/slots/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../../runtime" } sp-arithmetic = { version = "2.0.0", default-features = false, path = "../../arithmetic" } diff --git a/primitives/consensus/vrf/Cargo.toml b/primitives/consensus/vrf/Cargo.toml index 58daab488c39b..87636d8312577 100644 --- a/primitives/consensus/vrf/Cargo.toml +++ b/primitives/consensus/vrf/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { version = "1.0.0", package = "parity-scale-codec", default-features = false } +codec = { version = "2.0.0", package = "parity-scale-codec", default-features = false } schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false } sp-std = { version = "2.0.0", path = "../../std", default-features = false } sp-core = { version = "2.0.0", path = "../../core", default-features = false } diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 2b27161b07510..36c980676827e 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -14,11 +14,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-std = { version = "2.0.0", default-features = false, path = "../std" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.11", default-features = false } serde = { version = "1.0.101", optional = true, features = ["derive"] } byteorder = { version = "1.3.2", default-features = false } -primitive-types = { version = "0.8.0", default-features = false, features = ["codec"] } +primitive-types = { version = "0.9.0", default-features = false, features = ["codec"] } impl-serde = { version = "0.3.0", optional = true } wasmi = { version = "0.6.2", optional = true } hash-db = { version = "0.15.2", default-features = false } @@ -36,7 +36,7 @@ parking_lot = { version = "0.11.1", optional = true } sp-debug-derive = { version = "2.0.0", path = "../debug-derive" } sp-externalities = { version = "0.8.0", optional = true, path = "../externalities" } sp-storage = { version = "2.0.0", default-features = false, path = "../storage" } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } futures = { version = "0.3.1", optional = true } dyn-clonable = { version = "0.9.0", optional = true } thiserror = { version = "1.0.21", optional = true } diff --git a/primitives/core/src/sandbox.rs b/primitives/core/src/sandbox.rs index 330ea7eb92e11..a15a7af418313 100644 --- a/primitives/core/src/sandbox.rs +++ b/primitives/core/src/sandbox.rs @@ -31,12 +31,12 @@ pub struct HostError; pub enum ExternEntity { /// Function that is specified by an index in a default table of /// a module that creates the sandbox. - #[codec(index = "1")] + #[codec(index = 1)] Function(u32), /// Linear memory that is specified by some identifier returned by sandbox /// module upon creation new sandboxed memory. - #[codec(index = "2")] + #[codec(index = 2)] Memory(u32), } diff --git a/primitives/database/Cargo.toml b/primitives/database/Cargo.toml index 728396aea74cb..2bb53e98085a2 100644 --- a/primitives/database/Cargo.toml +++ b/primitives/database/Cargo.toml @@ -12,4 +12,4 @@ readme = "README.md" [dependencies] parking_lot = "0.11.1" -kvdb = "0.8.0" +kvdb = "0.9.0" diff --git a/primitives/election-providers/Cargo.toml b/primitives/election-providers/Cargo.toml index f017a37637202..7210b8f854bde 100644 --- a/primitives/election-providers/Cargo.toml +++ b/primitives/election-providers/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.1", default-features = false, path = "../std" } sp-arithmetic = { version = "2.0.1", default-features = false, path = "../arithmetic" } sp-npos-elections = { version = "2.0.1", default-features = false, path = "../npos-elections" } diff --git a/primitives/externalities/Cargo.toml b/primitives/externalities/Cargo.toml index f1990e89d757b..6586d91808f7f 100644 --- a/primitives/externalities/Cargo.toml +++ b/primitives/externalities/Cargo.toml @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"] sp-storage = { version = "2.0.0", path = "../storage", default-features = false } sp-std = { version = "2.0.0", path = "../std", default-features = false } environmental = { version = "1.1.2", default-features = false } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } [features] default = ["std"] diff --git a/primitives/finality-grandpa/Cargo.toml b/primitives/finality-grandpa/Cargo.toml index f96196bdb190c..a9a6d48561097 100644 --- a/primitives/finality-grandpa/Cargo.toml +++ b/primitives/finality-grandpa/Cargo.toml @@ -15,8 +15,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } -grandpa = { package = "finality-grandpa", version = "0.12.3", default-features = false, features = ["derive-codec"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } +grandpa = { package = "finality-grandpa", version = "0.13.0", default-features = false, features = ["derive-codec"] } log = { version = "0.4.8", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-api = { version = "2.0.0", default-features = false, path = "../api" } diff --git a/primitives/finality-grandpa/src/lib.rs b/primitives/finality-grandpa/src/lib.rs index 5a5468aff5608..383e4fe37134c 100644 --- a/primitives/finality-grandpa/src/lib.rs +++ b/primitives/finality-grandpa/src/lib.rs @@ -102,7 +102,7 @@ pub enum ConsensusLog { /// This should be a pure function: i.e. as long as the runtime can interpret /// the digest type it should return the same result regardless of the current /// state. - #[codec(index = "1")] + #[codec(index = 1)] ScheduledChange(ScheduledChange), /// Force an authority set change. /// @@ -118,18 +118,18 @@ pub enum ConsensusLog { /// This should be a pure function: i.e. as long as the runtime can interpret /// the digest type it should return the same result regardless of the current /// state. - #[codec(index = "2")] + #[codec(index = 2)] ForcedChange(N, ScheduledChange), /// Note that the authority with given index is disabled until the next change. - #[codec(index = "3")] + #[codec(index = 3)] OnDisabled(AuthorityIndex), /// A signal to pause the current authority set after the given delay. /// After finalizing the block at _delay_ the authorities should stop voting. - #[codec(index = "4")] + #[codec(index = 4)] Pause(N), /// A signal to resume the current authority set after the given delay. /// After authoring the block at _delay_ the authorities should resume voting. - #[codec(index = "5")] + #[codec(index = 5)] Resume(N), } diff --git a/primitives/inherents/Cargo.toml b/primitives/inherents/Cargo.toml index f73bd97bf4b0e..e1577a6a1b672 100644 --- a/primitives/inherents/Cargo.toml +++ b/primitives/inherents/Cargo.toml @@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"] parking_lot = { version = "0.11.1", optional = true } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-core = { version = "2.0.0", default-features = false, path = "../core" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } thiserror = { version = "1.0.21", optional = true } [features] diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index 01ea58e87e3e2..1f509f7f9f214 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } hash-db = { version = "0.15.2", default-features = false } sp-core = { version = "2.0.0", default-features = false, path = "../core" } sp-keystore = { version = "0.8.0", default-features = false, optional = true, path = "../keystore" } diff --git a/primitives/keystore/Cargo.toml b/primitives/keystore/Cargo.toml index 7fb6b4b93fc21..186b569a96b8a 100644 --- a/primitives/keystore/Cargo.toml +++ b/primitives/keystore/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = "0.1.30" derive_more = "0.99.2" -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } futures = { version = "0.3.1" } schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false } merlin = { version = "2.0", default-features = false } diff --git a/primitives/npos-elections/Cargo.toml b/primitives/npos-elections/Cargo.toml index 82ce6b005a954..f9b0c260676bc 100644 --- a/primitives/npos-elections/Cargo.toml +++ b/primitives/npos-elections/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-npos-elections-compact = { version = "2.0.0", path = "./compact" } diff --git a/primitives/npos-elections/fuzzer/Cargo.toml b/primitives/npos-elections/fuzzer/Cargo.toml index a1fa4a2f4ca40..690896f0152eb 100644 --- a/primitives/npos-elections/fuzzer/Cargo.toml +++ b/primitives/npos-elections/fuzzer/Cargo.toml @@ -19,7 +19,7 @@ sp-std = { version = "2.0.0", path = "../../std" } sp-runtime = { version = "2.0.0", path = "../../runtime" } honggfuzz = "0.5" rand = { version = "0.7.3", features = ["std", "small_rng"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [[bin]] name = "reduce" diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index bbf02578848e4..bbd33d344fbd5 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -19,9 +19,9 @@ sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-tracing = { version = "2.0.0", default-features = false, path = "../tracing" } sp-runtime-interface-proc-macro = { version = "2.0.0", path = "proc-macro" } sp-externalities = { version = "0.8.0", optional = true, path = "../externalities" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } static_assertions = "1.0.0" -primitive-types = { version = "0.8.0", default-features = false } +primitive-types = { version = "0.9.0", default-features = false } sp-storage = { version = "2.0.0", default-features = false, path = "../storage" } impl-trait-for-tuples = "0.2.0" diff --git a/primitives/runtime-interface/src/pass_by.rs b/primitives/runtime-interface/src/pass_by.rs index e2a9b4ed42749..69485a1a2873f 100644 --- a/primitives/runtime-interface/src/pass_by.rs +++ b/primitives/runtime-interface/src/pass_by.rs @@ -238,7 +238,7 @@ impl PassByImpl for Codec { let (ptr, len) = unpack_ptr_and_len(arg); let vec = context.read_memory(Pointer::new(ptr), len)?; T::decode(&mut &vec[..]) - .map_err(|e| format!("Could not decode value from wasm: {}", e.what())) + .map_err(|e| format!("Could not decode value from wasm: {}", e)) } } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 9ce6a95c0c876..6d35fbd35227a 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../core" } sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } sp-arithmetic = { version = "2.0.0", default-features = false, path = "../arithmetic" } @@ -26,7 +26,7 @@ log = { version = "0.4.8", optional = true } paste = "0.1.6" rand = { version = "0.7.2", optional = true } impl-trait-for-tuples = "0.2.0" -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } hash256-std-hasher = { version = "0.15.2", default-features = false } either = { version = "1.5", default-features = false } diff --git a/primitives/runtime/src/generic/era.rs b/primitives/runtime/src/generic/era.rs index 381c34ef419dc..5bee170048b5f 100644 --- a/primitives/runtime/src/generic/era.rs +++ b/primitives/runtime/src/generic/era.rs @@ -107,13 +107,13 @@ impl Era { } impl Encode for Era { - fn encode_to(&self, output: &mut T) { + fn encode_to(&self, output: &mut T) { match self { Era::Immortal => output.push_byte(0), Era::Mortal(period, phase) => { let quantize_factor = (*period as u64 >> 12).max(1); let encoded = (period.trailing_zeros() - 1).max(1).min(15) as u16 | ((phase / quantize_factor) << 4) as u16; - output.push(&encoded); + encoded.encode_to(output); } } } diff --git a/primitives/runtime/src/generic/header.rs b/primitives/runtime/src/generic/header.rs index 09f473e7d8192..62f9908fbe58d 100644 --- a/primitives/runtime/src/generic/header.rs +++ b/primitives/runtime/src/generic/header.rs @@ -106,12 +106,12 @@ impl Encode for Header where Hash: HashT, Hash::Output: Encode, { - fn encode_to(&self, dest: &mut T) { - dest.push(&self.parent_hash); - dest.push(&<<::Type as EncodeAsRef<_>>::RefType>::from(&self.number)); - dest.push(&self.state_root); - dest.push(&self.extrinsics_root); - dest.push(&self.digest); + fn encode_to(&self, dest: &mut T) { + self.parent_hash.encode_to(dest); + <<::Type as EncodeAsRef<_>>::RefType>::from(&self.number).encode_to(dest); + self.state_root.encode_to(dest); + self.extrinsics_root.encode_to(dest); + self.digest.encode_to(dest); } } diff --git a/primitives/runtime/src/testing.rs b/primitives/runtime/src/testing.rs index 3e72c25af9e95..b6d2641f01083 100644 --- a/primitives/runtime/src/testing.rs +++ b/primitives/runtime/src/testing.rs @@ -247,7 +247,7 @@ impl<'a, Xt> Deserialize<'a> for Block where Block: Decode { fn deserialize>(de: D) -> Result { let r = >::deserialize(de)?; Decode::decode(&mut &r[..]) - .map_err(|e| DeError::custom(format!("Invalid value passed into decode: {}", e.what()))) + .map_err(|e| DeError::custom(format!("Invalid value passed into decode: {}", e))) } } diff --git a/primitives/sandbox/Cargo.toml b/primitives/sandbox/Cargo.toml index 5ec8c203b54d7..44b52c3881432 100755 --- a/primitives/sandbox/Cargo.toml +++ b/primitives/sandbox/Cargo.toml @@ -18,7 +18,7 @@ sp-core = { version = "2.0.0", default-features = false, path = "../core" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-io = { version = "2.0.0", default-features = false, path = "../io" } sp-wasm-interface = { version = "2.0.0", default-features = false, path = "../wasm-interface" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } [dev-dependencies] wat = "1.0" diff --git a/primitives/session/Cargo.toml b/primitives/session/Cargo.toml index d47a8062ef1a9..5b83e88c44fae 100644 --- a/primitives/session/Cargo.toml +++ b/primitives/session/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-api = { version = "2.0.0", default-features = false, path = "../api" } sp-core = { version = "2.0.0", default-features = false, path = "../core" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } diff --git a/primitives/staking/Cargo.toml b/primitives/staking/Cargo.toml index fbe4b30f00b8a..f8203c130d470 100644 --- a/primitives/staking/Cargo.toml +++ b/primitives/staking/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } diff --git a/primitives/state-machine/Cargo.toml b/primitives/state-machine/Cargo.toml index c594c27fc7a24..0c1a2a558f25b 100644 --- a/primitives/state-machine/Cargo.toml +++ b/primitives/state-machine/Cargo.toml @@ -23,7 +23,7 @@ trie-root = { version = "0.16.0", default-features = false } sp-trie = { version = "2.0.0", path = "../trie", default-features = false } sp-core = { version = "2.0.0", path = "../core", default-features = false } sp-panic-handler = { version = "2.0.0", path = "../panic-handler", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } num-traits = { version = "0.2.8", default-features = false } rand = { version = "0.7.2", optional = true } sp-externalities = { version = "0.8.0", path = "../externalities", default-features = false } diff --git a/primitives/state-machine/src/changes_trie/input.rs b/primitives/state-machine/src/changes_trie/input.rs index 3702eefb99648..85a8de0b78d81 100644 --- a/primitives/state-machine/src/changes_trie/input.rs +++ b/primitives/state-machine/src/changes_trie/input.rs @@ -123,7 +123,7 @@ impl ExtrinsicIndex { } impl Encode for ExtrinsicIndex { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { dest.push_byte(1); self.block.encode_to(dest); self.key.encode_to(dest); @@ -142,7 +142,7 @@ impl DigestIndex { impl Encode for DigestIndex { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { dest.push_byte(2); self.block.encode_to(dest); self.key.encode_to(dest); @@ -158,7 +158,7 @@ impl ChildIndex { } impl Encode for ChildIndex { - fn encode_to(&self, dest: &mut W) { + fn encode_to(&self, dest: &mut W) { dest.push_byte(3); self.block.encode_to(dest); self.storage_key.encode_to(dest); diff --git a/primitives/storage/Cargo.toml b/primitives/storage/Cargo.toml index b025b5a106715..88580efb164ef 100644 --- a/primitives/storage/Cargo.toml +++ b/primitives/storage/Cargo.toml @@ -19,7 +19,7 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] } impl-serde = { version = "0.3.1", optional = true } ref-cast = "1.0.0" sp-debug-derive = { version = "2.0.0", path = "../debug-derive" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] diff --git a/primitives/tasks/Cargo.toml b/primitives/tasks/Cargo.toml index 7ad5e6dd51395..1a655082a1e97 100644 --- a/primitives/tasks/Cargo.toml +++ b/primitives/tasks/Cargo.toml @@ -22,7 +22,7 @@ sp-runtime-interface = { version = "2.0.0", default-features = false, path = ".. sp-std = { version = "2.0.0", default-features = false, path = "../std" } [dev-dependencies] -codec = { package = "parity-scale-codec", default-features = false, version = "1.3.6" } +codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" } [features] default = ["std"] diff --git a/primitives/test-primitives/Cargo.toml b/primitives/test-primitives/Cargo.toml index 1bfb793610b64..0cd36afd950ba 100644 --- a/primitives/test-primitives/Cargo.toml +++ b/primitives/test-primitives/Cargo.toml @@ -13,11 +13,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sp-application-crypto = { version = "2.0.0", default-features = false, path = "../application-crypto" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-core = { version = "2.0.0", default-features = false, path = "../core" } serde = { version = "1.0.101", optional = true, features = ["derive"] } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } [features] default = [ diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index de1271b0dd027..dc9f1fae92563 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] sp-api = { version = "2.0.0", default-features = false, path = "../api" } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } impl-trait-for-tuples = "0.2.0" wasm-timer = { version = "0.2", optional = true } diff --git a/primitives/tracing/Cargo.toml b/primitives/tracing/Cargo.toml index 31527b204963f..909641ca12702 100644 --- a/primitives/tracing/Cargo.toml +++ b/primitives/tracing/Cargo.toml @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [dependencies] sp-std = { version = "2.0.0", path = "../std", default-features = false} -codec = { version = "1.3.1", package = "parity-scale-codec", default-features = false, features = ["derive"]} +codec = { version = "2.0.0", package = "parity-scale-codec", default-features = false, features = ["derive"]} tracing = { version = "0.1.22", default-features = false } tracing-core = { version = "0.1.17", default-features = false } log = { version = "0.4.8", optional = true } diff --git a/primitives/transaction-pool/Cargo.toml b/primitives/transaction-pool/Cargo.toml index 675987e3a127c..6454ff509fdad 100644 --- a/primitives/transaction-pool/Cargo.toml +++ b/primitives/transaction-pool/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] thiserror = { version = "1.0.21", optional = true } -codec = { package = "parity-scale-codec", version = "1.3.6", optional = true } +codec = { package = "parity-scale-codec", version = "2.0.0", optional = true } derive_more = { version = "0.99.11", optional = true } futures = { version = "0.3.1", optional = true } log = { version = "0.4.8", optional = true } diff --git a/primitives/trie/Cargo.toml b/primitives/trie/Cargo.toml index 4392f01d222aa..c7f80480a321c 100644 --- a/primitives/trie/Cargo.toml +++ b/primitives/trie/Cargo.toml @@ -18,16 +18,16 @@ name = "bench" harness = false [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } sp-std = { version = "2.0.0", default-features = false, path = "../std" } hash-db = { version = "0.15.2", default-features = false } trie-db = { version = "0.22.2", default-features = false } trie-root = { version = "0.16.0", default-features = false } -memory-db = { version = "0.25.0", default-features = false } +memory-db = { version = "0.26.0", default-features = false } sp-core = { version = "2.0.0", default-features = false, path = "../core" } [dev-dependencies] -trie-bench = "0.26.0" +trie-bench = "0.27.0" trie-standardmap = "0.15.2" criterion = "0.3.3" hex-literal = "0.3.1" diff --git a/primitives/trie/src/error.rs b/primitives/trie/src/error.rs index 453f74afeb818..8e1d9b974ffd5 100644 --- a/primitives/trie/src/error.rs +++ b/primitives/trie/src/error.rs @@ -49,7 +49,7 @@ impl StdError for Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - Error::Decode(e) => write!(f, "Decode error: {}", e.what()), + Error::Decode(e) => write!(f, "Decode error: {}", e), Error::BadFormat => write!(f, "Bad format"), } } diff --git a/primitives/trie/src/node_header.rs b/primitives/trie/src/node_header.rs index 14a998903d697..0fdf6fefbd0bc 100644 --- a/primitives/trie/src/node_header.rs +++ b/primitives/trie/src/node_header.rs @@ -38,7 +38,7 @@ pub(crate) enum NodeKind { } impl Encode for NodeHeader { - fn encode_to(&self, output: &mut T) { + fn encode_to(&self, output: &mut T) { match self { NodeHeader::Null => output.push_byte(trie_constants::EMPTY_TRIE), NodeHeader::Branch(true, nibble_count) => @@ -99,7 +99,7 @@ pub(crate) fn size_and_prefix_iterator(size: usize, prefix: u8) -> impl Iterator } /// Encodes size and prefix to a stream output. -fn encode_size_and_prefix(size: usize, prefix: u8, out: &mut impl Output) { +fn encode_size_and_prefix(size: usize, prefix: u8, out: &mut W) { for b in size_and_prefix_iterator(size, prefix) { out.push_byte(b) } diff --git a/primitives/version/Cargo.toml b/primitives/version/Cargo.toml index 113639434d5bc..0c38e8a741842 100644 --- a/primitives/version/Cargo.toml +++ b/primitives/version/Cargo.toml @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] impl-serde = { version = "0.3.1", optional = true } serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index 32c283a8527fa..21d2fc4f214a6 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"] wasmi = { version = "0.6.2", optional = true } impl-trait-for-tuples = "0.2.0" sp-std = { version = "2.0.0", path = "../std", default-features = false } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] diff --git a/test-utils/client/Cargo.toml b/test-utils/client/Cargo.toml index fad66c5a6708d..0b5fba78c1143 100644 --- a/test-utils/client/Cargo.toml +++ b/test-utils/client/Cargo.toml @@ -12,7 +12,7 @@ publish = false targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } futures = "0.3.9" futures01 = { package = "futures", version = "0.1.29" } hash-db = "0.15.2" diff --git a/test-utils/runtime/Cargo.toml b/test-utils/runtime/Cargo.toml index c99ec9a05e7c4..b4a860403d466 100644 --- a/test-utils/runtime/Cargo.toml +++ b/test-utils/runtime/Cargo.toml @@ -17,11 +17,11 @@ sp-application-crypto = { version = "2.0.0", default-features = false, path = ". sp-consensus-aura = { version = "0.8.0", default-features = false, path = "../../primitives/consensus/aura" } sp-consensus-babe = { version = "0.8.0", default-features = false, path = "../../primitives/consensus/babe" } sp-block-builder = { version = "2.0.0", default-features = false, path = "../../primitives/block-builder" } -codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } frame-executive = { version = "2.0.0", default-features = false, path = "../../frame/executive" } sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" } sp-keyring = { version = "2.0.0", optional = true, path = "../../primitives/keyring" } -memory-db = { version = "0.25.0", default-features = false } +memory-db = { version = "0.26.0", default-features = false } sp-offchain = { path = "../../primitives/offchain", default-features = false, version = "2.0.0"} sp-core = { version = "2.0.0", default-features = false, path = "../../primitives/core" } sp-std = { version = "2.0.0", default-features = false, path = "../../primitives/std" } @@ -40,7 +40,7 @@ sp-finality-grandpa = { version = "2.0.0", default-features = false, path = "../ sp-trie = { version = "2.0.0", default-features = false, path = "../../primitives/trie" } sp-transaction-pool = { version = "2.0.0", default-features = false, path = "../../primitives/transaction-pool" } trie-db = { version = "0.22.2", default-features = false } -parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } sc-service = { version = "0.8.0", default-features = false, optional = true, features = ["test-helpers"], path = "../../client/service" } sp-state-machine = { version = "0.8.0", default-features = false, path = "../../primitives/state-machine" } sp-externalities = { version = "0.8.0", default-features = false, path = "../../primitives/externalities" } diff --git a/test-utils/runtime/client/Cargo.toml b/test-utils/runtime/client/Cargo.toml index 2540e29c8b0e2..9a6a4fb60b073 100644 --- a/test-utils/runtime/client/Cargo.toml +++ b/test-utils/runtime/client/Cargo.toml @@ -21,7 +21,7 @@ substrate-test-runtime = { version = "2.0.0", path = "../../runtime" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } sp-api = { version = "2.0.0", path = "../../../primitives/api" } sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sc-client-api = { version = "2.0.0", path = "../../../client/api" } sc-consensus = { version = "0.8.0", path = "../../../client/consensus/common" } sc-service = { version = "0.8.0", default-features = false, path = "../../../client/service" } diff --git a/test-utils/runtime/transaction-pool/Cargo.toml b/test-utils/runtime/transaction-pool/Cargo.toml index 7fbea1e3c0edb..1e254a4c24502 100644 --- a/test-utils/runtime/transaction-pool/Cargo.toml +++ b/test-utils/runtime/transaction-pool/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] substrate-test-runtime-client = { version = "2.0.0", path = "../client" } parking_lot = "0.11.1" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 3137c2698ec33..26688610af198 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -21,7 +21,7 @@ console_error_panic_hook = "0.1.6" js-sys = "0.3.34" wasm-bindgen = "0.2.57" wasm-bindgen-futures = "0.4.18" -kvdb-web = "0.8.0" +kvdb-web = "0.9.0" sp-database = { version = "2.0.0", path = "../../primitives/database" } sc-informant = { version = "0.8.0", path = "../../client/informant" } sc-service = { version = "0.8.0", path = "../../client/service", default-features = false } diff --git a/utils/fork-tree/Cargo.toml b/utils/fork-tree/Cargo.toml index 292d1a83b7e58..73dc3aa1e6bd2 100644 --- a/utils/fork-tree/Cargo.toml +++ b/utils/fork-tree/Cargo.toml @@ -14,4 +14,4 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] } diff --git a/utils/frame/benchmarking-cli/Cargo.toml b/utils/frame/benchmarking-cli/Cargo.toml index 717224f787f51..2e951e1e828c1 100644 --- a/utils/frame/benchmarking-cli/Cargo.toml +++ b/utils/frame/benchmarking-cli/Cargo.toml @@ -23,7 +23,7 @@ sp-externalities = { version = "0.8.0", path = "../../../primitives/externalitie sp-keystore = { version = "0.8.0", path = "../../../primitives/keystore" } sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" } sp-state-machine = { version = "0.8.0", path = "../../../primitives/state-machine" } -codec = { version = "1.3.1", package = "parity-scale-codec" } +codec = { version = "2.0.0", package = "parity-scale-codec" } structopt = "0.3.8" chrono = "0.4" serde = "1.0.116" diff --git a/utils/frame/rpc/support/Cargo.toml b/utils/frame/rpc/support/Cargo.toml index b9ee76b846e0d..a9c55132e2408 100644 --- a/utils/frame/rpc/support/Cargo.toml +++ b/utils/frame/rpc/support/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] futures = { version = "0.3.0", features = ["compat"] } jsonrpc-client-transports = { version = "15.1.0", default-features = false, features = ["http"] } jsonrpc-core = "15.1.0" -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } serde = "1" frame-support = { version = "2.0.0", path = "../../../../frame/support" } sp-storage = { version = "2.0.0", path = "../../../../primitives/storage" } diff --git a/utils/frame/rpc/system/Cargo.toml b/utils/frame/rpc/system/Cargo.toml index 03016462cbeac..5a75d01c4d479 100644 --- a/utils/frame/rpc/system/Cargo.toml +++ b/utils/frame/rpc/system/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sc-client-api = { version = "2.0.0", path = "../../../../client/api" } -codec = { package = "parity-scale-codec", version = "1.3.6" } +codec = { package = "parity-scale-codec", version = "2.0.0" } futures = { version = "0.3.4", features = ["compat"] } jsonrpc-core = "15.1.0" jsonrpc-core-client = "15.1.0"