diff --git a/Cargo.lock b/Cargo.lock index 28deeb1..453ffab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "Inflector" version = "0.11.4" @@ -12,9 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.15.1" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" +dependencies = [ + "gimli 0.23.0", +] + +[[package]] +name = "addr2line" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a" +checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" dependencies = [ "gimli 0.24.0", ] @@ -65,7 +76,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63dd91889c49327ad7ef3b500fd1109dbd3c509a03db0d4a9ce413b79f575cb6" dependencies = [ "block-cipher", - "byteorder 1.4.3", + "byteorder", "opaque-debug 0.3.0", ] @@ -79,21 +90,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "ahash" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb" -dependencies = [ - "const-random", -] - -[[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" - [[package]] name = "ahash" version = "0.4.7" @@ -109,17 +105,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alga" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" -dependencies = [ - "approx", - "num-complex", - "num-traits", -] - [[package]] name = "ansi_term" version = "0.11.0" @@ -140,24 +125,27 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.40" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" +checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61" [[package]] name = "approx" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" +checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" dependencies = [ "num-traits", ] [[package]] -name = "arc-swap" -version = "1.2.0" +name = "approx" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d7d63395147b81a9e570bcc6243aaf71c017bd666d4909cfef0085bdda8d73" +checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" +dependencies = [ + "num-traits", +] [[package]] name = "arrayref" @@ -180,6 +168,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" + [[package]] name = "asn1_der" version = "0.6.3" @@ -220,7 +214,7 @@ dependencies = [ "concurrent-queue", "fastrand", "futures-lite", - "once_cell 1.7.2", + "once_cell", "slab", ] @@ -237,7 +231,7 @@ dependencies = [ "blocking", "futures-lite", "num_cpus", - "once_cell 1.7.2", + "once_cell", ] [[package]] @@ -251,7 +245,7 @@ dependencies = [ "futures-lite", "libc", "log", - "once_cell 1.7.2", + "once_cell", "parking", "polling", "slab", @@ -290,7 +284,7 @@ dependencies = [ "event-listener", "futures-lite", "libc", - "once_cell 1.7.2", + "once_cell", "signal-hook", "winapi 0.3.9", ] @@ -306,7 +300,7 @@ dependencies = [ "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.4", + "crossbeam-utils 0.8.5", "futures-channel", "futures-core", "futures-io", @@ -316,8 +310,8 @@ dependencies = [ "log", "memchr", "num_cpus", - "once_cell 1.7.2", - "pin-project-lite 0.2.6", + "once_cell", + "pin-project-lite 0.2.7", "pin-utils", "slab", "wasm-bindgen-futures", @@ -329,18 +323,6 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" -[[package]] -name = "async-tls" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df097e3f506bec0e1a24f06bb3c962c228f36671de841ff579cb99f371772634" -dependencies = [ - "futures 0.3.8", - "rustls", - "webpki", - "webpki-roots 0.19.0", -] - [[package]] name = "async-trait" version = "0.1.50" @@ -352,11 +334,40 @@ dependencies = [ "syn", ] +[[package]] +name = "asynchronous-codec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" +dependencies = [ + "bytes 1.0.1", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.7", +] + +[[package]] +name = "asynchronous-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" +dependencies = [ + "bytes 1.0.1", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.7", +] + [[package]] name = "atomic" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f46ca51dca4837f1520754d1c8c36636356b81553d928dc9c177025369a06e" +checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" +dependencies = [ + "autocfg", +] [[package]] name = "atomic-waker" @@ -375,12 +386,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" @@ -389,19 +394,25 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744" +checksum = "b7815ea54e4d821e791162e078acbebfd6d8c8939cd559c9335dceb1c8ca7282" dependencies = [ - "addr2line", + "addr2line 0.15.2", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.24.0", + "object 0.25.3", "rustc-demangle", ] +[[package]] +name = "base-x" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" + [[package]] name = "base58" version = "0.1.0" @@ -410,15 +421,15 @@ checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" [[package]] name = "base64" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "base64" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bincode" @@ -448,41 +459,22 @@ dependencies = [ "shlex", ] -[[package]] -name = "bip39" -version = "0.6.0-beta.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059804e226b3ac116519a252d7f5fb985a5ccc0e93255e036a5f7e7283323f4" -dependencies = [ - "failure", - "hashbrown 0.1.8", - "hmac", - "once_cell 0.1.8", - "pbkdf2", - "rand 0.6.5", - "sha2 0.8.2", -] - [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "bitmask" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" - [[package]] name = "bitvec" -version = "0.17.4" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ - "either", + "funty", "radium", + "tap", + "wyz", ] [[package]] @@ -528,6 +520,21 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "blake3" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac 0.8.0", + "digest 0.9.0", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -536,7 +543,7 @@ checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ "block-padding 0.1.5", "byte-tools", - "byteorder 1.4.3", + "byteorder", "generic-array 0.12.4", ] @@ -585,15 +592,9 @@ dependencies = [ "atomic-waker", "fastrand", "futures-lite", - "once_cell 1.7.2", + "once_cell", ] -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - [[package]] name = "bs58" version = "0.4.0" @@ -609,17 +610,26 @@ dependencies = [ "memchr", ] +[[package]] +name = "build-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" +dependencies = [ + "semver 0.6.0", +] + [[package]] name = "bumpalo" -version = "3.6.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" +checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[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" @@ -627,12 +637,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - [[package]] name = "byteorder" version = "1.4.3" @@ -645,7 +649,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.4.3", + "byteorder", "either", "iovec", ] @@ -663,22 +667,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] -name = "c_linked_list" +name = "cache-padded" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" +checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] -name = "cache-padded" -version = "1.1.1" +name = "cargo-platform" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "0226944a63d1bf35a3b5f948dd7c59e263db83695c9e8bffc4037de02e30f1d7" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714a157da7991e23d90686b9524b9e12e0407a108647f52e9328f4b3d51ac7f" +dependencies = [ + "cargo-platform", + "semver 0.11.0", + "semver-parser 0.10.2", + "serde", + "serde_json", +] [[package]] name = "cc" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" dependencies = [ "jobserver", ] @@ -740,6 +760,26 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "cid" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" +dependencies = [ + "multibase", + "multihash", + "unsigned-varint 0.5.1", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.4", +] + [[package]] name = "clang-sys" version = "1.2.0" @@ -784,28 +824,6 @@ dependencies = [ "cache-padded", ] -[[package]] -name = "const-random" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" -dependencies = [ - "const-random-macro", - "proc-macro-hack", -] - -[[package]] -name = "const-random-macro" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" -dependencies = [ - "getrandom 0.2.2", - "lazy_static", - "proc-macro-hack", - "tiny-keccak", -] - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -834,11 +852,21 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +[[package]] +name = "cpp_demangle" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44919ecaf6f99e8e737bc239408931c9a01e9a6c74814fee8242dd2506b65390" +dependencies = [ + "cfg-if 1.0.0", + "glob", +] + [[package]] name = "cpufeatures" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec1028182c380cc45a2e2c5ec841134f2dfd0f8f5f0a5bcd68004f81b5efdf4" +checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" dependencies = [ "libc", ] @@ -851,25 +879,25 @@ checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" [[package]] name = "cranelift-bforest" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dcc286b052ee24a1e5a222e7c1125e6010ad35b0f248709b9b3737a8fedcfdf" +checksum = "4066fd63b502d73eb8c5fa6bcab9c7962b05cd580f6b149ee83a8e730d8ce7fb" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9badfe36176cb653506091693bc2bb1970c9bddfcd6ec7fac404f7eaec6f38" +checksum = "1a54e4beb833a3c873a18a8fe735d73d732044004c7539a072c8faa35ccb0c60" dependencies = [ - "byteorder 1.4.3", + "byteorder", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.21.0", + "gimli 0.23.0", "log", "regalloc", "serde", @@ -880,9 +908,9 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3f460031861e4f4ad510be62b2ae50bba6cc886b598a36f9c0a970feab9598" +checksum = "c54cac7cacb443658d8f0ff36a3545822613fa202c946c0891897843bc933810" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -890,24 +918,24 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ad12409e922e7697cd0bdc7dc26992f64a77c31880dfe5e3c7722f4710206d" +checksum = "a109760aff76788b2cdaeefad6875a73c2b450be13906524f6c2a81e05b8d83c" [[package]] name = "cranelift-entity" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97cdc58972ea065d107872cfb9079f4c92ade78a8af85aaff519a65b5d13f71" +checksum = "3b044234aa32531f89a08b487630ddc6744696ec04c8123a1ad388de837f5de3" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef419efb4f94ecc02e5d9fbcc910d2bb7f0040e2de570e63a454f883bc891d6" +checksum = "5452b3e4e97538ee5ef2cc071301c69a86c7adf2770916b9d04e9727096abd93" dependencies = [ "cranelift-codegen", "log", @@ -917,9 +945,9 @@ dependencies = [ [[package]] name = "cranelift-native" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e69d44d59826eef6794066ac2c0f4ad3975f02d97030c60dbc04e3886adf36e" +checksum = "f68035c10b2e80f26cc29c32fa824380877f38483504c2a47b54e7da311caaf3" dependencies = [ "cranelift-codegen", "raw-cpuid", @@ -928,17 +956,19 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.66.0" +version = "0.69.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "979df666b1304624abe99738e9e0e7c7479ee5523ba4b8b237df9ff49996acbb" +checksum = "a530eb9d1c95b3309deb24c3d179d8b0ba5837ed98914a429787c395f614949d" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", + "itertools", "log", "serde", + "smallvec 1.6.1", "thiserror", - "wasmparser 0.59.0", + "wasmparser", ] [[package]] @@ -957,7 +987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.4", + "crossbeam-utils 0.8.5", ] [[package]] @@ -978,8 +1008,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.4", - "crossbeam-utils 0.8.4", + "crossbeam-epoch 0.9.5", + "crossbeam-utils 0.8.5", ] [[package]] @@ -988,26 +1018,26 @@ 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", "maybe-uninit", "memoffset 0.5.6", - "scopeguard 1.1.0", + "scopeguard", ] [[package]] name = "crossbeam-epoch" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.4", + "crossbeam-utils 0.8.5", "lazy_static", - "memoffset 0.6.3", - "scopeguard 1.1.0", + "memoffset 0.6.4", + "scopeguard", ] [[package]] @@ -1027,18 +1057,17 @@ 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", ] [[package]] name = "crossbeam-utils" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" dependencies = [ - "autocfg 1.0.1", "cfg-if 1.0.0", "lazy_static", ] @@ -1090,12 +1119,13 @@ dependencies = [ [[package]] name = "cuckoofilter" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" +checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" dependencies = [ - "byteorder 0.5.3", - "rand 0.3.23", + "byteorder", + "fnv", + "rand 0.7.3", ] [[package]] @@ -1104,7 +1134,7 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8" dependencies = [ - "byteorder 1.4.3", + "byteorder", "digest 0.8.1", "rand_core 0.5.1", "subtle 2.4.0", @@ -1117,7 +1147,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" dependencies = [ - "byteorder 1.4.3", + "byteorder", "digest 0.9.0", "rand_core 0.5.1", "subtle 2.4.0", @@ -1130,11 +1160,31 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" +[[package]] +name = "data-encoding-macro" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" +dependencies = [ + "data-encoding", + "syn", +] + [[package]] name = "derive_more" -version = "0.99.13" +version = "0.99.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6" +checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" dependencies = [ "convert_case", "proc-macro2", @@ -1162,14 +1212,23 @@ dependencies = [ [[package]] name = "directories" -version = "2.0.2" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" +checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7" dependencies = [ - "cfg-if 0.1.10", "dirs-sys", ] +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" version = "0.3.6" @@ -1181,14 +1240,25 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + [[package]] name = "dns-parser" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" dependencies = [ - "byteorder 1.4.3", - "quick-error", + "byteorder", + "quick-error 1.2.3", ] [[package]] @@ -1237,7 +1307,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2 0.9.4", + "sha2 0.9.5", "zeroize", ] @@ -1253,7 +1323,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" dependencies = [ - "enumflags2_derive", + "enumflags2_derive 0.6.4", +] + +[[package]] +name = "enumflags2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8672257d642ffdd235f6e9c723c2326ac1253c8f3c022e7cfd2e57da55b1131" +dependencies = [ + "enumflags2_derive 0.7.0", ] [[package]] @@ -1267,6 +1346,17 @@ dependencies = [ "syn", ] +[[package]] +name = "enumflags2_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33526f770a27828ce7c2792fdb7cb240220237e0ff12933ed6c23957fc5dd7cf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "env_logger" version = "0.7.1" @@ -1282,15 +1372,15 @@ dependencies = [ [[package]] name = "environmental" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e" +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] name = "erased-serde" -version = "0.3.13" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c" +checksum = "3de9ad4541d99dc22b59134e7ff8dc3d6c988c89ecd7324bf10a8362b07a2afa" dependencies = [ "serde", ] @@ -1328,7 +1418,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", ] [[package]] @@ -1395,27 +1485,27 @@ 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.8", - "futures-timer 2.0.2", + "futures 0.3.15", + "futures-timer 3.0.2", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.9.0", + "parking_lot 0.11.1", ] [[package]] name = "fixed-hash" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "byteorder 1.4.3", - "rand 0.7.3", + "byteorder", + "rand 0.8.4", "rustc-hex", "static_assertions", ] @@ -1447,9 +1537,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf6132b853c84f0f4534fa9c25d6f43e6c2552168da5ad8b4890f9c4fb59926" +checksum = "632b95f97f332b2ff5bc3a42bc8e28772b067e333830e03fd046504f11cd0fb8" dependencies = [ "parity-scale-codec", ] @@ -1466,9 +1556,9 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "2.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b94f3dd88fd10ea9eb8bf6731ee22787deeb620c158766061ec1fc54170cda" +checksum = "70fe99487f84579a3f2c4ba52650fec875492eea41be0e4eea8019187f105052" dependencies = [ "frame-support", "frame-system", @@ -1485,18 +1575,23 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3266f3a995a86590e4116fd76e846e4250c2dff8dbb085e4038d76a356250771" +checksum = "2921b7890c5e4421a0b2eafbf835417eed8127b1cec3e1a0389515069f11d219" dependencies = [ + "Inflector", + "chrono", "frame-benchmarking", + "handlebars", "parity-scale-codec", "sc-cli", "sc-client-db", "sc-executor", "sc-service", + "serde", "sp-core", "sp-externalities", + "sp-keystore", "sp-runtime", "sp-state-machine", "structopt", @@ -1504,9 +1599,9 @@ dependencies = [ [[package]] name = "frame-executive" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0c4bcb8c34936657327c73c8a191159c998df425620bf4639737486d4bf5c0" +checksum = "1da8fd471442bee91b9b3f587ec832e3f47800374fdb89b4a66591cd7c42b29f" dependencies = [ "frame-support", "frame-system", @@ -1521,9 +1616,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "12.0.1" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61200390d9eb6bac07a60adafa6961ef250f9022970fabb2412183fc96ba5f6b" +checksum = "073f7bef18421362441a1708f8528e442234954611f95bdc554b313fb321948e" dependencies = [ "parity-scale-codec", "serde", @@ -1533,16 +1628,16 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a569b3964b996dae5a9aab81a04a65f81a386645db1f16583647fc67190b0748" +checksum = "04e521e6214615bd82ba6b5fc7fd40a9cc14fdeb40f83da5eba12aa2f8179fb8" dependencies = [ - "bitmask", + "bitflags", "frame-metadata", "frame-support-procedural", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "log", - "once_cell 1.7.2", + "once_cell", "parity-scale-codec", "paste", "serde", @@ -1552,6 +1647,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", + "sp-staking", "sp-state-machine", "sp-std", "sp-tracing", @@ -1559,10 +1655,11 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c107da590c5cf22f9bb96193812256e59c60f73786a72429660142d9000c07b" +checksum = "2668e24cbaba7f0e91d0c92a94bd1ae425a942608ad0b775db32477f5df4da9e" dependencies = [ + "Inflector", "frame-support-procedural-tools", "proc-macro2", "quote", @@ -1571,12 +1668,12 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb23ac15b9dfe806c1da92d6c8710fa09371ec61e13f4eadfdeef55e3d6b155b" +checksum = "d4f88cfd111e004590f4542b75e6d3302137b9067d7e7219e4ac47a535c3b5c1" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -1584,9 +1681,9 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fb72ae75d457bfcb457e1098cf18134967e9069ecc4bba2c77416924b44843" +checksum = "79285388b120ac96c15a791c56b26b9264f7231324fbe0fd05026acd92bf2e6a" dependencies = [ "proc-macro2", "quote", @@ -1595,12 +1692,12 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd441142244193759326c7311d075716d1aaa98a9ad50491af923a4c6e42f3b" +checksum = "f5fedbff05d665c00bf4e089b4377fcb15b8bd37ebc3e5fc06665474cf6e25d7" dependencies = [ "frame-support", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "serde", "sp-core", @@ -1612,9 +1709,9 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1c7102ca1f9f40220682dff62af93292db159e2457b1e439e882c11a4be646" +checksum = "e93602f58cdab9820b6d607b7b50834d9b878efa33405a65c89ebfb5a596b584" dependencies = [ "frame-benchmarking", "frame-support", @@ -1627,9 +1724,9 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb625cb0135571a965d63a99225733f7e37dfcfb59e28c1ad15416cee99fbaa" +checksum = "5cb9d2f86a903fdee4ca3d660c767e69a743cee8aeb103563a14ea52e9f0001d" dependencies = [ "parity-scale-codec", "sp-api", @@ -1647,6 +1744,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "fs_extra" version = "1.2.0" @@ -1675,6 +1782,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.31" @@ -1683,9 +1796,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" dependencies = [ "futures-channel", "futures-core", @@ -1698,34 +1811,19 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25" +checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" dependencies = [ "futures-core", "futures-sink", ] -[[package]] -name = "futures-channel-preview" -version = "0.3.0-alpha.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" -dependencies = [ - "futures-core-preview", -] - [[package]] name = "futures-core" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815" - -[[package]] -name = "futures-core-preview" -version = "0.3.0-alpha.19" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" +checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" [[package]] name = "futures-cpupool" @@ -1744,7 +1842,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9" dependencies = [ "futures 0.1.31", - "futures 0.3.8", + "futures 0.3.15", "lazy_static", "log", "parking_lot 0.9.0", @@ -1755,9 +1853,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d" +checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" dependencies = [ "futures-core", "futures-task", @@ -1767,48 +1865,60 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04" +checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" [[package]] name = "futures-lite" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" dependencies = [ "fastrand", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.7", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" +checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" dependencies = [ + "autocfg", "proc-macro-hack", "proc-macro2", "quote", "syn", ] +[[package]] +name = "futures-rustls" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" +dependencies = [ + "futures-io", + "rustls 0.19.1", + "webpki", +] + [[package]] name = "futures-sink" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5629433c555de3d82861a7a4e3794a4c40040390907cfbfd7143a92a426c23" +checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" [[package]] name = "futures-task" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7aa51095076f3ba6d9a1f702f74bd05ec65f555d70d2033d55ba8d69f581bc" +checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" [[package]] name = "futures-timer" @@ -1824,10 +1934,11 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025" +checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" dependencies = [ + "autocfg", "futures 0.1.31", "futures-channel", "futures-core", @@ -1836,40 +1947,16 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.7", "pin-utils", "proc-macro-hack", "proc-macro-nested", "slab", ] -[[package]] -name = "futures-util-preview" -version = "0.3.0-alpha.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" -dependencies = [ - "futures-channel-preview", - "futures-core-preview", - "pin-utils", - "slab", -] - -[[package]] -name = "futures_codec" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b" -dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", - "memchr", - "pin-project 0.4.28", -] - [[package]] name = "fuxi-runtime" -version = "2.0.1" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -1877,14 +1964,16 @@ dependencies = [ "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", - "hex-literal 0.3.1", + "hex-literal", "orml-currencies", "orml-tokens", + "orml-traits", + "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-bounties", "pallet-bridge", - "pallet-certificate", "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", @@ -1910,8 +1999,6 @@ dependencies = [ "pallet-staking-rpc-runtime-api", "pallet-sudo", "pallet-timestamp", - "pallet-token", - "pallet-trade", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -1931,9 +2018,9 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", - "substrate-wasm-builder-runner", + "substrate-wasm-builder", "uniarts-common", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] @@ -1961,28 +2048,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "get_if_addrs" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" -dependencies = [ - "c_linked_list", - "get_if_addrs-sys", - "libc", - "winapi 0.2.8", -] - -[[package]] -name = "get_if_addrs-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -dependencies = [ - "gcc", - "libc", -] - [[package]] name = "getrandom" version = "0.1.16" @@ -1996,9 +2061,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ "cfg-if 1.0.0", "libc", @@ -2017,9 +2082,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" dependencies = [ "fallible-iterator", "indexmap", @@ -2040,9 +2105,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "globset" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" +checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" dependencies = [ "aho-corasick", "bstr", @@ -2070,7 +2135,7 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" dependencies = [ - "byteorder 1.4.3", + "byteorder", "bytes 0.4.12", "fnv", "futures 0.1.31", @@ -2102,6 +2167,20 @@ dependencies = [ "tracing-futures", ] +[[package]] +name = "handlebars" +version = "3.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" +dependencies = [ + "log", + "pest", + "pest_derive", + "quick-error 2.0.1", + "serde", + "serde_json", +] + [[package]] name = "hash-db" version = "0.15.2" @@ -2117,59 +2196,29 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da" -dependencies = [ - "byteorder 1.4.3", - "scopeguard 0.3.3", -] - -[[package]] -name = "hashbrown" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" -dependencies = [ - "ahash 0.2.19", - "autocfg 0.1.7", -] - -[[package]] -name = "hashbrown" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "ahash 0.3.8", - "autocfg 1.0.1", -] - [[package]] name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash 0.4.7", + "ahash", ] [[package]] name = "heck" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] @@ -2180,31 +2229,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" -dependencies = [ - "hex-literal-impl", - "proc-macro-hack", -] - [[package]] name = "hex-literal" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8" -[[package]] -name = "hex-literal-impl" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f769599eb31de176303197b7ba4973299c38c7a7604a6bc88c3eef05b9b46" -dependencies = [ - "proc-macro-hack", -] - [[package]] name = "hex_fmt" version = "0.3.0" @@ -2221,6 +2251,16 @@ dependencies = [ "digest 0.8.1", ] +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac 0.8.0", + "digest 0.9.0", +] + [[package]] name = "hmac-drbg" version = "0.2.0" @@ -2229,7 +2269,7 @@ checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" dependencies = [ "digest 0.8.1", "generic-array 0.12.4", - "hmac", + "hmac 0.7.1", ] [[package]] @@ -2294,7 +2334,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error", + "quick-error 1.2.3", ] [[package]] @@ -2318,7 +2358,7 @@ dependencies = [ "time", "tokio 0.1.22", "tokio-buf", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-io", "tokio-reactor", "tokio-tcp", @@ -2362,7 +2402,7 @@ dependencies = [ "futures-util", "hyper 0.13.10", "log", - "rustls", + "rustls 0.18.1", "rustls-native-certs", "tokio 0.2.25", "tokio-rustls", @@ -2391,11 +2431,48 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "if-addrs" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28538916eb3f3976311f5dfbe67b5362d0add1293d0a9cad17debf86f8e3aa48" +dependencies = [ + "if-addrs-sys", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "if-addrs-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "if-watch" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b8538953a3f0d0d3868f0a706eb4273535e10d72acb5c82c1c23ae48835c85" +dependencies = [ + "async-io", + "futures 0.3.15", + "futures-lite", + "if-addrs", + "ipnet", + "libc", + "log", + "winapi 0.3.9", +] + [[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", ] @@ -2420,14 +2497,25 @@ dependencies = [ "syn", ] +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "indexmap" version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ - "autocfg 1.0.1", - "hashbrown 0.9.1", + "autocfg", + "hashbrown", "serde", ] @@ -2455,7 +2543,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "futures-timer 2.0.2", ] @@ -2476,18 +2564,9 @@ checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" [[package]] name = "ipnet" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" - -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] name = "itertools" @@ -2587,7 +2666,7 @@ version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -2692,9 +2771,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0315ef2f688e33844400b31f11c263f2b3dc21d8b9355c6891c5f185fae43f9a" +checksum = "8891bd853eff90e33024195d79d578dc984c82f9e0715fcd2b525a0c19d52811" dependencies = [ "parity-util-mem", "smallvec 1.6.1", @@ -2702,20 +2781,20 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73de822b260a3bdfb889dbbb65bb2d473eee2253973d6fa4a5d149a2a4a7c66e" +checksum = "30a0da8e08caf08d384a620ec19bb6c9b85c84137248e202617fb91881f25912" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.9.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44947dd392f09475af614d740fe0320b66d01cb5b977f664bbbb5e45a70ea4c1" +checksum = "94b27cdb788bf1c8ade782289f9dbee626940be2961fd75c7cde993fa2f1ded1" dependencies = [ "fs-swap", "kvdb", @@ -2723,7 +2802,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "regex", "rocksdb", "smallvec 1.6.1", @@ -2749,9 +2828,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.94" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" +checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "libloading" @@ -2781,13 +2860,13 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.28.1" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f5a4604c1a40d75651da141dfde29ad15329f537a779528803297d2220274" +checksum = "d5133112ce42be9482f6a87be92a605dd6bbc9e93c297aee77d172ff06908f3a" dependencies = [ "atomic", - "bytes 0.5.6", - "futures 0.3.8", + "bytes 1.0.1", + "futures 0.3.15", "lazy_static", "libp2p-core", "libp2p-core-derive", @@ -2810,26 +2889,25 @@ dependencies = [ "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "multihash", "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "smallvec 1.6.1", "wasm-timer", ] [[package]] name = "libp2p-core" -version = "0.22.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f13ba8c7df0768af2eb391696d562c7de88cc3a35122531aaa6a7d77754d25" +checksum = "8a2d56aadc2c2bf22cd7797f86e56a65b5b3994a0136b65be3106938acae7a26" dependencies = [ "asn1_der", - "bs58 0.3.1", + "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "lazy_static", "libsecp256k1", @@ -2837,26 +2915,26 @@ dependencies = [ "multihash", "multistream-select", "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "prost", "prost-build", "rand 0.7.3", "ring", "rw-stream-sink", - "sha2 0.8.2", + "sha2 0.9.5", "smallvec 1.6.1", "thiserror", - "unsigned-varint 0.4.0", + "unsigned-varint 0.7.0", "void", "zeroize", ] [[package]] name = "libp2p-core-derive" -version = "0.20.2" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213" +checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156" dependencies = [ "quote", "syn", @@ -2864,37 +2942,38 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.22.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74029ae187f35f4b8ddf26b9779a68b340045d708528a103917cdca49a296db5" +checksum = "6d42eed63305f0420736fa487f9acef720c4528bd7852a6a760f5ccde4813345" dependencies = [ "flate2", - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf319822e08dd65c8e060d2354e9f952895bbc433f5706c75ed010c152aee5e" +checksum = "5153b6db68fd4baa3b304e377db744dd8fea8ff4e4504509ee636abcde88d3e3" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "log", ] [[package]] name = "libp2p-floodsub" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a9acb43a3e4a4e413e0c4abe0fa49308df7c6335c88534757b647199cb8a51" +checksum = "b3c63dfa06581b24b1d12bf9815b43689a784424be217d6545c800c7c75a207f" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "libp2p-swarm", + "log", "prost", "prost-build", "rand 0.7.3", @@ -2903,37 +2982,37 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab20fcb60edebe3173bbb708c6ac3444afdf1e3152dc2866b10c4f5497f17467" +checksum = "12451ba9493e87c91baf2a6dffce9ddf1fbc807a0861532d7cf477954f8ebbee" dependencies = [ - "base64 0.11.0", - "byteorder 1.4.3", - "bytes 0.5.6", + "asynchronous-codec 0.5.0", + "base64 0.13.0", + "byteorder", + "bytes 1.0.1", "fnv", - "futures 0.3.8", - "futures_codec", + "futures 0.3.15", "hex_fmt", "libp2p-core", "libp2p-swarm", "log", - "lru_time_cache", "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", + "regex", + "sha2 0.9.5", "smallvec 1.6.1", - "unsigned-varint 0.4.0", + "unsigned-varint 0.6.0", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56396ee63aa9164eacf40c2c5d2bda8c4133c2f57e1b0425d51d3a4e362583b1" +checksum = "b40fb36a059b7a8cce1514bd8b546fa612e006c9937caa7f5950cb20021fe91e" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "libp2p-swarm", "log", @@ -2945,98 +3024,98 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.23.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7fa9047f8b8f544278a35c2d9d45d3b2c1785f2d86d4e1629d6edf97be3955" +checksum = "cf3da6c9acbcc05f93235d201d7d45ef4e8b88a45d8836f98becd8b4d443f066" dependencies = [ "arrayvec 0.5.2", - "bytes 0.5.6", + "asynchronous-codec 0.6.0", + "bytes 1.0.1", "either", "fnv", - "futures 0.3.8", - "futures_codec", + "futures 0.3.15", "libp2p-core", "libp2p-swarm", "log", - "multihash", "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", + "sha2 0.9.5", "smallvec 1.6.1", "uint", - "unsigned-varint 0.4.0", + "unsigned-varint 0.7.0", "void", "wasm-timer", ] [[package]] name = "libp2p-mdns" -version = "0.22.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3173b5a6b2f690c29ae07798d85b9441a131ac76ddae9015ef22905b623d0c69" +checksum = "0e9e6374814d1b118d97ccabdfc975c8910bd16dc38a8bc058eeb08bf2080fe1" dependencies = [ - "async-std", + "async-io", "data-encoding", "dns-parser", - "either", - "futures 0.3.8", + "futures 0.3.15", + "if-watch", "lazy_static", "libp2p-core", "libp2p-swarm", "log", - "net2", "rand 0.7.3", "smallvec 1.6.1", + "socket2 0.3.19", "void", - "wasm-timer", ] [[package]] name = "libp2p-mplex" -version = "0.22.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a73a799cc8410b36e40b8f4c4b6babbcb9efd3727111bf517876e4acfa612d3" +checksum = "350ce8b3923594aedabd5d6e3f875d058435052a29c3f32df378bc70d10be464" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures 0.3.8", - "futures_codec", + "asynchronous-codec 0.6.0", + "bytes 1.0.1", + "futures 0.3.15", "libp2p-core", "log", - "parking_lot 0.10.2", - "unsigned-varint 0.4.0", + "nohash-hasher", + "parking_lot 0.11.1", + "rand 0.7.3", + "smallvec 1.6.1", + "unsigned-varint 0.7.0", ] [[package]] name = "libp2p-noise" -version = "0.24.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef6c490042f549fb1025f2892dfe6083d97a77558f450c1feebe748ca9eb15a" +checksum = "4aca322b52a0c5136142a7c3971446fb1e9964923a526c9cc6ef3b7c94e57778" dependencies = [ - "bytes 0.5.6", - "curve25519-dalek 2.1.2", - "futures 0.3.8", + "bytes 1.0.1", + "curve25519-dalek 3.1.0", + "futures 0.3.15", "lazy_static", "libp2p-core", "log", "prost", "prost-build", "rand 0.7.3", - "sha2 0.8.2", + "sha2 0.9.5", "snow", "static_assertions", - "x25519-dalek 0.6.0", + "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad063c21dfcea4518ac9e8bd4119d33a5b26c41e674f602f41f05617a368a5c8" +checksum = "6f3813276d0708c8db0f500d8beda1bda9ad955723b9cb272c41f4727256f73c" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "libp2p-swarm", "log", @@ -3047,64 +3126,63 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.22.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903a12e99c72dbebefea258de887982adeacc7025baa1ceb10b7fa9928f54791" +checksum = "9d58defcadb646ae4b033e130b48d87410bf76394dc3335496cae99dac803e61" dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", - "futures_codec", + "asynchronous-codec 0.6.0", + "bytes 1.0.1", + "futures 0.3.15", "libp2p-core", "log", "prost", "prost-build", - "rw-stream-sink", - "unsigned-varint 0.4.0", + "unsigned-varint 0.7.0", "void", ] [[package]] name = "libp2p-pnet" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b3c2d5d26a9500e959a0e19743897239a6c4be78dadf99b70414301a70c006" +checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "log", - "pin-project 0.4.28", + "pin-project 1.0.7", "rand 0.7.3", "salsa20", - "sha3 0.9.1", + "sha3", ] [[package]] name = "libp2p-request-response" -version = "0.3.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0c9e8a4cd69d97e9646c54313d007512f411aba8c5226cfcda16df6a6e84a3" +checksum = "10e5552827c33d8326502682da73a0ba4bfa40c1b55b216af3c303f32169dd89" dependencies = [ "async-trait", - "bytes 0.5.6", - "futures 0.3.8", + "bytes 1.0.1", + "futures 0.3.15", "libp2p-core", "libp2p-swarm", "log", - "lru 0.6.5", + "lru", "minicbor", "rand 0.7.3", "smallvec 1.6.1", - "unsigned-varint 0.5.1", + "unsigned-varint 0.7.0", "wasm-timer", ] [[package]] name = "libp2p-swarm" -version = "0.22.0" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7193e444210132237b81b755ec7fe53f1c4bd2f53cf719729b94c0c72eb6eaa1" +checksum = "7955b973e1fd2bd61ffd43ce261c1223f61f4aacd5bae362a924993f9a25fd98" dependencies = [ "either", - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "log", "rand 0.7.3", @@ -3115,15 +3193,16 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.22.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f42ec130d7a37a7e47bf4398026b7ad9185c08ed26972e2720f8b94112796f" +checksum = "88a5aef80e519a6cb8e2663605142f97baaaea1a252eecbf8756184765f7471b" dependencies = [ - "async-std", - "futures 0.3.8", + "async-io", + "futures 0.3.15", "futures-timer 3.0.2", - "get_if_addrs", + "if-watch", "ipnet", + "libc", "libp2p-core", "log", "socket2 0.3.19", @@ -3131,23 +3210,23 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea7acb0a034f70d7db94c300eba3f65c0f6298820105624088a9609c9974d77" +checksum = "80ac51ce419f60be966e02103c17f67ff5dc4422ba83ba54d251d6c62a4ed487" dependencies = [ "async-std", - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.22.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34c1faac6f92c21fbe155417957863ea822fba9e9fd5eb24c0912336a100e63f" +checksum = "6149c46cb76935c80bc8be6ec6e3ebd5f5e1679765a255fb34331d54610f15dd" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -3157,31 +3236,29 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.23.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d650534ebd99f48f6fa292ed5db10d30df2444943afde4407ceeddab8e513fca" +checksum = "d3b1c6a3431045da8b925ed83384e4c5163e14b990572307fca9c507435d4d22" dependencies = [ - "async-tls", "either", - "futures 0.3.8", + "futures 0.3.15", + "futures-rustls", "libp2p-core", "log", "quicksink", - "rustls", "rw-stream-sink", "soketto", "url 2.2.2", - "webpki", - "webpki-roots 0.18.0", + "webpki-roots", ] [[package]] name = "libp2p-yamux" -version = "0.25.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781d9b9f043dcdabc40640807125368596b849fd4d96cdca2dcf052fdf6f33fd" +checksum = "4819358c542a86ff95f6ae691efb4b94ddaf477079b01a686f5705b79bfc232a" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "libp2p-core", "parking_lot 0.11.1", "thiserror", @@ -3244,31 +3321,21 @@ dependencies = [ [[package]] name = "linregress" -version = "0.1.7" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9" +checksum = "b1ff7f341d23e1275eec0656a9a07225fcc86216c4322392868adffe59023d1a" dependencies = [ - "failure", - "nalgebra", + "nalgebra 0.27.1", "statrs", ] -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -dependencies = [ - "scopeguard 0.3.3", -] - [[package]] name = "lock_api" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" dependencies = [ - "scopeguard 1.1.0", + "scopeguard", ] [[package]] @@ -3277,7 +3344,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ - "scopeguard 1.1.0", + "scopeguard", ] [[package]] @@ -3290,30 +3357,15 @@ dependencies = [ "value-bag", ] -[[package]] -name = "lru" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" -dependencies = [ - "hashbrown 0.6.3", -] - [[package]] name = "lru" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba" dependencies = [ - "hashbrown 0.9.1", + "hashbrown", ] -[[package]] -name = "lru_time_cache" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb241df5c4caeb888755363fc95f8a896618dc0d435e9e775f7930cb099beab" - [[package]] name = "mach" version = "0.3.2" @@ -3323,6 +3375,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matchers" version = "0.0.1" @@ -3340,9 +3398,9 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "matrixmultiply" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" dependencies = [ "rawpointer", ] @@ -3360,13 +3418,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] -name = "memmap" -version = "0.7.0" +name = "memmap2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" dependencies = [ "libc", - "winapi 0.3.9", ] [[package]] @@ -3375,26 +3432,26 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "memoffset" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] name = "memory-db" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f36ddb0b2cdc25d38babba472108798e3477f02be5165f038c5e393e50c57a" +checksum = "814bbecfc0451fc314eeea34f05bbcd5b98a7ad7af37faee088b86a1e633f1d4" dependencies = [ "hash-db", - "hashbrown 0.8.2", + "hashbrown", "parity-util-mem", ] @@ -3410,7 +3467,7 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ - "byteorder 1.4.3", + "byteorder", "keccak", "rand_core 0.5.1", "zeroize", @@ -3418,18 +3475,18 @@ dependencies = [ [[package]] name = "minicbor" -version = "0.5.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc03ad6f8f548db7194a5ff5a6f96342ecae4e3ef67d2bf18bacc0e245cd041" +checksum = "1c2b2c73f9640fccab53947e2b3474d5071fcbc8f82cac51ddf6c8041a30a9ea" dependencies = [ "minicbor-derive", ] [[package]] name = "minicbor-derive" -version = "0.4.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c214bf3d90099b52f3e4b328ae0fe34837fd0fab683ad1e10fceb4629106df48" +checksum = "7f2b9e8883d58e34b18facd16c4564a77ea50fce028ad3d0ee6753440e37acc8" dependencies = [ "proc-macro2", "quote", @@ -3443,7 +3500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -3523,8 +3580,8 @@ dependencies = [ [[package]] name = "module-support" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", @@ -3532,7 +3589,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] @@ -3541,21 +3598,48 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" +[[package]] +name = "multibase" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + [[package]] name = "multihash" -version = "0.11.4" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567122ab6492f49b59def14ecc36e13e64dca4188196dd0cd41f9f3f979f3df6" +checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" dependencies = [ "blake2b_simd", "blake2s_simd", + "blake3", "digest 0.9.0", - "sha-1 0.9.5", - "sha2 0.9.4", - "sha3 0.9.1", + "generic-array 0.14.4", + "multihash-derive", + "sha2 0.9.5", + "sha3", "unsigned-varint 0.5.1", ] +[[package]] +name = "multihash-derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" +dependencies = [ + "proc-macro-crate 1.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "multimap" version = "0.8.3" @@ -3564,35 +3648,62 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.8.5" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93faf2e41f9ee62fb01680ed48f3cc26652352327aa2e59869070358f6b7dd75" +checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8" dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", + "bytes 1.0.1", + "futures 0.3.15", "log", "pin-project 1.0.7", "smallvec 1.6.1", - "unsigned-varint 0.5.1", + "unsigned-varint 0.7.0", ] [[package]] name = "nalgebra" -version = "0.18.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" +checksum = "476d1d59fe02fe54c86356e91650cd892f392782a1cb9fc524ec84f7aa9e1d06" dependencies = [ - "alga", - "approx", - "generic-array 0.12.4", + "approx 0.4.0", + "matrixmultiply", + "num-complex 0.3.1", + "num-rational 0.3.2", + "num-traits", + "rand 0.8.4", + "rand_distr", + "simba 0.4.0", + "typenum", +] + +[[package]] +name = "nalgebra" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +dependencies = [ + "approx 0.5.0", "matrixmultiply", - "num-complex", - "num-rational", + "nalgebra-macros", + "num-complex 0.4.0", + "num-rational 0.4.0", "num-traits", - "rand 0.6.5", + "simba 0.5.1", "typenum", ] +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "names" version = "0.11.0" @@ -3613,19 +3724,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "nix" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" -dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] - [[package]] name = "nodrop" version = "0.1.14" @@ -3654,18 +3752,26 @@ 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", ] [[package]] name = "num-complex" -version = "0.2.4" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ - "autocfg 1.0.1", "num-traits", ] @@ -3675,7 +3781,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", ] @@ -3685,19 +3791,41 @@ 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", ] +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1", + "autocfg", "libm", ] @@ -3713,41 +3841,28 @@ dependencies = [ [[package]] name = "object" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" - -[[package]] -name = "object" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" +checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" dependencies = [ "crc32fast", "indexmap", - "wasmparser 0.57.0", ] [[package]] name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" - -[[package]] -name = "once_cell" -version = "0.1.8" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" +checksum = "a38f2be3697a57b4060074ff41b44c16870d916ad7877c17696e063257482bc7" dependencies = [ - "parking_lot 0.7.1", + "memchr", ] [[package]] name = "once_cell" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" dependencies = [ "parking_lot 0.11.1", ] @@ -3766,19 +3881,21 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "orml-currencies" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25d0216a08759868edcbf434b198a8a76cf1f04015a6e4509fbf09d5f4825c0" +checksum = "204fa52ab72cf353879bf57a6cccc64d1fadf3d44246d98007b218cc22fc4d06" dependencies = [ "frame-support", "frame-system", + "funty", "orml-traits", + "orml-utilities", "parity-scale-codec", "serde", "sp-io", @@ -3788,29 +3905,46 @@ dependencies = [ [[package]] name = "orml-tokens" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4382384f7c205d8c62654e36fd623c31b90ce6a36f3353426d33a1a6c4ac4c1b" +checksum = "0321e56f921689c6c78bf2b68e3deb03172065ca8f306d4d8432d09c3569bb9d" dependencies = [ "frame-support", "frame-system", + "funty", "orml-traits", "parity-scale-codec", "serde", - "sp-io", "sp-runtime", "sp-std", ] [[package]] name = "orml-traits" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1894c45ef7dd34390c71ee63189d1bfdb873347982d33c7378a7698d818aba1f" +checksum = "18dd4788a7b96709d23081b1a33a5b8477cf25833f20b27b19908d5babdfe7ab" dependencies = [ "frame-support", - "impl-trait-for-tuples", + "funty", + "impl-trait-for-tuples 0.1.3", "num-traits", + "orml-utilities", + "parity-scale-codec", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "orml-utilities" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f84d1a0ce4c65a8695cf8c41895c6161d2345214a4a413e674478f6a37968db" +dependencies = [ + "frame-support", + "funty", "parity-scale-codec", "serde", "sp-io", @@ -3829,21 +3963,23 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "serde", "sp-runtime", "sp-std", ] [[package]] name = "pallet-aura" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df67bf96a70cecc2c60989381bc3d21172cdb7534c187c20953f4594736a8ac" +checksum = "73ff6054e982e7841a2519c988680620a85c1da5cd32363998a30302ed47f6f9" dependencies = [ "frame-support", "frame-system", @@ -3853,7 +3989,6 @@ dependencies = [ "serde", "sp-application-crypto", "sp-consensus-aura", - "sp-inherents", "sp-runtime", "sp-std", "sp-timestamp", @@ -3861,13 +3996,13 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b04a80b2d09fcaacaea6190926012348df6ddb225690de098cb8c4cf3fd19b" +checksum = "47433a94141451e7079aabf3ca28f2bde8c642d84b568be9626e9b7cae8b11b1" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "sp-authorship", "sp-inherents", @@ -3877,9 +4012,9 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452c3bfacacee9b272f4236a2bcad488dcb5751ebfd592b2cd8921fa5017df16" +checksum = "41aaeaf084e594273f82bcbf96416ef1fcab602e15dd1df04b9930eceb2eb518" dependencies = [ "frame-benchmarking", "frame-support", @@ -3891,45 +4026,47 @@ dependencies = [ ] [[package]] -name = "pallet-bridge" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#9466138d88eda54386c6e6eaffffafeabf651a84" +name = "pallet-bounties" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e6b704c712d51d146baa9fc0215a23215d222b8deab7c3270eb51ff2a09d1d" dependencies = [ "frame-support", "frame-system", - "log", - "orml-currencies", - "orml-tokens", - "orml-traits", - "pallet-balances", - "pallet-timestamp", + "pallet-treasury", "parity-scale-codec", "serde", - "sha3 0.8.2", - "sp-core", - "sp-io", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", ] [[package]] -name = "pallet-certificate" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +name = "pallet-bridge" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", + "orml-currencies", + "orml-tokens", + "orml-traits", + "pallet-balances", + "pallet-timestamp", "parity-scale-codec", + "serde", + "sha3", + "sp-core", + "sp-io", "sp-runtime", "sp-std", + "uniarts-primitives", ] [[package]] name = "pallet-collective" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ea2111eeeac7ffc3bf6b3b5ea7d9a60bea8a0fdc5c336f09132cfe19be9fe4" +checksum = "fe826f3bfb984b3dd8d6675d7d156ba4c0877ee562bf59d86a4e805b7737dcb1" dependencies = [ "frame-benchmarking", "frame-support", @@ -3944,17 +4081,17 @@ dependencies = [ [[package]] name = "pallet-contracts" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b29ec11235d233bf0581cf291f82a39b1a0a6665a52abe7507097ffa15d77c8c" +checksum = "d0979c1dd82fc56a87b37311006fe56f406de027c24591353058e9e9fc56487c" dependencies = [ - "bitflags", "frame-support", "frame-system", "pallet-contracts-primitives", + "pallet-contracts-proc-macro", "parity-scale-codec", - "parity-wasm", - "pwasm-utils", + "parity-wasm 0.41.0", + "pwasm-utils 0.16.0", "serde", "sp-core", "sp-io", @@ -3966,20 +4103,32 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500f8c78addfa87d4ae5f84de78d7887d3ae7db6c8c8660161a883551a5f7e52" +checksum = "621d75148763349f72e76e79f62365d28adb51e3f2e0285e4e8b8600ae600978" dependencies = [ + "bitflags", "parity-scale-codec", "sp-runtime", "sp-std", ] +[[package]] +name = "pallet-contracts-proc-macro" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90046017aeee3f77752a6c77cdfb1bc93eb728591dc6edad36e2706f7626fd50" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pallet-contracts-rpc" -version = "0.8.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef28f226cba2527ee19b23501072d277d2cd8add5b8cdc055b7a4344503a696c" +checksum = "22491e3c304819f96c83d02e43bd99128e4e42a57da4d6a9d4b5193778da915b" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -3997,9 +4146,9 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" -version = "0.8.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943fb45a9eade6da9ec1330361473cd667a3e755b10b7234f55ed4967ae9d90e" +checksum = "bb4b410cb148e68256e3827854a67ec34b16157f448e78173219dcd6a8ec7343" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -4010,9 +4159,9 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eea3cf2f885b0a195bbd3abe47f965112331cae5b8b6a81826681c1a2ee6d68" +checksum = "3adf1233ea7b9129a40247ac04650bb6ccb3f8f6e714df75cb65ac65185fdd33" dependencies = [ "frame-support", "frame-system", @@ -4023,34 +4172,16 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-finality-tracker" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9cc2a60c50a1f5eaeea37e2356b525b58a205688b1dc4e0a750e61a4410191d" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "parity-scale-codec", - "serde", - "sp-finality-tracker", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-grandpa" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f2d199175fa44a595cc4d2e3e5b3decb7a1f03bdac02cd663bbc2fab58af70" +checksum = "7c012cb0337ce1eaf0685be2777bce1ef8c5d7b7be77ea33916c316b40af43fa" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-authorship", - "pallet-finality-tracker", "pallet-session", "parity-scale-codec", "serde", @@ -4065,11 +4196,11 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9e40d8444fc802519a3a92754e7d45ad40d86415791ef7880205b49e4488e9" +checksum = "6bbbf9b67df31ea9fc579ec166aab6da9acabac2f5caf0d954cfb24821466420" dependencies = [ - "enumflags2", + "enumflags2 0.6.4", "frame-benchmarking", "frame-support", "frame-system", @@ -4082,9 +4213,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f204e45af958dd3bd8fe0e884a00c30fa745b653cc8ed7fe33f9f8db536fd58e" +checksum = "c080576a1fbb1187b7da9f4cba739076bbb197f44964892b2d392755920bbf63" dependencies = [ "frame-support", "frame-system", @@ -4099,9 +4230,9 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dd8debea7ad0a29d9f4018a4450d628950f621050dd8488f588d1b93880049" +checksum = "531c600ffd1f92cc510ecfb59a94d0c81af8fc57c8b920d0858f39ea9f8ad060" dependencies = [ "frame-support", "frame-system", @@ -4114,9 +4245,9 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1af73af221c006e5a7ee919116fdd5a47bb198ec5a08b2a07609a78f8bfdfd7" +checksum = "775556e56d1b9ab9a2437b8ea281bb16d7aadda8f309213d6d72d0a6a4c6fec4" dependencies = [ "frame-support", "frame-system", @@ -4130,10 +4261,10 @@ dependencies = [ [[package]] name = "pallet-names" -version = "1.0.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ - "enumflags2", + "enumflags2 0.7.1", "frame-support", "frame-system", "parity-scale-codec", @@ -4145,33 +4276,31 @@ dependencies = [ [[package]] name = "pallet-nft" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", - "log", "module-support", "pallet-names", "pallet-transaction-payment", "parity-scale-codec", "serde", - "sha3 0.8.2", + "sha3", "sp-core", "sp-io", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] name = "pallet-nft-blindbox" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", - "log", "module-support", "orml-currencies", "orml-tokens", @@ -4180,22 +4309,20 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "serde", - "sha3 0.8.2", "sp-core", "sp-io", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] name = "pallet-nft-multi" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", - "log", "module-support", "orml-currencies", "orml-tokens", @@ -4204,19 +4331,19 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "serde", - "sha3 0.8.2", + "sha3", "sp-core", "sp-io", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] name = "pallet-nicks" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fb91384f17c95170e1bf43815239873f0a452439cb1010bb4d98d311951646" +checksum = "b4373fb3928866b1c43c82ac58518ee844811488a5ebd51b00b6af2163766c68" dependencies = [ "frame-support", "frame-system", @@ -4229,9 +4356,9 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aef2ebae7bcd5ccfb185a3515b1647948d3680371653dbcffa175436c26af4e" +checksum = "82b3aeaa4977795fce9a1b19d0bd0f0819602b18eb262fdaea1be620f0efe55c" dependencies = [ "frame-support", "frame-system", @@ -4245,9 +4372,9 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620221883f96e1b3d6288f29b3a87a0f27acaae069a15516440d5a5b8a66d2e3" +checksum = "ca3ea6fa9aa36735ec11d7ec4d97dd6472650c0656fdc6d4adaca2578bd71134" dependencies = [ "frame-support", "frame-system", @@ -4259,11 +4386,11 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b596854bdafd6c165caad932eabba6b256db2c7047a5ab8f75014ef81ac5a57" +checksum = "38f95dbcab9318a0ddad6306698e312a117b5d876518e0fe954e35de9b9c8f7e" dependencies = [ - "enumflags2", + "enumflags2 0.6.4", "frame-support", "frame-system", "parity-scale-codec", @@ -4275,13 +4402,12 @@ dependencies = [ [[package]] name = "pallet-rewards" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "pallet-aura", "pallet-session", "parity-scale-codec", @@ -4293,9 +4419,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30da3f349dad70619631018c263a7499401ddb16609ba5615a7856c2f182d1ba" +checksum = "11230ac868a04833d27a18f37d00572d26866f4718e9cce0557d698e3997b6d6" dependencies = [ "frame-support", "frame-system", @@ -4307,13 +4433,13 @@ dependencies = [ [[package]] name = "pallet-session" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d239080d33f284a388b8510ffff3d08452314515e122c2f979d8989578e638aa" +checksum = "6d243c3ccac56a4c55fade6be5c5af1de07fac374fa7856377980a76b0c193cf" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "pallet-timestamp", "parity-scale-codec", "serde", @@ -4328,9 +4454,9 @@ dependencies = [ [[package]] name = "pallet-society" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02184ed5c4ab8ec0ce8c0ef64e180a9085b3243c296d9c0c154c54c9fd59f56f" +checksum = "b01491c412abf6318a9f76b92ec818d920350c3af88028c6d4026025ee2bac94" dependencies = [ "frame-support", "frame-system", @@ -4343,8 +4469,8 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", @@ -4358,8 +4484,8 @@ dependencies = [ [[package]] name = "pallet-staking-rpc" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#10ae2dbb1a6027f87afa3134d1d872047c32fd4a" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4376,8 +4502,8 @@ dependencies = [ [[package]] name = "pallet-staking-rpc-runtime-api" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#10ae2dbb1a6027f87afa3134d1d872047c32fd4a" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "parity-scale-codec", @@ -4389,9 +4515,9 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f85da30f939010eef16b54bd5a7af6517ce8ba04c8de4ccfd49e092eeb284e0" +checksum = "c4a96774302e3824b7924c2465935ca4d558ea5f6a762c043fbc45fd2646ce89" dependencies = [ "frame-support", "frame-system", @@ -4404,14 +4530,14 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e206c754d6cd6d8e6e79ba2ea1a55f72af68be106e7d725d367c11c52c96da32" +checksum = "b17dd274716a55a2c3e34d9c0ed66aaac3d7e0393ec9fd985e2b8532d697a7f3" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "serde", "sp-inherents", @@ -4421,51 +4547,14 @@ dependencies = [ "sp-timestamp", ] -[[package]] -name = "pallet-token" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" -dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "pallet-randomness-collective-flip", - "parity-scale-codec", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-trade" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" -dependencies = [ - "byteorder 1.4.3", - "frame-support", - "frame-system", - "num-traits", - "pallet-balances", - "pallet-randomness-collective-flip", - "pallet-token", - "parity-scale-codec", - "safe-mix", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-transaction-payment" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a34775aaf85a16cb1db44a1bef33c4ce6ef327fedb0c8eda7543991ccee7f73" +checksum = "48e10dc1a10dd3f52edb20d3885cf5b2b16f26273a4d93e61331c6691fb13ab3" dependencies = [ "frame-support", "frame-system", - "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "serde", "smallvec 1.6.1", @@ -4477,16 +4566,15 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8523248607c065de24924df7da7b2ac1d8255f9d7758439de5a1225e1c4a4bb9" +checksum = "7835717b7d8fb59c33dd73f083c68a6d143a1dbe6029364c63ea7f4cb0ba3f9c" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "serde", "sp-api", "sp-blockchain", "sp-core", @@ -4496,26 +4584,25 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31dee86d07fe9c5493be5ec01d53759cc2fd65b55b5c144ba7d2bb28fa8c243c" +checksum = "7a92d3383260d0d19d9a36f40766d48d779fd19baccba8b20c3e7d2670a26ee1" dependencies = [ - "frame-support", + "pallet-transaction-payment", "parity-scale-codec", - "serde", "sp-api", "sp-runtime", - "sp-std", ] [[package]] name = "pallet-treasury" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805a91aba6aca050e7a60d3e07070eaa28790d752c2ebbfd5961e1c5c6a95ebd" +checksum = "d19f881664d42d1c33dd67e690d6bddd35d38723fcc099b19304f9723fc3070c" dependencies = [ "frame-support", "frame-system", + "impl-trait-for-tuples 0.2.1", "pallet-balances", "parity-scale-codec", "serde", @@ -4525,9 +4612,9 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c4578a0a2133fb7c5ef5c55ef7d0fe8e0e7a4bd8cedee308ee97fa10903966d" +checksum = "fcd63d1b336800d155ab60ee918afd111f7449e44cec936f460d555e850fa93b" dependencies = [ "frame-support", "frame-system", @@ -4541,8 +4628,8 @@ dependencies = [ [[package]] name = "pallet-validator-set" -version = "0.1.0" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", @@ -4556,11 +4643,11 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29727fd6e47463bcb39766645544a8c7c73072dbc35e65f084848f513705773c" +checksum = "4e4e1af42bbdf1d477c3762387c74855f24bca47700df3ce7d9428045986b544" dependencies = [ - "enumflags2", + "enumflags2 0.6.4", "frame-support", "frame-system", "parity-scale-codec", @@ -4571,7 +4658,7 @@ dependencies = [ [[package]] name = "pangu-runtime" -version = "2.0.1" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -4579,12 +4666,12 @@ dependencies = [ "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", - "hex-literal 0.3.1", + "hex-literal", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", - "pallet-certificate", + "pallet-bounties", "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", @@ -4609,8 +4696,6 @@ dependencies = [ "pallet-staking-rpc-runtime-api", "pallet-sudo", "pallet-timestamp", - "pallet-token", - "pallet-trade", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", @@ -4630,50 +4715,53 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", - "substrate-wasm-builder-runner", + "substrate-wasm-builder", "uniarts-common", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] name = "parity-db" -version = "0.1.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d595e372d119261593297debbe4193811a4dc811d2a1ccbb8caaa6666ad7ab" +checksum = "2e337f62db341435f0da05b8f6b97e984ef4ea5800510cd07c2d624688c40b47" dependencies = [ "blake2-rfc", "crc32fast", + "fs2", + "hex", "libc", "log", - "memmap", - "parking_lot 0.10.2", + "memmap2", + "parking_lot 0.11.1", + "rand 0.8.4", ] [[package]] name = "parity-multiaddr" -version = "0.9.7" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbecae7b7cfaafea47ceb5253ecdd14155ca8410e3487ed86031a6c2d5c15873" +checksum = "58341485071825827b7f03cf7efd1cb21e6a709bea778fb50227fd45d2f361b4" dependencies = [ "arrayref", - "bs58 0.4.0", - "byteorder 1.4.3", + "bs58", + "byteorder", "data-encoding", "multihash", "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint 0.5.1", + "unsigned-varint 0.7.0", "url 2.2.2", ] [[package]] name = "parity-scale-codec" -version = "1.3.7" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b26b16c7687c3075982af47719e481815df30bc544f7a6690763a25ca16e9d" +checksum = "b310f220c335f9df1b3d2e9fbe3890bbfeef5030dad771620f48c5c229877cd3" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.1", "bitvec", "byte-slice-cast", "parity-scale-codec-derive", @@ -4682,11 +4770,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "1.2.3" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41512944b1faff334a5f1b9447611bf4ef40638ccb6328173dacefb338e878c" +checksum = "81038e13ca2c32587201d544ea2e6b6c47120f1e4eae04478f9f60b6bcb89145" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -4719,16 +4807,16 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c" +checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.8.2", - "impl-trait-for-tuples", + "cfg-if 1.0.0", + "hashbrown", + "impl-trait-for-tuples 0.2.1", "jemallocator", "parity-util-mem-derive", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "primitive-types", "smallvec 1.6.1", "winapi 0.3.9", @@ -4745,6 +4833,15 @@ dependencies = [ "synstructure", ] +[[package]] +name = "parity-wasm" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ad52817c4d343339b3bc2e26861bd21478eda0b7509acf83505727000512ac" +dependencies = [ + "byteorder", +] + [[package]] name = "parity-wasm" version = "0.41.0" @@ -4757,7 +4854,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61" dependencies = [ - "byteorder 1.4.3", + "byteorder", "bytes 0.4.12", "httparse", "log", @@ -4775,16 +4872,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -dependencies = [ - "lock_api 0.1.5", - "parking_lot_core 0.4.0", -] - [[package]] name = "parking_lot" version = "0.9.0" @@ -4817,19 +4904,6 @@ dependencies = [ "parking_lot_core 0.8.3", ] -[[package]] -name = "parking_lot_core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -dependencies = [ - "libc", - "rand 0.6.5", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", -] - [[package]] name = "parking_lot_core" version = "0.6.2" @@ -4868,41 +4942,42 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.8", + "redox_syscall 0.2.9", "smallvec 1.6.1", "winapi 0.3.9", ] [[package]] name = "paste" -version = "0.1.18" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" [[package]] -name = "paste-impl" -version = "0.1.18" +name = "pbkdf2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" +checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" dependencies = [ - "proc-macro-hack", + "byteorder", + "crypto-mac 0.7.0", ] [[package]] name = "pbkdf2" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" dependencies = [ - "byteorder 1.4.3", - "crypto-mac 0.7.0", - "rayon", + "crypto-mac 0.8.0", ] +[[package]] +name = "pdqselect" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -4921,6 +4996,49 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pest" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +dependencies = [ + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +dependencies = [ + "maplit", + "pest", + "sha-1 0.8.2", +] + [[package]] name = "petgraph" version = "0.5.1" @@ -4979,9 +5097,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pin-utils" @@ -4997,20 +5115,20 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "platforms" -version = "0.2.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" +checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" [[package]] name = "polling" -version = "2.0.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b" +checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" dependencies = [ "cfg-if 1.0.0", "libc", "log", - "wepoll-sys", + "wepoll-ffi", "winapi 0.3.9", ] @@ -5043,9 +5161,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "primitive-types" -version = "0.7.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd39dcacf71411ba488570da7bbc89b717225e46478b30ba99b92db6b149809" +checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" dependencies = [ "fixed-hash", "impl-codec", @@ -5062,6 +5180,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -5100,20 +5228,20 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" +checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" dependencies = [ "unicode-xid", ] [[package]] name = "prometheus" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d70cf4412832bcac9cffe27906f4a66e450d323525e977168c70d1b36120ae" +checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "fnv", "lazy_static", "parking_lot 0.11.1", @@ -5123,23 +5251,23 @@ dependencies = [ [[package]] name = "prost" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost-derive", ] [[package]] name = "prost-build" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" +checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "heck", - "itertools 0.8.2", + "itertools", "log", "multimap", "petgraph", @@ -5151,12 +5279,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" dependencies = [ "anyhow", - "itertools 0.8.2", + "itertools", "proc-macro2", "quote", "syn", @@ -5164,23 +5292,43 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost", ] +[[package]] +name = "psm" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ff0279b4a85e576b97e4a21d13e437ebcd56612706cde5d3f0d5c9399490c0" +dependencies = [ + "cc", +] + [[package]] name = "pwasm-utils" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f53bc2558e8376358ebdc28301546471d67336584f6438ed4b7c7457a055fd7" dependencies = [ - "byteorder 1.4.3", + "byteorder", + "log", + "parity-wasm 0.41.0", +] + +[[package]] +name = "pwasm-utils" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c8ac87af529432d3a4f0e2b3bbf08af49f28f09cc73ed7e551161bdaef5f78d" +dependencies = [ + "byteorder", "log", - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] @@ -5189,6 +5337,12 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quicksink" version = "0.1.2" @@ -5211,9 +5365,9 @@ dependencies = [ [[package]] name = "radium" -version = "0.3.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] name = "rand" @@ -5238,38 +5392,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "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" @@ -5281,29 +5403,19 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", - "rand_pcg 0.2.1", + "rand_pcg", ] [[package]] name = "rand" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", -] - -[[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_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", ] [[package]] @@ -5318,12 +5430,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core 0.6.3", ] [[package]] @@ -5352,20 +5464,21 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.3", ] [[package]] -name = "rand_hc" -version = "0.1.0" +name = "rand_distr" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142" dependencies = [ - "rand_core 0.3.1", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -5379,55 +5492,11 @@ dependencies = [ [[package]] name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.2", -] - -[[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", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", + "rand_core 0.6.3", ] [[package]] @@ -5439,20 +5508,11 @@ 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.4" +version = "8.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41" +checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73" dependencies = [ "bitflags", "cc", @@ -5467,11 +5527,11 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ - "autocfg 1.0.1", + "autocfg", "crossbeam-deque 0.8.0", "either", "rayon-core", @@ -5479,13 +5539,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque 0.8.0", - "crossbeam-utils 0.8.4", + "crossbeam-utils 0.8.5", "lazy_static", "num_cpus", ] @@ -5507,9 +5567,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" +checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee" dependencies = [ "bitflags", ] @@ -5520,8 +5580,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.2", - "redox_syscall 0.2.8", + "getrandom 0.2.3", + "redox_syscall 0.2.9", ] [[package]] @@ -5546,9 +5606,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.27" +version = "0.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ba8aaf5fe7cf307c6dbdaeed85478961d29e25e3bee5169e11b92fa9f027a8" +checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ "log", "rustc-hash", @@ -5568,11 +5628,10 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "byteorder 1.4.3", "regex-syntax", ] @@ -5617,7 +5676,7 @@ checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", - "once_cell 1.7.2", + "once_cell", "spin", "untrusted", "web-sys", @@ -5626,9 +5685,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6" +checksum = "c749134fda8bfc90d0de643d59bfc841dcb3ac8a1062e12b6754bd60235c48b3" dependencies = [ "libc", "librocksdb-sys", @@ -5636,9 +5695,9 @@ dependencies = [ [[package]] name = "rpassword" -version = "4.0.5" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", "winapi 0.3.9", @@ -5646,9 +5705,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce" +checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" [[package]] name = "rustc-hash" @@ -5668,7 +5727,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver", + "semver 0.9.0", ] [[package]] @@ -5684,6 +5743,19 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.0", + "log", + "ring", + "sct", + "webpki", +] + [[package]] name = "rustls-native-certs" version = "0.4.0" @@ -5691,7 +5763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" dependencies = [ "openssl-probe", - "rustls", + "rustls 0.18.1", "schannel", "security-framework", ] @@ -5702,7 +5774,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "pin-project 0.4.28", "static_assertions", ] @@ -5724,20 +5796,29 @@ dependencies = [ [[package]] name = "salsa20" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f47b10fa80f6969bbbd9c8e7cc998f082979d402a9e10579e2303a87955395" +checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" dependencies = [ - "stream-cipher", + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", ] [[package]] name = "sc-basic-authorship" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c087f2beb766773fd08e4c9df6296868a41ce8f3ea5e3d42eff78a09e89dd7c" +checksum = "de86afb63617599821312bda08882451ff2b49d9c45e22513ddff5a07c6d966e" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "log", "parity-scale-codec", @@ -5753,14 +5834,13 @@ dependencies = [ "sp-runtime", "sp-transaction-pool", "substrate-prometheus-endpoint", - "tokio-executor 0.2.0-alpha.6", ] [[package]] name = "sc-block-builder" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ed774daf2956291bb2ed943fcfa93ebb3d956db54b96c0d1f476185dbf601b" +checksum = "9862161f9d09d870401c7256c89ad1eb3afa56a61f7d7135c2bac76ff7152955" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5776,29 +5856,33 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9a5bfd8e2de21b2ec0041961b3d8c134473a2ed7a7558ad84dff417101b97c" +checksum = "50d97030776b49bc9c109e2d349212d8f2500637761048e1af5b7ce2dfd994c7" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "sc-chain-spec-derive", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-finality-grandpa", "sc-network", "sc-telemetry", "serde", "serde_json", "sp-chain-spec", + "sp-consensus-babe", "sp-core", "sp-runtime", ] [[package]] name = "sc-chain-spec-derive" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e8725cf0c53da3734df5b89b3b4f457fba6c3d359762f3a24b24ec9c4011830" +checksum = "5f14985513db9798fcedea58bdc8a08f1c6b3a515d6546ced7467b059b7982c4" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -5806,30 +5890,22 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3655ef6fcc2dd8a167085fa6d5ae026819c27e75253a6f927b38d96e00801ee6" +checksum = "7ec1647b5c1483fa05f7f32e436d0e378e2f3d5696a5a30bddf66f5faf28acb4" dependencies = [ - "ansi_term 0.12.1", - "atty", - "bip39", "chrono", - "derive_more", "fdlimit", - "futures 0.3.8", + "futures 0.3.15", "hex", - "lazy_static", "libp2p", "log", "names", - "nix", "parity-scale-codec", - "parity-util-mem", "rand 0.7.3", "regex", "rpassword", "sc-client-api", - "sc-informant", "sc-keystore", "sc-network", "sc-service", @@ -5840,38 +5916,33 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-keyring", + "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-state-machine", "sp-utils", "sp-version", "structopt", - "substrate-prometheus-endpoint", - "time", + "thiserror", + "tiny-bip39", "tokio 0.2.25", - "tracing", - "tracing-log", - "tracing-subscriber", ] [[package]] name = "sc-client-api" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592d3f0f8d777e6b21a95217a88859d53eb9b8ced1d6d5f2de917f637c0089b1" +checksum = "56d8b2c8dc0cee9ac56e87ad50c980edbdeb35bdd5b5d9da4ae90567423363be" dependencies = [ "derive_more", "fnv", - "futures 0.3.8", + "futures 0.3.15", "hash-db", - "hex-literal 0.3.1", "kvdb", "lazy_static", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-executor", - "sc-telemetry", "sp-api", "sp-blockchain", "sp-consensus", @@ -5879,7 +5950,7 @@ dependencies = [ "sp-database", "sp-externalities", "sp-inherents", - "sp-keyring", + "sp-keystore", "sp-runtime", "sp-state-machine", "sp-std", @@ -5893,9 +5964,9 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db7eeff373a5a3daf93a64857dcaac9a1ba95151868c0cbd65ee3ac12d6a2e7" +checksum = "5741e447d71ff36c147f961b2271b6b3fad0cc347e96936bc8b63ddffa594b27" dependencies = [ "blake2-rfc", "hash-db", @@ -5907,7 +5978,7 @@ dependencies = [ "parity-db", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-executor", "sc-state-db", @@ -5924,9 +5995,9 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79886c07e275cb1f105459cb439034a5a0d82f310c121b8e43729d171792361b" +checksum = "99f20cc8b8a74e218365ac4187bce26ea631d58d221caa1797bc6ec8056dba33" dependencies = [ "sc-client-api", "sp-blockchain", @@ -5936,20 +6007,19 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c167e1adb19207b6c5c4c137e0ec1199fc92022c8bbe3c020c55195301bff8a" +checksum = "8e0d32ccddef567a0fe373729aa4da51b2d437cbb102b9810400c9e77e040c1d" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-block-builder", "sc-client-api", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", "sp-api", "sp-application-crypto", @@ -5957,30 +6027,94 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-aura", + "sp-consensus-slots", "sp-core", "sp-inherents", "sp-io", + "sp-keystore", "sp-runtime", "sp-timestamp", "sp-version", "substrate-prometheus-endpoint", ] +[[package]] +name = "sc-consensus-babe" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d52048476e0fcb53feae8ca919a602104f1ba0b89a729b496440f36b332961" +dependencies = [ + "derive_more", + "fork-tree", + "futures 0.3.15", + "futures-timer 3.0.2", + "log", + "merlin", + "num-bigint", + "num-rational 0.2.4", + "num-traits", + "parity-scale-codec", + "parking_lot 0.11.1", + "pdqselect", + "rand 0.7.3", + "retain_mut", + "sc-client-api", + "sc-consensus-epochs", + "sc-consensus-slots", + "sc-consensus-uncles", + "sc-keystore", + "sc-telemetry", + "schnorrkel", + "serde", + "sp-api", + "sp-application-crypto", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-slots", + "sp-consensus-vrf", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-timestamp", + "sp-utils", + "sp-version", + "substrate-prometheus-endpoint", +] + +[[package]] +name = "sc-consensus-epochs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "326313ffb249a526e8ee8e08af9fdf0c4459cebeaa760b934e9df3985b68e4df" +dependencies = [ + "fork-tree", + "parity-scale-codec", + "parking_lot 0.11.1", + "sc-client-api", + "sp-blockchain", + "sp-runtime", +] + [[package]] name = "sc-consensus-slots" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c497d8d503496725e31270adb3cb71300d8c1ddf00720ccbc52df339229a86" +checksum = "76e09ff8b680d449102da9717a70c3bbbbb981fd4cf1bfbafc1739d954eb0898" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-telemetry", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", @@ -5988,21 +6122,38 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", + "sp-trie", + "thiserror", +] + +[[package]] +name = "sc-consensus-uncles" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37294bae6d787eecf2b15255dc75cd559b4ad813e0efcf28cd4423e218931b80" +dependencies = [ + "log", + "sc-client-api", + "sp-authorship", + "sp-consensus", + "sp-core", + "sp-inherents", + "sp-runtime", ] [[package]] name = "sc-executor" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95038e7e148e5529ae3e254e14559253db018e84ff8f9327c3469c2477d3fbc6" +checksum = "bace6a35999d2da7311d8fb98a29c1e89dbf0d14e50ac14140f2c38089819f46" dependencies = [ "derive_more", "lazy_static", "libsecp256k1", "log", "parity-scale-codec", - "parity-wasm", - "parking_lot 0.10.2", + "parity-wasm 0.41.0", + "parking_lot 0.11.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -6013,6 +6164,7 @@ dependencies = [ "sp-panic-handler", "sp-runtime-interface", "sp-serializer", + "sp-tasks", "sp-trie", "sp-version", "sp-wasm-interface", @@ -6021,27 +6173,26 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b3772b7631ba1aeae54aee9492a1272e9aaf8b29f20b36d6596ba3ad9540782" +checksum = "87004102a8e95f432f1c624c7fa7fb0edc5995db2e0fcbabbb697f1955e7c1d2" dependencies = [ "derive_more", - "log", "parity-scale-codec", - "parity-wasm", + "parity-wasm 0.41.0", "sp-allocator", "sp-core", - "sp-runtime-interface", "sp-serializer", "sp-wasm-interface", + "thiserror", "wasmi", ] [[package]] name = "sc-executor-wasmi" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1579a26b4c15e44ec5c65639bfe99b9594b75907d628435a5771142a4fff1a" +checksum = "2d3d7b6db2df5f2c24848883a855a8276363f00cef5b49744974f7e1203bf274" dependencies = [ "log", "parity-scale-codec", @@ -6055,14 +6206,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ff45286bfe5fbb3cf1dd92aaabe117e5fccd0cf4fec40e3fb57eed5d46080c" +checksum = "24673c981fad2dff4398a09a1086579e2774f18d81639fa2bd9cb215e6dd9e36" dependencies = [ "log", "parity-scale-codec", - "parity-wasm", - "pwasm-utils", + "parity-wasm 0.41.0", + "pwasm-utils 0.14.0", "sc-executor-common", "scoped-tls", "sp-allocator", @@ -6074,19 +6225,20 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e8f0387bad591eff97c85da017910bdec5b307cfda4a9cefa7838aef182c57" +checksum = "a7e87e63c57933e173a8643ff197b579e3fc5c91b16ca006096f482de8159318" dependencies = [ "derive_more", "finality-grandpa", "fork-tree", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", + "linked-hash-map", "log", "parity-scale-codec", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "rand 0.7.3", "sc-block-builder", "sc-client-api", @@ -6103,8 +6255,8 @@ dependencies = [ "sp-consensus", "sp-core", "sp-finality-grandpa", - "sp-finality-tracker", "sp-inherents", + "sp-keystore", "sp-runtime", "sp-utils", "substrate-prometheus-endpoint", @@ -6112,12 +6264,12 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1216d1c69f8af706793f68436a173b24291e13fc5171dd3b65022d6ce45bb4" +checksum = "4f4c8994853e1158dc4f448b014aa83eef56ced214ec0af316eecf4a6ca3268f" dependencies = [ "ansi_term 0.12.1", - "futures 0.3.8", + "futures 0.3.15", "log", "parity-util-mem", "sc-client-api", @@ -6131,31 +6283,35 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "032a394435900fabbc8c4e42f2c8022277b6c7db810c8de310af9c5990707b96" +checksum = "d966ed36c404eced656bd63aad8a30d2c1a14633f07cd1d7d9c11b62f75a7905" dependencies = [ + "async-trait", "derive_more", + "futures 0.3.15", + "futures-util", "hex", "merlin", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", "serde_json", "sp-application-crypto", "sp-core", + "sp-keystore", "subtle 2.4.0", ] [[package]] name = "sc-light" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb25de28df183903037147093adba25dc6e4e00342e8da87ff3b0341f672ca17" +checksum = "04e8dbcb2951f7cf76ddf97ed26dcef0dab79d76745de4a8f169d58236ea8704" dependencies = [ "hash-db", "lazy_static", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-executor", "sp-api", @@ -6168,34 +6324,35 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41944816f2543f1a350576325b2f43937589df99911440b41edd85accbe793" +checksum = "20fb4ed5d6b86faafb0743c8c2fd1c89b52cde7697373b254c7553800efaebbf" dependencies = [ "async-std", "async-trait", + "asynchronous-codec 0.5.0", "bitflags", - "bs58 0.3.1", - "bytes 0.5.6", + "bs58", + "bytes 1.0.1", + "cid", "derive_more", "either", "erased-serde", "fnv", "fork-tree", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", - "futures_codec", "hex", "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", "log", - "lru 0.4.3", + "lru", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "prost", "prost-build", "rand 0.7.3", @@ -6204,9 +6361,7 @@ dependencies = [ "sc-peerset", "serde", "serde_json", - "slog", - "slog_derive", - "smallvec 0.6.14", + "smallvec 1.6.1", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -6215,7 +6370,7 @@ dependencies = [ "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "unsigned-varint 0.4.0", + "unsigned-varint 0.6.0", "void", "wasm-timer", "zeroize", @@ -6223,36 +6378,37 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e47d598e67b8dd5786b4898b369fe6809b49dccea629a2fbc3df954357a11f0" +checksum = "e2cd5487d6f8051863a186e2aea4c233a07bb691780d3b117c9d6ffe1ff9a8fe" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "libp2p", "log", - "lru 0.4.3", + "lru", "sc-network", "sp-runtime", + "substrate-prometheus-endpoint", "wasm-timer", ] [[package]] name = "sc-offchain" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ba62ba971b00027a686f7378e3a7c8b8ae26f2fa684282269dcb8b64979a5e" +checksum = "7bc91fc71c128748a3393cb3421e12a7759ccffcc1cc4a9e6ff4ead6cc68ba48" dependencies = [ "bytes 0.5.6", "fnv", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "hyper 0.13.10", "hyper-rustls", "log", "num_cpus", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", "sc-client-api", "sc-keystore", @@ -6267,11 +6423,11 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b25fd0cbe552fccb7732735db76e1404ad6faa73db1ac32a6c1849a0d91679" +checksum = "ce454e528e7797a239e734d0d66bf904d48be47aa92691ac7546a45ec32a64cf" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "libp2p", "log", "serde_json", @@ -6281,9 +6437,9 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84e1e897657580ffb1471b1139d4a45c499a5d9f9951314154f980a5bfaa168" +checksum = "ecfc2c6cc5dc0ecb1109cce9773b50ad9a3cdbf239dc702ef9071949244dcf3e" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6291,27 +6447,29 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6545650472d32e9c3ba01697b6df1f57ee70f9bcc25582341c0c79a4e4f1e62e" +checksum = "750397c6aa5a4f922cac99599ad74a4082e3e87553d51ceb4c48abfa056ff32c" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-block-builder", "sc-client-api", "sc-executor", "sc-keystore", "sc-rpc-api", + "sc-tracing", "serde_json", "sp-api", "sp-blockchain", "sp-chain-spec", "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", "sp-runtime", @@ -6324,19 +6482,19 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55fed0bc8199907d2b4f06730b0f3f99726fe54da1f2d33287e24b7c7c784be" +checksum = "dc8393410297df2885efec20d0629a9833b4fd9e4ad83a92471e1ea0c11a0a54" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.15", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "serde", "serde_json", "sp-chain-spec", @@ -6349,9 +6507,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7845e84f57590cf124b4bc4c526d42aa878c4bf523ab4943de78278542d290ce" +checksum = "17c76164897bd3b0d04c2d6aeeb4d3492c86e324b0b08f408b847ea35421b589" dependencies = [ "futures 0.1.31", "jsonrpc-core", @@ -6368,15 +6526,14 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53ea41ceed173954e72f8fb04a1f52c3472331156a31039b90b018d256f4d15f" +checksum = "a9315b44eb991ca4f477d889bbd649a2b4b557f963fe48ec5a36c3422518e4a0" dependencies = [ - "derive_more", "directories", "exit-future", "futures 0.1.31", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", @@ -6385,8 +6542,8 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "rand 0.7.3", "sc-block-builder", "sc-chain-spec", @@ -6405,7 +6562,6 @@ dependencies = [ "sc-transaction-pool", "serde", "serde_json", - "slog", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -6415,6 +6571,7 @@ dependencies = [ "sp-externalities", "sp-inherents", "sp-io", + "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", @@ -6425,79 +6582,104 @@ dependencies = [ "sp-version", "substrate-prometheus-endpoint", "tempfile", + "thiserror", "tracing", + "tracing-futures", "wasm-timer", ] [[package]] name = "sc-state-db" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1b6ad30864b94daf8b65273ce7d6b4b4bd8931fb9b9a9159386f320282dfc6" +checksum = "8f144043d5860ce133f701fa78679d6278f2dfc698686beb5f6d892c267e9d92" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sp-core", + "thiserror", ] [[package]] name = "sc-telemetry" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9e02e7f4b7ee6ace3f6b59c9891dfe05f60c6ef94cc7d3e31411f5a73bd536" +checksum = "d05040c594b331d90d7341e82c6dc6a3eb7bb2afb4e5dc9c36a79a6754166057" dependencies = [ - "futures 0.3.8", - "futures-timer 3.0.2", + "chrono", + "futures 0.3.15", "libp2p", "log", - "parking_lot 0.10.2", - "pin-project 0.4.28", + "parking_lot 0.11.1", + "pin-project 1.0.7", "rand 0.7.3", "serde", - "slog", - "slog-json", - "slog-scope", + "serde_json", + "sp-utils", "take_mut", + "tracing", + "tracing-subscriber", "void", "wasm-timer", ] [[package]] name = "sc-tracing" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba4d60fa9bf76aea74c64868769f311189539407736bc375d1b6ab0ff598d0b" +checksum = "ef0a4aa327b8bc89d9c5ae57a2f493d8f54ccd706f6763614ab522559fe481d8" dependencies = [ + "ansi_term 0.12.1", + "atty", "erased-serde", + "lazy_static", "log", - "parking_lot 0.10.2", + "once_cell", + "parking_lot 0.11.1", + "regex", "rustc-hash", "sc-telemetry", + "sc-tracing-proc-macro", "serde", "serde_json", - "slog", "sp-tracing", + "thiserror", "tracing", "tracing-core", + "tracing-log", "tracing-subscriber", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "sc-tracing-proc-macro" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec18b0506911e6d624d9ea8f8cc5f503e7944a0fe7d37de95ee84033cf160ebc" +dependencies = [ + "proc-macro-crate 0.1.5", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "sc-transaction-graph" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f57f64ce160124404e4a140da79c7d363627830e5bb31b6ac54c6cd6955fdb" +checksum = "87b385b8f66cce185478c500ad3de8f4775ab0e948c31561aeac78a27bedc654" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.15", "linked-hash-map", "log", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "retain_mut", "serde", "sp-blockchain", @@ -6505,23 +6687,23 @@ dependencies = [ "sp-runtime", "sp-transaction-pool", "sp-utils", + "thiserror", "wasm-timer", ] [[package]] name = "sc-transaction-pool" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749ff49bf873dc43ed85ac86fce64d169c7c7397b720194799e7e6c6eb269972" +checksum = "09f4331ea8da2ff45a9466637f90f5cc89f9d31fcd1cd20f74f2520b33bff069" dependencies = [ - "derive_more", - "futures 0.3.8", + "futures 0.3.15", "futures-diagnose", "intervalier", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sc-client-api", "sc-transaction-graph", "sp-api", @@ -6532,6 +6714,7 @@ dependencies = [ "sp-transaction-pool", "sp-utils", "substrate-prometheus-endpoint", + "thiserror", "wasm-timer", ] @@ -6558,6 +6741,7 @@ dependencies = [ "merlin", "rand 0.7.3", "rand_core 0.5.1", + "serde", "sha2 0.8.2", "subtle 2.4.0", "zeroize", @@ -6569,12 +6753,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - [[package]] name = "scopeguard" version = "1.1.0" @@ -6613,9 +6791,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" dependencies = [ "zeroize", ] @@ -6643,13 +6821,32 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +dependencies = [ + "semver-parser 0.7.0", +] + [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", + "serde", ] [[package]] @@ -6658,20 +6855,29 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "serde" -version = "1.0.125" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.125" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" dependencies = [ "proc-macro2", "quote", @@ -6703,9 +6909,9 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659df5fc3ce22274daac600ffb845300bd2125bcfaec047823075afdab81c00" +checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", @@ -6728,9 +6934,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f6b75b17576b792bef0db1bcc4b8b8bcdf9506744cf34b974195487af6cff2" +checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", @@ -6739,19 +6945,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha3" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" -dependencies = [ - "block-buffer 0.7.3", - "byte-tools", - "digest 0.8.1", - "keccak", - "opaque-debug 0.2.3", -] - [[package]] name = "sha3" version = "0.9.1" @@ -6781,9 +6974,9 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "signal-hook" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef33d6d0cd06e0840fba9985aab098c147e67e05cee14d412d3345ed14ff30ac" +checksum = "470c5a6397076fae0094aaf06a08e6ba6f37acb77d3b1b91ea92b4d6c8650c39" dependencies = [ "libc", "signal-hook-registry", @@ -6791,9 +6984,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ "libc", ] @@ -6805,54 +6998,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" [[package]] -name = "slab" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "slog-json" -version = "2.3.0" +name = "simba" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" +checksum = "5132a955559188f3d13c9ba831e77c802ddc8782783f050ed0c52f5988b95f4c" dependencies = [ - "chrono", - "erased-serde", - "serde", - "serde_json", - "slog", + "approx 0.4.0", + "num-complex 0.3.1", + "num-traits", + "paste", ] [[package]] -name = "slog-scope" -version = "4.4.0" +name = "simba" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" +checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ - "arc-swap", - "lazy_static", - "slog", + "approx 0.5.0", + "num-complex 0.4.0", + "num-traits", + "paste", ] [[package]] -name = "slog_derive" -version = "0.2.0" +name = "slab" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "smallvec" @@ -6882,9 +7055,9 @@ dependencies = [ "rand_core 0.5.1", "ring", "rustc_version", - "sha2 0.9.4", + "sha2 0.9.5", "subtle 2.4.0", - "x25519-dalek 1.1.1", + "x25519-dalek", ] [[package]] @@ -6917,31 +7090,31 @@ dependencies = [ "base64 0.12.3", "bytes 0.5.6", "flate2", - "futures 0.3.8", + "futures 0.3.15", "httparse", "log", "rand 0.7.3", - "sha-1 0.9.5", + "sha-1 0.9.6", ] [[package]] name = "sp-allocator" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019c540ebf398feefe9bf766dee9b2f4f649ca9a7fd7a2f01f0b4d9e4a6d1307" +checksum = "ec5f988ad0cabdb646318cb515a91e9d89062debc9728f9b634d73acab3f3f39" dependencies = [ - "derive_more", "log", "sp-core", "sp-std", "sp-wasm-interface", + "thiserror", ] [[package]] name = "sp-api" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8496732f255ef290eee6d438ebd0ecdbfe31ec8246e31870a4faf44df76b6280" +checksum = "e63c3460d5daecf67df542c34c2bbd636214a5a200d4bddcfa2ffb9e72c346af" dependencies = [ "hash-db", "parity-scale-codec", @@ -6951,16 +7124,17 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-version", + "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c863d32b9e36849f2fc76efad959924561b2fcb15b3abdebb3d3f48a94074a00" +checksum = "289624f4fe0f61e63a5019ed26c3bc732b5145eb52796ac6053cd72656d947a1" dependencies = [ "blake2-rfc", - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -6968,9 +7142,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda2660cca492b58328d6a057bf5ba6c8a58e9f6e079a2f603b623d030300841" +checksum = "c52e2e6d43036b97c4fce1ed87c5262c1ffdc78c655ada4d3024a3f8094bdd2c" dependencies = [ "parity-scale-codec", "serde", @@ -6981,9 +7155,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c4d204b1cf8e1d4826804ffbd2edd2c4df385ee3046fa4581f09bc18977ea89" +checksum = "d0f1c69966c192d1dee8521f0b29ece2b14db07b9b44d801a94e295234761645" dependencies = [ "integer-sqrt", "num-traits", @@ -6995,9 +7169,9 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c99612989f07a55a160b1d041cac74c9089f97b3d0e0244cdde4ed3e00560ff" +checksum = "1ec68fb8e5a37548b06c14ee91a9c574cc330324c86d37810ec29dd4f8bc68d7" dependencies = [ "parity-scale-codec", "sp-inherents", @@ -7007,9 +7181,9 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42446637a0363c14117c9fe2401649bbe5806fa230c731378be9478e2d787121" +checksum = "0adc979dbe619f56d664ebd1293dce13fcad6b8a47bcdd620ed53a454d330d12" dependencies = [ "parity-scale-codec", "sp-api", @@ -7020,27 +7194,28 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba612ede91aa09d602a5f7df18630728a81991fa6b5a13a0071ea00799fb509" +checksum = "e8007c1ad8e9fb6cd8eed4e0fc91504a9ca4b228e1315302a2fbb0ac7f509f1b" dependencies = [ - "derive_more", + "futures 0.3.15", "log", - "lru 0.4.3", + "lru", "parity-scale-codec", - "parking_lot 0.10.2", - "sp-block-builder", + "parking_lot 0.11.1", + "sp-api", "sp-consensus", "sp-database", "sp-runtime", "sp-state-machine", + "thiserror", ] [[package]] name = "sp-chain-spec" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f20aee31e7576ab5bef17345e9c2d4c1863dae3a3cc3ab3540592182e118720d" +checksum = "3a24beb11980d0c755ead0c05f3f966c490e4a3730785c04c03855fada65d697" dependencies = [ "serde", "serde_json", @@ -7048,17 +7223,16 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb095bf31d07e6b48489b68e127eabd55534c3ac8dc2c04d2fec581bd5f407" +checksum = "884db6c4b03f0f2fb2993127a2db95fc740fcd3496746dcaa6829c9868e7dc75" dependencies = [ - "derive_more", - "futures 0.3.8", + "futures 0.3.15", "futures-timer 3.0.2", "libp2p", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "serde", "sp-api", "sp-core", @@ -7070,19 +7244,42 @@ dependencies = [ "sp-utils", "sp-version", "substrate-prometheus-endpoint", + "thiserror", "wasm-timer", ] [[package]] name = "sp-consensus-aura" -version = "0.8.1" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd00fc95b26393522be1394fb67cc536736cc5a902dec0d3e2827909b7c1118" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0b7eb31572227860f091208fe1185482ce2d722bde3a405e0c5e0cc095aa0ff" +checksum = "a153085b1542b5cbe23686433cd36d1a634964f1b707671d0ffb01d8d9313047" dependencies = [ + "merlin", "parity-scale-codec", "sp-api", "sp-application-crypto", + "sp-consensus", + "sp-consensus-slots", + "sp-consensus-vrf", + "sp-core", "sp-inherents", + "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -7090,27 +7287,40 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.8.1" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32bd501ab76c827d74f145063cd8cb993a9f634dac93c9b0d909111cd5900a6a" +dependencies = [ + "parity-scale-codec", + "sp-arithmetic", + "sp-runtime", +] + +[[package]] +name = "sp-consensus-vrf" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f822876fba433e197c73c31482f16a340eb807c040f2321ad5228b089dac31c4" +checksum = "030895d70bf3095c857f4727a7cce7c43af29efe3413bb547ee28700f7d78766" dependencies = [ "parity-scale-codec", + "schnorrkel", + "sp-core", "sp-runtime", + "sp-std", ] [[package]] name = "sp-core" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1b8a5031e866ebee7535446915c83e8f676c68dcc8555f0c0f149ff4b48035" +checksum = "abbc8d4e9b8a7d5819ed26f1374017bb32833ef4890e4ff065e1da30669876bc" dependencies = [ "base58", "blake2-rfc", - "byteorder 1.4.3", - "derive_more", + "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.8", + "futures 0.3.15", "hash-db", "hash256-std-hasher", "hex", @@ -7122,20 +7332,21 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "primitive-types", "rand 0.7.3", "regex", "schnorrkel", "secrecy", "serde", - "sha2 0.8.2", + "sha2 0.9.5", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", "sp-std", "sp-storage", "substrate-bip39", + "thiserror", "tiny-bip39", "tiny-keccak", "twox-hash", @@ -7145,19 +7356,19 @@ dependencies = [ [[package]] name = "sp-database" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c11be572a236b81cdf5e5339ea6253d17e91bd4018b198b3d861cc66154979" +checksum = "c8c3f018913eef191d95c824657c5759c459d28670e654fa34f5d9bd5e6f0492" dependencies = [ "kvdb", - "parking_lot 0.10.2", + "parking_lot 0.11.1", ] [[package]] name = "sp-debug-derive" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558a1a24f2feab950ce382923b62879f253207c6cbf7832eb1e47dba5f57fba8" +checksum = "e80275f23b4e7ba8f54dec5f90f016530e7307d2ee9445f617ab986cbe97f31e" dependencies = [ "proc-macro2", "quote", @@ -7166,9 +7377,9 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144c39acb7affd7a9ce478e289157b9a6c225e3f08a7d4d2f4fee85cc3899684" +checksum = "2fdc625f8c7b13b9a136d334888b21b5743d2081cb666cb03efca1dc9b8f74d1" dependencies = [ "environmental", "parity-scale-codec", @@ -7178,9 +7389,9 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9cf9e52b1dc6b39c46ec73e57cbfe8236009c928bf1d83e1d42c75060d9c637" +checksum = "702e0be150e1b557df42326ec9b82c2010366631d03be27c69912d446abbf87a" dependencies = [ "finality-grandpa", "log", @@ -7189,48 +7400,39 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-keystore", "sp-runtime", "sp-std", ] -[[package]] -name = "sp-finality-tracker" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5688c61363d620cd29591b1f7640da84346b519d33d9e4ce5e7978ff89425c37" -dependencies = [ - "parity-scale-codec", - "sp-inherents", - "sp-std", -] - [[package]] name = "sp-inherents" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebcf5925a850392cb044af9b8da20dc0610e613ff15607b3b96bed6461f9193" +checksum = "2542380b535c6941502a0a3069a657eb5abb70fd67b11afa164d4a4b038ba73a" dependencies = [ - "derive_more", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sp-core", "sp-std", + "thiserror", ] [[package]] name = "sp-io" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffbebdeacf0a313ac65e043c37e37d98b48ea75cd1e8ab9ba40a925fecb616b" +checksum = "33fd69f0a6e91bedc2fb1c5cc3689c212474b6c918274cb4cb14dbbe3c428c14" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "sp-core", "sp-externalities", + "sp-keystore", "sp-runtime-interface", "sp-state-machine", "sp-std", @@ -7243,36 +7445,55 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.1" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b59f2b0e94b2048d4984aa6eb40eef2e4c05d3adf27a083dd3c9b0fce74ef7a" +dependencies = [ + "lazy_static", + "sp-core", + "sp-runtime", + "strum", +] + +[[package]] +name = "sp-keystore" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9741dcf007b33496e1add259fae40d59cfe64847bf992d2605edcecd8ae6d0c2" +checksum = "db6ccd2baf189112355338e8b224dc513cd239b974dbd717f12b3dc7a7248c3b" dependencies = [ - "lazy_static", + "async-trait", + "derive_more", + "futures 0.3.15", + "merlin", + "parity-scale-codec", + "parking_lot 0.11.1", + "schnorrkel", + "serde", "sp-core", - "sp-runtime", - "strum", + "sp-externalities", ] [[package]] name = "sp-npos-elections" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404f9b99ff38395d48bf2f041096fc5dbc1b892a8c314314c7bf66a0dfb5622c" +checksum = "54e6e8b84ee0dc7bb65b55beba55ffbc17803222ab7c746a74f72fc5869c7320" dependencies = [ "parity-scale-codec", "serde", "sp-arithmetic", + "sp-core", "sp-npos-elections-compact", "sp-std", ] [[package]] name = "sp-npos-elections-compact" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ac5b8443203fbc6472f08f376b3b09307dc3ae1b0c1a91776a3b934f1314ce" +checksum = "085fbb1aa72d85a17524047fc1e708bc3bd038b02b46dc7ac601fa39c8af93d3" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -7280,9 +7501,9 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54d50a7a5459ed6f63c879eae715732f0f5e5fd5d99dfb553b111e0b5932f6f" +checksum = "0bd80eedcedcc8342e77c26d59ad90b6904715a862731fa16616650773570e63" dependencies = [ "sp-api", "sp-core", @@ -7291,19 +7512,18 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1055031d4994705cd9eca38602fea1ed88f6916c0979f85352c3d540baedb2e8" +checksum = "54702e109f1c8a870dd4065a497d2612d42cec5817126e96cc0658c5ea975784" dependencies = [ "backtrace", - "log", ] [[package]] name = "sp-rpc" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009f2b8ae311ff2c5f319e545492f26a3954fc84f477f85e2c3dd49fde605cf9" +checksum = "a2e5b1ed655d11449073b914b048895f45241e02b3919d1d0187f315435fee18" dependencies = [ "serde", "sp-core", @@ -7311,13 +7531,13 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85d8d12cba8cb9c50d8c0eee517d74044c22faa9322260e88dccb5bd06bf0762" +checksum = "dfa4b353b76f04616dbdb8d269d58dcac47acb31c006d3b70e7b64233e68695e" dependencies = [ "either", "hash256-std-hasher", - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "log", "parity-scale-codec", "parity-util-mem", @@ -7327,17 +7547,17 @@ dependencies = [ "sp-application-crypto", "sp-arithmetic", "sp-core", - "sp-inherents", "sp-io", "sp-std", ] [[package]] name = "sp-runtime-interface" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb6574401a7b5c89111b417efecbc9f0c3d38c2c539ce3a964b8393769c3e15" +checksum = "b2e5c88b4bc8d607e4e2ff767a85db58cf7101f3dd6064f06929342ea67fe8fb" dependencies = [ + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "primitive-types", "sp-externalities", @@ -7351,12 +7571,12 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d724b1feca629bf958dc0db0453225e59d9b2098fe5a47f86cd964cbc116d89d" +checksum = "19a6c7c2251512c9e533d15db8a863b06ece1cbee778130dd9adbe44b6b39aa9" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "quote", "syn", @@ -7364,9 +7584,9 @@ dependencies = [ [[package]] name = "sp-sandbox" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b788997f8456b9dfaa3d5ec5e4e8d19c1c24a854ca861abadacdb4ae08eff532" +checksum = "0e92caf4555d676d8f0b67def0041da789f79a5d5f341130496f15a6261926cc" dependencies = [ "parity-scale-codec", "sp-core", @@ -7378,9 +7598,9 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b8c2658dfa3f0a9447dbbebffa672905c4af48e6b914a814b04c39e2a8700b" +checksum = "982d793f01eb9eea9f30ffc63b821170068b9f0d9edf715d8ba77dc4de9c300f" dependencies = [ "serde", "serde_json", @@ -7388,9 +7608,9 @@ dependencies = [ [[package]] name = "sp-session" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242e7e9069cfd163b6ceb22c2d1aba7a09144ac8360f07270739ca7917520b69" +checksum = "2c7cf161533725a78083b04f3269effe4c3b4b6ce5f655019b3eec3e729ba4d4" dependencies = [ "parity-scale-codec", "sp-api", @@ -7402,9 +7622,9 @@ dependencies = [ [[package]] name = "sp-staking" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6abfd1a33f36879117b5f511ac066e265258028d1190088be89924794967f395" +checksum = "fc729eb10f8809c61a1fe439ac118a4413de004aaf863003ee8752ac0b596e73" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -7413,15 +7633,15 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "095a8c33f70151e561c53fdaca23ad19cc059088807a25be0d60d04fb2ededea" +checksum = "46fa4143e58e9130f726d4e8a9b86f3530a8bd19a2eedcdcf4af205f4b5a6d4f" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.11.1", "rand 0.7.3", "smallvec 1.6.1", "sp-core", @@ -7429,21 +7649,22 @@ dependencies = [ "sp-panic-handler", "sp-std", "sp-trie", + "thiserror", "trie-db", "trie-root", ] [[package]] name = "sp-std" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2585fb8f5f4fde53c2f9ccebac4517da4dc435373a8fcaf5db7f54b798da66c2" +checksum = "35391ea974fa5ee869cb094d5b437688fbf3d8127d64d1b9fed5822a1ed39b12" [[package]] name = "sp-storage" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781cc04c8d61c7bb1c269ca68d5d001fcaafbca8a21af46f87bf2e79a749c295" +checksum = "86af458d4a0251c490cdde9dcaaccb88d398f3b97ac6694cdd49ed9337e6b961" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7453,13 +7674,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-tasks" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c585340cbee96c53a9b43fd07d81edf6cebeb80e4ca7c0ee79b856c0b1883a0e" +dependencies = [ + "log", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface", + "sp-std", +] + [[package]] name = "sp-timestamp" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d86fb8fd203faa146ba06b0d88c60f9bcb4c1dcbe49f64e36d4038893018536" +checksum = "27387c541197b9f47f3d9ddcab5649a3ecdca582d2f2ea2b511af24a3d3cbf83" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "sp-api", "sp-inherents", @@ -7470,9 +7705,9 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c574a06ac032f3c6fc29ae61ae1292546499342219c256098914f6110312f6f4" +checksum = "567382d8d4e14fb572752863b5cd57a78f9e9a6583332b590b726f061f3ea957" dependencies = [ "log", "parity-scale-codec", @@ -7484,25 +7719,26 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "429125cf86f74715559d9fc1e27ed8f69d6a857c30db4ca4957e05c4549ecf1b" +checksum = "3264d3b7ea31483eddffa2cc7f28c4d9c022598e456a985fd1cb5879a4609853" dependencies = [ "derive_more", - "futures 0.3.8", + "futures 0.3.15", "log", "parity-scale-codec", "serde", "sp-api", "sp-blockchain", "sp-runtime", + "thiserror", ] [[package]] name = "sp-trie" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311f320e1a1d6d961664af519d343d7a0493d9fe2f81dc3de488841e4fbaaa46" +checksum = "b85b7f745da41ef825c6f7b93f1fdc897b03df94a4884adfbb70fbcd0aed1298" dependencies = [ "hash-db", "memory-db", @@ -7515,11 +7751,11 @@ dependencies = [ [[package]] name = "sp-utils" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af5eb60fe8721a250ad67346d4e4c859527b1c4f287e963ffbbf7bd22b731f8" +checksum = "b4ec2a5f924f7affd1e959f8f3c02bd87cdfa0e11c71a4cbc075f955ead8c1a1" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "futures-core", "futures-timer 3.0.2", "lazy_static", @@ -7528,9 +7764,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5fb7fa5f747a7d1b1854a1b69b813a9df6425ab0f0a9876cbddea8c6b9ab34" +checksum = "dbeffa538a13d715d30e01d57a2636ba32845b737a29a3ea32403576588222e7" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7541,11 +7777,11 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554daa08d61bb3bf2d81ac79b7ae089733339fc8fdc129dc21d074195f1219be" +checksum = "b214e125666a6416cf30a70cc6a5dacd34a4e5197f8a3d479f714af7e1dc7a47" dependencies = [ - "impl-trait-for-tuples", + "impl-trait-for-tuples 0.2.1", "parity-scale-codec", "sp-std", "wasmi", @@ -7571,11 +7807,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "statrs" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8" +checksum = "1e0c1f144861fbfd2a8cc82d564ccbf7fb3b7834d4fa128b84e9c2a73371aead" dependencies = [ - "rand 0.5.6", + "approx 0.4.0", + "lazy_static", + "nalgebra 0.26.2", + "num-traits", + "rand 0.8.4", ] [[package]] @@ -7629,18 +7869,18 @@ dependencies = [ [[package]] name = "strum" -version = "0.16.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" +checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.16.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" +checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", "proc-macro2", @@ -7654,8 +7894,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" dependencies = [ - "hmac", - "pbkdf2", + "hmac 0.7.1", + "pbkdf2 0.3.0", "schnorrkel", "sha2 0.8.2", "zeroize", @@ -7663,21 +7903,21 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9726c2926418239f73d4d939fcc4ceb5c6697609426c64dd3bcf664f06986afa" +checksum = "bd540ba72520174c2c73ce96bf507eeba3cc8a481f58be92525b69110e1fa645" dependencies = [ "platforms", ] [[package]] name = "substrate-frame-rpc-system" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bf9f4c01086bb9b1e14ca6ebb5f12c2cb21a5c3810a01f07a7e621ea1e5db1" +checksum = "8e46123ec4a690d91967de07cd6af4dde90d14519a1a8d43f61bd3f78dd3d0ef" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.8", + "futures 0.3.15", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -7696,9 +7936,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c36fcefaaa1292fe37d8a478ebc57311df0de8b5d01bffb5e2abc9bbda0b4f" +checksum = "2eb561c19a121e1c89daa79dbfa67a55080f813caa47fd231833a0669696d508" dependencies = [ "async-std", "derive_more", @@ -7710,10 +7950,20 @@ dependencies = [ ] [[package]] -name = "substrate-wasm-builder-runner" -version = "1.0.6" +name = "substrate-wasm-builder" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a" +checksum = "93a3d51ad6abbc408b03ea962062bfcc959b438a318d7d4bedd181e1effd0610" +dependencies = [ + "ansi_term 0.12.1", + "atty", + "build-helper", + "cargo_metadata", + "tempfile", + "toml", + "walkdir", + "wasm-gc-api", +] [[package]] name = "subtle" @@ -7729,9 +7979,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" dependencies = [ "proc-macro2", "quote", @@ -7756,11 +8006,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "target-lexicon" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" +checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95" [[package]] name = "tempfile" @@ -7770,8 +8026,8 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ "cfg-if 1.0.0", "libc", - "rand 0.8.3", - "redox_syscall 0.2.8", + "rand 0.8.4", + "redox_syscall 0.2.9", "remove_dir_all", "winapi 0.3.9", ] @@ -7796,18 +8052,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" +checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" +checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" dependencies = [ "proc-macro2", "quote", @@ -7820,7 +8076,7 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ - "once_cell 1.7.2", + "once_cell", ] [[package]] @@ -7845,18 +8101,20 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2" +checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" dependencies = [ - "failure", - "hmac", - "once_cell 1.7.2", - "pbkdf2", + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", "rand 0.7.3", "rustc-hash", - "sha2 0.8.2", + "sha2 0.9.5", + "thiserror", "unicode-normalization", + "zeroize", ] [[package]] @@ -7895,11 +8153,11 @@ dependencies = [ "num_cpus", "tokio-codec", "tokio-current-thread", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-fs", "tokio-io", "tokio-reactor", - "tokio-sync 0.1.8", + "tokio-sync", "tokio-tcp", "tokio-threadpool", "tokio-timer", @@ -7958,7 +8216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" dependencies = [ "futures 0.1.31", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -7971,17 +8229,6 @@ dependencies = [ "futures 0.1.31", ] -[[package]] -name = "tokio-executor" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" -dependencies = [ - "futures-util-preview", - "lazy_static", - "tokio-sync 0.2.0-alpha.6", -] - [[package]] name = "tokio-fs" version = "0.1.7" @@ -8031,9 +8278,9 @@ dependencies = [ "num_cpus", "parking_lot 0.9.0", "slab", - "tokio-executor 0.1.10", + "tokio-executor", "tokio-io", - "tokio-sync 0.1.8", + "tokio-sync", ] [[package]] @@ -8043,7 +8290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ "futures-core", - "rustls", + "rustls 0.18.1", "tokio 0.2.25", "webpki", ] @@ -8067,17 +8314,6 @@ dependencies = [ "futures 0.1.31", ] -[[package]] -name = "tokio-sync" -version = "0.2.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" -dependencies = [ - "fnv", - "futures-core-preview", - "futures-util-preview", -] - [[package]] name = "tokio-tcp" version = "0.1.4" @@ -8106,7 +8342,7 @@ dependencies = [ "log", "num_cpus", "slab", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -8118,7 +8354,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "slab", - "tokio-executor 0.1.10", + "tokio-executor", ] [[package]] @@ -8191,7 +8427,7 @@ checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.6", + "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", ] @@ -8249,9 +8485,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa5553bf0883ba7c9cbe493b085c29926bd41b66afc31ff72cf17ff4fb60dcd5" +checksum = "ab69019741fca4d98be3c62d2b75254528b5432233fd8a4d2739fec20278de48" dependencies = [ "ansi_term 0.12.1", "chrono", @@ -8271,12 +8507,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec051edf7f0fc9499a2cb0947652cab2148b9d7f61cee7605e312e9f970dacaf" +checksum = "cd81fe0c8bc2b528a51c9d2c31dae4483367a26a723a3c9a4a8120311d7774e3" dependencies = [ "hash-db", - "hashbrown 0.9.1", + "hashbrown", "log", "rustc-hex", "smallvec 1.6.1", @@ -8304,7 +8540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59" dependencies = [ "cfg-if 0.1.10", - "rand 0.3.23", + "rand 0.7.3", "static_assertions", ] @@ -8316,9 +8552,9 @@ checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "uart" -version = "1.0.0" +version = "3.0.0" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "fuxi-runtime", "pangu-runtime", "parity-util-mem", @@ -8327,21 +8563,39 @@ dependencies = [ "uniarts-service", ] +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + [[package]] name = "uint" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177" +checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e" dependencies = [ - "byteorder 1.4.3", + "byteorder", "crunchy", - "rustc-hex", + "hex", "static_assertions", ] +[[package]] +name = "uniarts-chain-primitives" +version = "3.0.0" +dependencies = [ + "parity-scale-codec", + "serde", + "sp-core", + "sp-runtime", + "sp-std", + "uniarts-primitives", +] + [[package]] name = "uniarts-cli" -version = "1.0.0" +version = "3.0.0" dependencies = [ "frame-benchmarking-cli", "log", @@ -8352,14 +8606,14 @@ dependencies = [ "sp-trie", "structopt", "substrate-build-script-utils", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", "uniarts-service", ] [[package]] name = "uniarts-common" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "frame-support", "frame-system", @@ -8369,25 +8623,13 @@ dependencies = [ "parity-scale-codec", "sp-runtime", "sp-std", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", -] - -[[package]] -name = "uniarts-primitives" -version = "2.0.1" -dependencies = [ - "parity-scale-codec", - "serde", - "sp-consensus-aura", - "sp-core", - "sp-runtime", - "sp-std", + "uniarts-primitives", ] [[package]] name = "uniarts-primitives" -version = "2.0.1" -source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1#7144efafb81fdf4d1cbc5444396a9286e76d2605" +version = "3.0.0" +source = "git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v3.0.0#5af732be1bda82de5e62e2bca1263451d8eed029" dependencies = [ "parity-scale-codec", "serde", @@ -8399,7 +8641,7 @@ dependencies = [ [[package]] name = "uniarts-rpc" -version = "1.0.0" +version = "3.0.0" dependencies = [ "jsonrpc-core", "pallet-contracts-rpc", @@ -8429,19 +8671,19 @@ dependencies = [ "sp-runtime", "sp-transaction-pool", "substrate-frame-rpc-system", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", ] [[package]] name = "uniarts-service" -version = "1.0.0" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-system-rpc-runtime-api", - "futures 0.3.8", + "futures 0.3.15", "fuxi-runtime", - "hex-literal 0.2.1", + "hex-literal", "log", "pallet-contracts", "pallet-contracts-rpc", @@ -8458,6 +8700,7 @@ dependencies = [ "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", + "sc-keystore", "sc-rpc", "sc-rpc-api", "sc-service", @@ -8476,13 +8719,14 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", + "sp-storage", "sp-transaction-pool", "sp-trie", "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", - "uniarts-primitives 2.0.1 (git+https://github.com/uni-arts-chain/uni-arts-common.git?tag=v2.0.1)", + "uniarts-primitives", "uniarts-rpc", ] @@ -8506,9 +8750,9 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] @@ -8543,22 +8787,30 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.4.0" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" + +[[package]] +name = "unsigned-varint" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5" +checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" dependencies = [ - "bytes 0.5.6", + "asynchronous-codec 0.5.0", + "bytes 1.0.1", "futures-io", "futures-util", - "futures_codec", ] [[package]] name = "unsigned-varint" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" +checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" dependencies = [ + "asynchronous-codec 0.6.0", + "bytes 1.0.1", "futures-io", "futures-util", ] @@ -8594,18 +8846,19 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.6" +version = "1.0.0-alpha.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b676010e055c99033117c2343b33a40a30b91fecd6c49055ac9cd2d6c305ab1" +checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" dependencies = [ "ctor", + "version_check", ] [[package]] name = "vcpkg" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vec_map" @@ -8631,6 +8884,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi 0.3.9", + "winapi-util", +] + [[package]] name = "want" version = "0.2.0" @@ -8730,13 +8994,24 @@ version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" +[[package]] +name = "wasm-gc-api" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" +dependencies = [ + "log", + "parity-wasm 0.32.0", + "rustc-demangle", +] + [[package]] name = "wasm-timer" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "js-sys", "parking_lot 0.11.1", "pin-utils", @@ -8753,9 +9028,9 @@ checksum = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" dependencies = [ "libc", "memory_units", - "num-rational", + "num-rational 0.2.4", "num-traits", - "parity-wasm", + "parity-wasm 0.41.0", "wasmi-validation", ] @@ -8765,38 +9040,36 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea78c597064ba73596099281e2f4cfc019075122a65cdda3205af94f0b264d93" dependencies = [ - "parity-wasm", + "parity-wasm 0.41.0", ] [[package]] name = "wasmparser" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" - -[[package]] -name = "wasmparser" -version = "0.59.0" +version = "0.71.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9" +checksum = "89a30c99437829ede826802bfcf28500cf58df00e66cb9114df98813bc145ff1" [[package]] name = "wasmtime" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd3c4f449382779ef6e0a7c3ec6752ae614e20a42e4100000c3efdc973100e2" +checksum = "7426055cb92bd9a1e9469b48154d8d6119cd8c498c8b70284e420342c05dc45d" dependencies = [ "anyhow", "backtrace", - "cfg-if 0.1.10", - "lazy_static", + "bincode", + "cfg-if 1.0.0", + "cpp_demangle", + "indexmap", "libc", "log", "region", "rustc-demangle", + "serde", "smallvec 1.6.1", "target-lexicon", - "wasmparser 0.59.0", + "wasmparser", + "wasmtime-cache", "wasmtime-environ", "wasmtime-jit", "wasmtime-profiling", @@ -8805,74 +9078,101 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "wasmtime-cache" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01d9287e36921e46f5887a47007824ae5dbb9b7517a2d565660ab4471478709" +dependencies = [ + "anyhow", + "base64 0.13.0", + "bincode", + "directories-next", + "errno", + "file-per-thread-logger", + "libc", + "log", + "serde", + "sha2 0.9.5", + "toml", + "winapi 0.3.9", + "zstd", +] + +[[package]] +name = "wasmtime-cranelift" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4134ed3a4316cd0de0e546c6004850afe472b0fa3fcdc2f2c15f8d449562d962" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "cranelift-wasm", + "wasmtime-environ", +] + [[package]] name = "wasmtime-debug" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e634af9067a3af6cf2c7d33dc3b84767ddaf5d010ba68e80eecbcea73d4a349" +checksum = "e91fa931df6dd8af2b02606307674d3bad23f55473d5f4c809dddf7e4c4dc411" dependencies = [ "anyhow", - "gimli 0.21.0", + "gimli 0.23.0", "more-asserts", - "object 0.20.0", + "object 0.22.0", "target-lexicon", "thiserror", - "wasmparser 0.59.0", + "wasmparser", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f85619a94ee4034bd5bb87fc3dcf71fd2237b81c840809da1201061eec9ab3" +checksum = "a1098871dc3120aaf8190d79153e470658bb79f63ee9ca31716711e123c28220" dependencies = [ "anyhow", - "base64 0.12.3", - "bincode", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "cranelift-codegen", "cranelift-entity", - "cranelift-frontend", "cranelift-wasm", - "directories", - "errno", - "file-per-thread-logger", + "gimli 0.23.0", "indexmap", - "libc", "log", "more-asserts", - "rayon", "serde", - "sha2 0.8.2", "thiserror", - "toml", - "wasmparser 0.59.0", - "winapi 0.3.9", - "zstd", + "wasmparser", ] [[package]] name = "wasmtime-jit" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e914c013c7a9f15f4e429d5431f2830fb8adb56e40567661b69c5ec1d645be23" +checksum = "738bfcd1561ede8bb174215776fd7d9a95d5f0a47ca3deabe0282c55f9a89f68" dependencies = [ + "addr2line 0.14.1", "anyhow", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.21.0", + "gimli 0.23.0", "log", "more-asserts", - "object 0.20.0", + "object 0.22.0", + "rayon", "region", + "serde", "target-lexicon", "thiserror", - "wasmparser 0.59.0", + "wasmparser", + "wasmtime-cranelift", "wasmtime-debug", "wasmtime-environ", "wasmtime-obj", @@ -8883,13 +9183,13 @@ dependencies = [ [[package]] name = "wasmtime-obj" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e81d8e02e9bc9fe2da9b6d48bbc217f96e089f7df613f11a28a3958abc44641e" +checksum = "3e96d77f1801131c5e86d93e42a3cf8a35402107332c202c245c83f34888a906" dependencies = [ "anyhow", "more-asserts", - "object 0.20.0", + "object 0.22.0", "target-lexicon", "wasmtime-debug", "wasmtime-environ", @@ -8897,16 +9197,16 @@ dependencies = [ [[package]] name = "wasmtime-profiling" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8d4d1af8dd5f7096cfcc89dd668d358e52980c38cce199643372ffd6590e27" +checksum = "60bb672c9d894776d7b9250dd9b4fe890f8760201ee4f53e5f2da772b6c4debb" dependencies = [ "anyhow", - "cfg-if 0.1.10", - "gimli 0.21.0", + "cfg-if 1.0.0", + "gimli 0.23.0", "lazy_static", "libc", - "object 0.19.0", + "object 0.22.0", "scroll", "serde", "target-lexicon", @@ -8916,19 +9216,20 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a25f140bbbaadb07c531cba99ce1a966dba216138dc1b2a0ddecec851a01a93" +checksum = "a978086740949eeedfefcee667b57a9e98d9a7fc0de382fcfa0da30369e3530d" dependencies = [ "backtrace", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "indexmap", "lazy_static", "libc", "log", - "memoffset 0.5.6", + "memoffset 0.6.4", "more-asserts", + "psm", "region", "thiserror", "wasmtime-environ", @@ -8937,18 +9238,18 @@ dependencies = [ [[package]] name = "wast" -version = "35.0.2" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" +checksum = "8b5d7ba374a364571da1cb0a379a3dc302582a2d9937a183bfe35b68ad5bb9c4" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ec280a739b69173e0ffd12c1658507996836ba4e992ed9bc1e5385a0bd72a02" +checksum = "16383df7f0e3901484c2dda6294ed6895caa3627ce4f6584141dcf30a33a23e6" dependencies = [ "wast", ] @@ -8975,37 +9276,29 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ "webpki", ] [[package]] -name = "wepoll-sys" -version = "3.0.1" +name = "wepoll-ffi" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" dependencies = [ "cc", ] [[package]] name = "which" -version = "3.1.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" dependencies = [ + "either", "libc", ] @@ -9063,15 +9356,10 @@ dependencies = [ ] [[package]] -name = "x25519-dalek" -version = "0.6.0" +name = "wyz" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217" -dependencies = [ - "curve25519-dalek 2.1.2", - "rand_core 0.5.1", - "zeroize", -] +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "x25519-dalek" @@ -9090,7 +9378,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cc7bd8c983209ed5d527f44b01c41b7dc146fd960c61cf9e1d25399841dc271" dependencies = [ - "futures 0.3.8", + "futures 0.3.15", "log", "nohash-hasher", "parking_lot 0.11.1", @@ -9146,6 +9434,6 @@ checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81" dependencies = [ "cc", "glob", - "itertools 0.9.0", + "itertools", "libc", ] diff --git a/Dockerfile b/Dockerfile index 5d89b26..eac9e18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM phusion/baseimage:0.11 as builder ENV DEBIAN_FRONTEND=noninteractive -ENV RUST_TOOLCHAIN=nightly-2020-10-06 +ENV RUST_TOOLCHAIN=nightly-2021-06-01 ENV PATH="$PATH:/root/.cargo/bin" ARG PROFILE=release @@ -15,8 +15,8 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y # && \ RUN rustup uninstall stable && \ - rustup install 1.46.0 && \ - rustup default 1.46.0-x86_64-unknown-linux-gnu && \ + rustup install 1.53.0 && \ + rustup default 1.53.0-x86_64-unknown-linux-gnu && \ rustup toolchain install $RUST_TOOLCHAIN && \ rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN && \ rustup default $RUST_TOOLCHAIN @@ -34,7 +34,7 @@ COPY primitives ./primitives/ COPY README.md README.md COPY Cargo* ./ -RUN cargo +nightly-2020-10-06 build "--$PROFILE" +RUN cargo +nightly-2021-06-01 build "--$PROFILE" # ===== RUN ====== diff --git a/README.md b/README.md index 9822915..decd31c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Uni-arts Network (https://uniarts.network) -![Image text](https://raw.githubusercontent.com/uni-arts-chain/uni-arts-network/master/docs/uniarts-network-new.png) +![Image text](https://raw.githubusercontent.com/uni-arts-chain/uni-arts-network/master/docs/UA-logo.png) Unite of Uniqueness diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 65cb1ec..d89064f 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uart" -version = "1.0.0" +version = "3.0.0" description = "Uni-Arts node implementation in Rust" authors = ["Uniarts Developers"] edition = "2018" @@ -16,8 +16,8 @@ name = "uart" path = "src/main.rs" [dependencies] -futures = { version = "=0.3.8" } -parity-util-mem = { version = "*", default-features = false, features = ["jemalloc-global"] } +futures = { version = "0.3.13" } +parity-util-mem = { version = "0.9.0", default-features = false, features = ["jemalloc-global"] } uniarts-cli = { path = "cli" } uniarts-service = { path = "service" } diff --git a/bin/cli/Cargo.toml b/bin/cli/Cargo.toml index 9d91c48..63ac09a 100644 --- a/bin/cli/Cargo.toml +++ b/bin/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uniarts-cli" -version = "1.0.0" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" @@ -12,19 +12,19 @@ structopt = "0.3.8" log = { version = "0.4.11" } # uniarts -uniarts-service = { path = "../service", default-features = false, optional = true } -uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } +uniarts-service = { path = "../service", default-features = false } +uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } # substratem -sp-core = { version = "2.0.1", optional = true } -sc-cli = { version = "0.8.0", optional = true } -sc-service = { version = "0.8.0", optional = true } -sc-executor = { version = "0.8.0", features = ["wasmtime"] } -frame-benchmarking-cli = { version = "2.0.1", optional = true } -sp-trie = { version = "2.0.1", default-features = false } +sp-core = { version = "3.0.0", optional = true } +sc-cli = { version = "0.9.0", optional = true } +sc-service = { version = "0.9.0", optional = true } +sc-executor = { version = "0.9.0", features = ["wasmtime"] } +frame-benchmarking-cli = { version = "3.0.0", optional = true } +sp-trie = { version = "3.0.0", default-features = false } [build-dependencies] -substrate-build-script-utils = { version = "2.0.1", default-features = false } +substrate-build-script-utils = { version = "3.0.0", default-features = false } [features] default = ["wasmtime", "cli"] @@ -36,7 +36,7 @@ wasmtime = [ ] cli = [ - "uniarts-service", + "uniarts-service/full-node", "sp-core", "sc-cli", "sc-service", diff --git a/bin/cli/src/cli.rs b/bin/cli/src/cli.rs index f3667fa..dec16aa 100644 --- a/bin/cli/src/cli.rs +++ b/bin/cli/src/cli.rs @@ -1,5 +1,5 @@ use structopt::StructOpt; -use sc_cli::RunCmd; +use sc_cli::{RunCmd, KeySubcommand, SignCmd, VanityCmd, VerifyCmd}; #[derive(Debug, StructOpt)] pub struct Cli { @@ -12,6 +12,18 @@ pub struct Cli { #[derive(Debug, StructOpt)] pub enum Subcommand { + /// Key management cli utilities + Key(KeySubcommand), + + /// Verify a signature for a message, provided on STDIN, with a given (public or secret) key. + Verify(VerifyCmd), + + /// Generate a seed that provides a vanity address. + Vanity(VanityCmd), + + /// Sign a message, with a given (secret) key. + Sign(SignCmd), + /// Build a chain specification. BuildSpec(sc_cli::BuildSpecCmd), diff --git a/bin/cli/src/command.rs b/bin/cli/src/command.rs index c38c2d4..414f843 100644 --- a/bin/cli/src/command.rs +++ b/bin/cli/src/command.rs @@ -25,7 +25,7 @@ use sp_core::crypto::Ss58AddressFormat; use uniarts_service::{pangu_runtime, fuxi_runtime, IdentifyVariant}; use log::info; -const UNI_ARTS_ADDRESS_FORMAT_ID: u8 = 45; +const UNI_ARTS_ADDRESS_FORMAT_ID: u16 = 45; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -117,6 +117,10 @@ pub fn run() -> sc_cli::Result<()> { let cli = Cli::from_args(); match &cli.subcommand { + Some(Subcommand::Key(cmd)) => cmd.run(&cli), + Some(Subcommand::Sign(cmd)) => cmd.run(), + Some(Subcommand::Verify(cmd)) => cmd.run(), + Some(Subcommand::Vanity(cmd)) => cmd.run(), Some(Subcommand::BuildSpec(cmd)) => { let runner = cli.create_runner(cmd)?; runner.sync_run(|config| cmd.run(config.chain_spec, config.network)) @@ -280,17 +284,25 @@ pub fn run() -> sc_cli::Result<()> { info!(" \\____/|_| |_|_| /_/ \\_\\_| \\__|___/ \\_____|_| |_|\\__,_|_|_| |_|"); info!(" "); info!(" "); - info!(" by UniArts Network, 2018-2020"); + info!(" by UniArts Network, 2018-2021"); if chain_spec.is_pangu_network() { - runner.run_node_until_exit(|config| match config.role { - Role::Light => uniarts_service::pangu_new_light(config), - _ => uniarts_service::pangu_new_full(config).map(|(components, _)| components), + runner.run_node_until_exit(|config| async move { + match config.role { + Role::Light => { + uniarts_service::pangu_new_light(config) + }, + _ => uniarts_service::pangu_new_full(config).map(|(task_manager, _)| task_manager), + }.map_err(sc_cli::Error::Service) }) } else if chain_spec.is_fuxi_network() { - runner.run_node_until_exit(|config| match config.role { - Role::Light => uniarts_service::fuxi_new_light(config), - _ => uniarts_service::fuxi_new_full(config).map(|(components, _)| components), + runner.run_node_until_exit(|config| async move { + match config.role { + Role::Light => { + uniarts_service::fuxi_new_light(config) + }, + _ => uniarts_service::fuxi_new_full(config).map(|(task_manager, _)| task_manager), + }.map_err(sc_cli::Error::Service) }) } else { unreachable!() diff --git a/bin/cli/src/lib.rs b/bin/cli/src/lib.rs index 219935c..4817cb2 100644 --- a/bin/cli/src/lib.rs +++ b/bin/cli/src/lib.rs @@ -1,6 +1,5 @@ //! Uniarts CLI library. - - +#![warn(missing_docs)] #![warn(unused_extern_crates)] #[cfg(feature = "cli")] @@ -9,10 +8,6 @@ mod cli; mod command; #[cfg(feature = "cli")] -pub use cli::*; - -#[cfg(feature = "cli")] -pub use command::*; - +pub use command::run; #[cfg(feature = "cli")] -pub use sc_cli::{Error, Result}; \ No newline at end of file +pub use sc_cli::Result; \ No newline at end of file diff --git a/bin/rpc/Cargo.toml b/bin/rpc/Cargo.toml index a4651f6..19df96f 100644 --- a/bin/rpc/Cargo.toml +++ b/bin/rpc/Cargo.toml @@ -1,47 +1,47 @@ [package] name = "uniarts-rpc" description = "Uniarts node rpc" -version = "1.0.0" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" [dependencies] # crates -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false } jsonrpc-core = "15.1.0" # uniarts -uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } +uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } # rpc -substrate-frame-rpc-system = { version = "2.0.0" } -pallet-transaction-payment-rpc = { version = "2.0.0" } +substrate-frame-rpc-system = { version = "3.0.0" } +pallet-transaction-payment-rpc = { version = "3.0.0" } -pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } -pallet-contracts-rpc = { version = "0.8.0" } +pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } +pallet-contracts-rpc = { version = "3.0.0" } # substrate client -sc-cli = { version = "0.8.0", features = ["wasmtime"] } -sc-executor = { version = "0.8.0", features = ["wasmtime"] } -sc-service = { version = "0.8.0", features = ["wasmtime"] } -sc-transaction-pool = { version = "2.0.0" } -sc-consensus-aura = { version = "0.8.0" } -sc-consensus = { version = "0.8.0" } -sc-finality-grandpa = { version = "0.8.0" } -sc-client-api = { version = "2.0.0" } -sc-rpc = { version = "2.0.0" } -sc-rpc-api = { version = "0.8.0" } -sc-telemetry = { version = "2.0.0" } -sc-basic-authorship = { version = "0.8.0" } +sc-cli = { version = "0.9.0", features = ["wasmtime"] } +sc-executor = { version = "0.9.0", features = ["wasmtime"] } +sc-service = { version = "0.9.0", features = ["wasmtime"] } +sc-transaction-pool = { version = "3.0.0" } +sc-consensus-aura = { version = "0.9.0" } +sc-consensus = { version = "0.9.0" } +sc-finality-grandpa = { version = "0.9.0" } +sc-client-api = { version = "3.0.0" } +sc-rpc = { version = "3.0.0" } +sc-rpc-api = { version = "0.9.0" } +sc-telemetry = { version = "3.0.0" } +sc-basic-authorship = { version = "0.9.0" } # substrate primitives -sp-core = { version = "2.0.0" } -sp-inherents = { version = "2.0.0" } -sp-transaction-pool = { version = "2.0.0"} -sp-consensus-aura = { version = "0.8.0" } -sp-consensus = { version = "0.8.0" } -sp-finality-grandpa = { version = "2.0.0" } -sp-runtime = { version = "2.0.0" } -sp-api = { version = "2.0.0" } -sp-blockchain = { version = "2.0.0" } -sp-block-builder = { version = "2.0.0" } \ No newline at end of file +sp-core = { version = "3.0.0" } +sp-inherents = { version = "3.0.0" } +sp-transaction-pool = { version = "3.0.0"} +sp-consensus-aura = { version = "0.9.0" } +sp-consensus = { version = "0.9.0" } +sp-finality-grandpa = { version = "3.0.0" } +sp-runtime = { version = "3.0.0" } +sp-api = { version = "3.0.0" } +sp-blockchain = { version = "3.0.0" } +sp-block-builder = { version = "3.0.0" } \ No newline at end of file diff --git a/bin/rpc/src/lib.rs b/bin/rpc/src/lib.rs index 0724e41..4365531 100644 --- a/bin/rpc/src/lib.rs +++ b/bin/rpc/src/lib.rs @@ -42,7 +42,7 @@ pub struct LightDeps { /// Instantiate all full RPC extensions. pub fn create_full( deps: FullDeps, -) -> RpcExtension where +) -> jsonrpc_core::IoHandler where C: ProvideRuntimeApi, C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, @@ -88,7 +88,7 @@ pub fn create_full( } /// Instantiate all RPC extensions for light node. -pub fn create_light(deps: LightDeps) -> RpcExtension +pub fn create_light(deps: LightDeps) -> jsonrpc_core::IoHandler where C: 'static + Send + Sync, C: ProvideRuntimeApi, diff --git a/bin/service/Cargo.toml b/bin/service/Cargo.toml index eb38a4b..471c99f 100644 --- a/bin/service/Cargo.toml +++ b/bin/service/Cargo.toml @@ -1,72 +1,74 @@ [package] name = "uniarts-service" -version = "1.0.0" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" [dependencies] structopt = "0.3.8" -serde = { version = "1.0.101", features = ["derive"] } +serde = { version = "1.0.102", features = ["derive"] } serde_json = { version = "1.0.41" } -hex-literal = "0.2.1" -futures = { version = "=0.3.8" } +hex-literal = "0.3.1" +futures = { version = "0.3.13" } log = { version = "0.4.11" } -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } # Uniarts pangu-runtime = { path = "../../runtime/pangu" } fuxi-runtime = { path = "../../runtime/fuxi" } uniarts-rpc = { path = "../rpc" } -uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } +uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } # substrate client -sc-cli = { version = "0.8.0", features = ["wasmtime"] } -sc-executor = { version = "0.8.0", features = ["wasmtime"] } -sc-service = { version = "0.8.0", features = ["wasmtime"] } -sc-transaction-pool = { version = "2.0.1" } -sc-consensus-aura = { version = "0.8.0" } -sc-consensus = { version = "0.8.0" } -sc-finality-grandpa = { version = "0.8.0" } -sc-client-api = { version = "2.0.1" } -sc-rpc = { version = "2.0.1" } -sc-rpc-api = { version = "0.8.0" } -sc-telemetry = { version = "2.0.1" } -sc-chain-spec = { version = "2.0.1" } -sc-basic-authorship = { version = "0.8.0" } +sc-cli = { version = "0.9.0", features = ["wasmtime"] } +sc-executor = { version = "0.9.0", features = ["wasmtime"] } +sc-service = { version = "0.9.0", features = ["wasmtime"] } +sc-transaction-pool = { version = "3.0.0" } +sc-consensus-aura = { version = "0.9.0" } +sc-consensus = { version = "0.9.0" } +sc-finality-grandpa = { version = "0.9.0" } +sc-client-api = { version = "3.0.0" } +sc-rpc = { version = "3.0.0" } +sc-rpc-api = { version = "0.9.0" } +sc-telemetry = { version = "3.0.0" } +sc-keystore = { version = "3.0.0" } +sc-chain-spec = { version = "3.0.0" } +sc-basic-authorship = { version = "0.9.0" } # substrate primitives -sp-core = { version = "2.0.1" } -sp-inherents = { version = "2.0.1" } -sp-transaction-pool = { version = "2.0.1"} -sp-consensus-aura = { version = "0.8.0" } -sp-consensus = { version = "0.8.0" } -sp-finality-grandpa = { version = "2.0.1" } -sp-runtime = { version = "2.0.1" } -sp-api = { version = "2.0.1" } -sp-blockchain = { version = "2.0.1" } -sp-block-builder = { version = "2.0.1" } -sp-offchain = { version = "2.0.1" } -sp-session = { version = "2.0.1" } -sp-trie = { version = "2.0.1" } +sp-core = { version = "3.0.0" } +sp-inherents = { version = "3.0.0" } +sp-transaction-pool = { version = "3.0.0"} +sp-consensus-aura = { version = "0.9.0" } +sp-consensus = { version = "0.9.0" } +sp-finality-grandpa = { version = "3.0.0" } +sp-runtime = { version = "3.0.0" } +sp-api = { version = "3.0.0" } +sp-blockchain = { version = "3.0.0" } +sp-block-builder = { version = "3.0.0" } +sp-offchain = { version = "3.0.0" } +sp-session = { version = "3.0.0" } +sp-storage = { version = "3.0.0" } +sp-trie = { version = "3.0.0" } -frame-benchmarking = { version = "2.0.0" } -frame-benchmarking-cli = { version = "2.0.0" } +frame-benchmarking = { version = "3.0.0" } +frame-benchmarking-cli = { version = "3.0.0" } # pallet -substrate-frame-rpc-system = { version = "2.0.0" } -substrate-prometheus-endpoint = { version = "0.8.1" } -pallet-transaction-payment-rpc = { version = "2.0.0" } -pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } -pallet-contracts-rpc = { version = "0.8.0" } -pallet-contracts = { version = "2.0.0" } +substrate-frame-rpc-system = { version = "3.0.0" } +substrate-prometheus-endpoint = { version = "0.9.0" } +pallet-transaction-payment-rpc = { version = "3.0.0" } +pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } +pallet-contracts-rpc = { version = "3.0.0" } +pallet-contracts = { version = "3.0.0" } # API -frame-system-rpc-runtime-api = { version = "2.0.0" } -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.0" } +frame-system-rpc-runtime-api = { version = "3.0.0" } +pallet-transaction-payment-rpc-runtime-api = { version = "3.0.0" } [build-dependencies] -substrate-build-script-utils = { version = "2.0.0" } -# frame-benchmarking-cli = { version = '2.0.0', optional = true } +substrate-build-script-utils = '3.0.0' +# frame-benchmarking-cli = { version = '3.0.0', optional = true } [features] default = ["db", "full-node"] diff --git a/bin/service/src/client.rs b/bin/service/src/client.rs index 1f6066b..3f0efae 100644 --- a/bin/service/src/client.rs +++ b/bin/service/src/client.rs @@ -4,37 +4,18 @@ /// Uniarts internal crates. // --- crates --- pub use codec::Codec; -use uniarts_primitives::{OpaqueBlock as Block, AccountId, Balance, Nonce, BlockNumber, AuraId}; -use sp_runtime::traits::BlakeTwo256; - -pub trait UniartsClient: Sized - + Send - + Sync - + sc_client_api::BlockchainEvents - + sp_api::CallApiAt - + sp_api::ProvideRuntimeApi - + sp_blockchain::HeaderBackend - where - Backend: sc_client_api::Backend, - Block: sp_runtime::traits::Block, - Runtime: sp_api::ConstructRuntimeApi, -{ -} - -impl UniartsClient for Client - where - Backend: sc_client_api::Backend, - Block: sp_runtime::traits::Block, - Client: Sized - + Send - + Sync - + sp_api::CallApiAt - + sp_api::ProvideRuntimeApi - + sp_blockchain::HeaderBackend - + sc_client_api::BlockchainEvents, - Runtime: sp_api::ConstructRuntimeApi, -{ -} +use uniarts_primitives::{OpaqueBlock as Block, AccountId, Balance, Nonce, BlockNumber, AuraId, Hash, Header}; +use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator}; +use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; +use sp_blockchain::HeaderBackend; +use sp_consensus::BlockStatus; +use sp_runtime::{ + generic::{BlockId, SignedBlock}, + traits::{BlakeTwo256, Block as BlockT}, + Justification, +}; +use sp_storage::{ChildInfo, PrefixedStorageKey, StorageData, StorageKey}; +use std::sync::Arc; /// A set of APIs that Uniarts-like runtimes must implement. pub trait RuntimeApiCollection: @@ -73,5 +54,303 @@ impl RuntimeApiCollection for Api { } -pub trait RuntimeExtrinsic: codec::Codec + Send + Sync + 'static {} -impl RuntimeExtrinsic for E where E: codec::Codec + Send + Sync + 'static {} \ No newline at end of file +/// Config that abstracts over all available client implementations. +/// +/// For a concrete type there exists [`Client`]. +pub trait AbstractClient: + BlockchainEvents + + Sized + + Send + + Sync + + ProvideRuntimeApi + + HeaderBackend + + CallApiAt + where + Block: BlockT, + Backend: BackendT, + Backend::State: sp_api::StateBackend, + Self::Api: RuntimeApiCollection, +{ +} + +impl AbstractClient for Client + where + Block: BlockT, + Backend: BackendT, + Backend::State: sp_api::StateBackend, + Client: BlockchainEvents + + ProvideRuntimeApi + + HeaderBackend + + Sized + + Send + + Sync + + CallApiAt, + Client::Api: RuntimeApiCollection, +{ +} + +/// Execute something with the client instance. +/// +/// As there exist multiple chains inside Moonbeam, like Moonbeam itself, Moonbase, +/// Moonriver etc, there can exist different kinds of client types. As these +/// client types differ in the generics that are being used, we can not easily +/// return them from a function. For returning them from a function there exists +/// [`Client`]. However, the problem on how to use this client instance still +/// exists. This trait "solves" it in a dirty way. It requires a type to +/// implement this trait and than the [`execute_with_client`](ExecuteWithClient: +/// :execute_with_client) function can be called with any possible client +/// instance. +/// +/// In a perfect world, we could make a closure work in this way. +pub trait ExecuteWithClient { + /// The return type when calling this instance. + type Output; + + /// Execute whatever should be executed with the given client instance. + fn execute_with_client(self, client: Arc) -> Self::Output + where + >::StateBackend: sp_api::StateBackend, + Backend: sc_client_api::Backend, + Backend::State: sp_api::StateBackend, + Api: crate::RuntimeApiCollection, + Client: AbstractClient + 'static; +} + +/// A handle to a Moonbeam client instance. +/// +/// The Moonbeam service supports multiple different runtimes (Moonbase, Moonbeam +/// itself, etc). As each runtime has a specialized client, we need to hide them +/// behind a trait. This is this trait. +/// +/// When wanting to work with the inner client, you need to use `execute_with`. +pub trait ClientHandle { + /// Execute the given something with the client. + fn execute_with(&self, t: T) -> T::Output; +} + +/// A client instance of Moonbeam. +#[derive(Clone)] +pub enum Client { + Fuxi(Arc>), + Pangu(Arc>), +} + +impl ClientHandle for Client { + fn execute_with(&self, t: T) -> T::Output { + match self { + Self::Fuxi(client) => { + T::execute_with_client::<_, _, crate::FullBackend>(t, client.clone()) + } + Self::Pangu(client) => { + T::execute_with_client::<_, _, crate::FullBackend>(t, client.clone()) + } + } + } +} + +impl sc_client_api::UsageProvider for Client { + fn usage_info(&self) -> sc_client_api::ClientInfo { + match self { + Self::Fuxi(client) => client.usage_info(), + Self::Pangu(client) => client.usage_info(), + } + } +} + +impl sc_client_api::BlockBackend for Client { + fn block_body(&self, id: &BlockId) -> sp_blockchain::Result::Extrinsic>>> { + match self { + Self::Fuxi(client) => client.block_body(id), + Self::Pangu(client) => client.block_body(id), + } + } + + fn block(&self, id: &BlockId) -> sp_blockchain::Result>> { + match self { + Self::Fuxi(client) => client.block(id), + Self::Pangu(client) => client.block(id), + } + } + + fn block_status(&self, id: &BlockId) -> sp_blockchain::Result { + match self { + Self::Fuxi(client) => client.block_status(id), + Self::Pangu(client) => client.block_status(id), + } + } + + fn justification(&self, id: &BlockId) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.justification(id), + Self::Pangu(client) => client.justification(id), + } + } + + fn block_hash(&self, number: NumberFor) -> sp_blockchain::Result::Hash>> { + match self { + Self::Fuxi(client) => client.block_hash(number), + Self::Pangu(client) => client.block_hash(number), + } + } + + fn extrinsic(&self, hash: &::Hash) -> sp_blockchain::Result::Extrinsic>> { + match self { + Self::Fuxi(client) => client.extrinsic(hash), + Self::Pangu(client) => client.extrinsic(hash), + } + } + + fn have_extrinsic(&self, hash: &::Hash) -> sp_blockchain::Result { + match self { + Self::Fuxi(client) => client.have_extrinsic(hash), + Self::Pangu(client) => client.have_extrinsic(hash), + } + } +} + +impl sc_client_api::StorageProvider for Client { + fn storage(&self, id: &BlockId, key: &StorageKey) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.storage(id, key), + Self::Pangu(client) => client.storage(id, key), + } + } + + fn storage_keys(&self, id: &BlockId, key_prefix: &StorageKey) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.storage_keys(id, key_prefix), + Self::Pangu(client) => client.storage_keys(id, key_prefix), + } + } + + fn storage_hash( + &self, + id: &BlockId, + key: &StorageKey, + ) -> sp_blockchain::Result::Hash>> { + match self { + Self::Fuxi(client) => client.storage_hash(id, key), + Self::Pangu(client) => client.storage_hash(id, key), + } + } + + fn storage_pairs( + &self, + id: &BlockId, + key_prefix: &StorageKey, + ) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.storage_pairs(id, key_prefix), + Self::Pangu(client) => client.storage_pairs(id, key_prefix), + } + } + + fn storage_keys_iter<'a>( + &self, + id: &BlockId, + prefix: Option<&'a StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result>::State, Block>> { + match self { + Self::Fuxi(client) => client.storage_keys_iter(id, prefix, start_key), + Self::Pangu(client) => client.storage_keys_iter(id, prefix, start_key), + } + } + + fn child_storage( + &self, + id: &BlockId, + child_info: &ChildInfo, + key: &StorageKey, + ) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.child_storage(id, child_info, key), + Self::Pangu(client) => client.child_storage(id, child_info, key), + } + } + + fn child_storage_keys( + &self, + id: &BlockId, + child_info: &ChildInfo, + key_prefix: &StorageKey, + ) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.child_storage_keys(id, child_info, key_prefix), + Self::Pangu(client) => client.child_storage_keys(id, child_info, key_prefix), + } + } + + fn child_storage_hash( + &self, + id: &BlockId, + child_info: &ChildInfo, + key: &StorageKey, + ) -> sp_blockchain::Result::Hash>> { + match self { + Self::Fuxi(client) => client.child_storage_hash(id, child_info, key), + Self::Pangu(client) => client.child_storage_hash(id, child_info, key), + } + } + + fn max_key_changes_range( + &self, + first: NumberFor, + last: BlockId, + ) -> sp_blockchain::Result, BlockId)>> { + match self { + Self::Fuxi(client) => client.max_key_changes_range(first, last), + Self::Pangu(client) => client.max_key_changes_range(first, last), + } + } + + fn key_changes( + &self, + first: NumberFor, + last: BlockId, + storage_key: Option<&PrefixedStorageKey>, + key: &StorageKey, + ) -> sp_blockchain::Result, u32)>> { + match self { + Self::Fuxi(client) => client.key_changes(first, last, storage_key, key), + Self::Pangu(client) => client.key_changes(first, last, storage_key, key), + } + } +} + +impl sp_blockchain::HeaderBackend for Client { + fn header(&self, id: BlockId) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.header(&id), + Self::Pangu(client) => client.header(&id), + } + } + + fn info(&self) -> sp_blockchain::Info { + match self { + Self::Fuxi(client) => client.info(), + Self::Pangu(client) => client.info(), + } + } + + fn status(&self, id: BlockId) -> sp_blockchain::Result { + match self { + Self::Fuxi(client) => client.status(id), + Self::Pangu(client) => client.status(id), + } + } + + fn number(&self, hash: Hash) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.number(hash), + Self::Pangu(client) => client.number(hash), + } + } + + fn hash(&self, number: BlockNumber) -> sp_blockchain::Result> { + match self { + Self::Fuxi(client) => client.hash(number), + Self::Pangu(client) => client.hash(number), + } + } +} \ No newline at end of file diff --git a/bin/service/src/lib.rs b/bin/service/src/lib.rs index fc50d21..318fc1d 100644 --- a/bin/service/src/lib.rs +++ b/bin/service/src/lib.rs @@ -18,17 +18,18 @@ use uniarts_rpc::{FullDeps}; use std::sync::Arc; use std::time::Duration; use sc_client_api::{ExecutorProvider, RemoteBackend, StateBackendFor}; -use sc_service::{error::Error as ServiceError, TaskManager, PartialComponents, config::{KeystoreConfig, PrometheusConfig}}; +use sc_service::{error::Error as ServiceError, TaskManager, config::{KeystoreConfig, PrometheusConfig}, PartialComponents}; use sp_inherents::InherentDataProviders; use sc_executor::native_executor_instance; pub use sc_executor::{NativeExecutor, NativeExecutionDispatch}; -use sp_consensus::{import_queue::BasicQueue}; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; -use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState}; +use sc_finality_grandpa::SharedVoterState; use sp_api::ConstructRuntimeApi; +use sp_consensus::import_queue::BasicQueue; use sp_runtime::traits::BlakeTwo256; use sp_trie::PrefixedMemoryDB; use substrate_prometheus_endpoint::Registry; +use sc_keystore::LocalKeystore; type FullClient = sc_service::TFullClient; type FullBackend = sc_service::TFullBackend; @@ -99,7 +100,7 @@ pub fn new_partial(config: &mut Configuration) -> Result, FullSelectChain>, AuraPair >, - sc_finality_grandpa::LinkHalf, FullSelectChain> + sc_finality_grandpa::LinkHalf, FullSelectChain>, ) >, ServiceError> where @@ -109,9 +110,14 @@ pub fn new_partial(config: &mut Configuration) -> Result(&config)?; let client = Arc::new(client); @@ -119,6 +125,7 @@ pub fn new_partial(config: &mut Configuration) -> Result(config: &mut Configuration) -> Result(config: &mut Configuration) -> Result Result, &'static str> { + // FIXME: here would the concrete keystore be built, + // must return a concrete type (NOT `LocalKeystore`) that + // implements `CryptoStore` and `SyncCryptoStore` + Err("Remote Keystore not supported.") +} + /// Builds a new service for a full client. pub fn new_full(mut config: Configuration) -> Result<(TaskManager, Arc>), ServiceError> where @@ -159,13 +172,31 @@ pub fn new_full(mut config: Configuration) -> Result<(Task RuntimeApi::RuntimeApi: RuntimeApiCollection>, { let sc_service::PartialComponents { - client, backend, mut task_manager, import_queue, keystore, select_chain, transaction_pool, + client, + backend, + mut task_manager, + import_queue, + mut keystore_container, + select_chain, + transaction_pool, inherent_data_providers, other: (block_import, grandpa_link), } = new_partial(&mut config)?; - let finality_proof_provider = - GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); + if let Some(url) = &config.keystore_remote { + match remote_keystore(url) { + Ok(k) => keystore_container.set_remote_keystore(k), + Err(e) => { + return Err(ServiceError::Other( + format!("Error hooking up remote keystore for {}: {}", url, e))) + } + }; + } + + config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); + + // let finality_proof_provider = + // GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone()); let (network, network_status_sinks, system_rpc_tx, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -176,8 +207,6 @@ pub fn new_full(mut config: Configuration) -> Result<(Task import_queue, on_demand: None, block_announce_validator_builder: None, - finality_proof_request_builder: None, - finality_proof_provider: Some(finality_proof_provider.clone()), })?; if config.offchain_worker.enabled { @@ -188,10 +217,10 @@ pub fn new_full(mut config: Configuration) -> Result<(Task let role = config.role.clone(); let force_authoring = config.force_authoring; + let backoff_authoring_blocks: Option<()> = None; let name = config.network.node_name.clone(); let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); - let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default(); let rpc_extensions_builder = { let client = client.clone(); @@ -208,21 +237,26 @@ pub fn new_full(mut config: Configuration) -> Result<(Task }) }; - sc_service::spawn_tasks(sc_service::SpawnTasksParams { - network: network.clone(), - client: client.clone(), - keystore: keystore.clone(), - task_manager: &mut task_manager, - transaction_pool: transaction_pool.clone(), - telemetry_connection_sinks: telemetry_connection_sinks.clone(), - rpc_extensions_builder: rpc_extensions_builder, - on_demand: None, - remote_blockchain: None, - backend, network_status_sinks, system_rpc_tx, config, - })?; + let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks( + sc_service::SpawnTasksParams { + network: network.clone(), + client: client.clone(), + keystore: keystore_container.sync_keystore(), + task_manager: &mut task_manager, + transaction_pool: transaction_pool.clone(), + rpc_extensions_builder, + on_demand: None, + remote_blockchain: None, + backend, + network_status_sinks, + system_rpc_tx, + config, + }, + )?; if role.is_authority() { let proposer = sc_basic_authorship::ProposerFactory::new( + task_manager.spawn_handle(), client.clone(), transaction_pool, prometheus_registry.as_ref(), @@ -231,7 +265,7 @@ pub fn new_full(mut config: Configuration) -> Result<(Task let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>( + let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _, _>( sc_consensus_aura::slot_duration(&*client)?, client.clone(), select_chain, @@ -240,7 +274,8 @@ pub fn new_full(mut config: Configuration) -> Result<(Task network.clone(), inherent_data_providers.clone(), force_authoring, - keystore.clone(), + backoff_authoring_blocks, + keystore_container.sync_keystore(), can_author_with, )?; @@ -252,7 +287,7 @@ pub fn new_full(mut config: Configuration) -> Result<(Task // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. let keystore = if role.is_authority() { - Some(keystore as sp_core::traits::BareCryptoStorePtr) + Some(keystore_container.sync_keystore()) } else { None }; @@ -278,8 +313,7 @@ pub fn new_full(mut config: Configuration) -> Result<(Task config: grandpa_config, link: grandpa_link, network, - inherent_data_providers, - telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()), + telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()), voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, shared_voter_state: SharedVoterState::empty(), @@ -291,12 +325,6 @@ pub fn new_full(mut config: Configuration) -> Result<(Task "grandpa-voter", sc_finality_grandpa::run_grandpa_voter(grandpa_config)? ); - } else { - sc_finality_grandpa::setup_disabled_grandpa( - client.clone(), - &inherent_data_providers, - network, - )?; } network_starter.start_network(); @@ -314,9 +342,13 @@ pub fn new_light(mut config: Configuration) -> Result(&config)?; + config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); + + let select_chain = sc_consensus::LongestChain::new(backend.clone()); + let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( config.transaction_pool.clone(), config.prometheus_registry(), @@ -325,19 +357,21 @@ pub fn new_light(mut config: Configuration) -> Result), - Arc::new(on_demand.checker().clone()) as Arc<_>, + let (grandpa_block_import, _) = sc_finality_grandpa::block_import( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), )?; - let finality_proof_import = grandpa_block_import.clone(); - let finality_proof_request_builder = - finality_proof_import.create_finality_proof_request_builder(); + + let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new( + grandpa_block_import.clone(), + client.clone(), + ); let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>( sc_consensus_aura::slot_duration(&*client)?, - grandpa_block_import, - None, - Some(Box::new(finality_proof_import)), + aura_block_import, + Some(Box::new(grandpa_block_import)), client.clone(), InherentDataProviders::new(), &task_manager.spawn_handle(), @@ -345,9 +379,6 @@ pub fn new_light(mut config: Configuration) -> Result(mut config: Configuration) -> Result(mut config: Configuration) -> Result( config: &mut Configuration, ) -> Result< ( - Arc>, + Arc, Arc, BasicQueue>, TaskManager, @@ -408,15 +436,25 @@ pub fn new_chain_ops( { config.keystore = KeystoreConfig::InMemory; - let PartialComponents { - client, - backend, - import_queue, - task_manager, - .. - } = new_partial::(config)?; - - Ok((client, backend, import_queue, task_manager)) + if config.chain_spec.is_fuxi_network() { + let PartialComponents { + client, + backend, + import_queue, + task_manager, + .. + } = new_partial::(config)?; + Ok((Arc::new(Client::Fuxi(client)), backend, import_queue, task_manager)) + } else { + let PartialComponents { + client, + backend, + import_queue, + task_manager, + .. + } = new_partial::(config)?; + Ok((Arc::new(Client::Pangu(client)), backend, import_queue, task_manager)) + } } /// Create a new Uniarts service for a full node. @@ -426,13 +464,13 @@ pub fn pangu_new_full( ) -> Result< ( TaskManager, - Arc>, + Arc, ), ServiceError, > { let (components, client) = new_full::(config)?; - Ok((components, client)) + Ok((components, Arc::new(Client::Pangu(client)))) } /// Create a new Uniarts service for a light client. @@ -447,13 +485,13 @@ pub fn fuxi_new_full( ) -> Result< ( TaskManager, - Arc>, + Arc, ), ServiceError, > { let (components, client) = new_full::(config)?; - Ok((components, client)) + Ok((components, Arc::new(Client::Fuxi(client)))) } /// Create a new Uniarts service for a light client. diff --git a/docs/UA-logo.png b/docs/UA-logo.png new file mode 100644 index 0000000..64826f5 Binary files /dev/null and b/docs/UA-logo.png differ diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index f026fb7..397fe66 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,18 +1,19 @@ [package] -name = "uniarts-primitives" -version = "2.0.1" +name = "uniarts-chain-primitives" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { version = "1.0.101", optional = true, features = ["derive"] } -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false } -sp-core = { version = "2.0.1", default-features = false } -sp-runtime = { version = "2.0.1", default-features = false } -sp-std = { version = "2.0.1", default-features = false } -sp-consensus-aura = { version = "0.8.0", default-features = false } +serde = { version = "1.0.102", optional = true, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } + +sp-core = { version = "3.0.0", default-features = false } +sp-runtime = { version = "3.0.0", default-features = false } +sp-std = { version = "3.0.0", default-features = false } +uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } [features] default = ["std"] @@ -20,7 +21,7 @@ std = [ "serde", "codec/std", "sp-runtime/std", - "sp-consensus-aura/std", "sp-core/std", "sp-std/std", + "uniarts-primitives/std", ] \ No newline at end of file diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index eb08ab7..4328088 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -1,84 +1,4 @@ #![cfg_attr(not(feature = "std"), no_std)] - -use codec::{Decode, Encode}; -use sp_runtime::{ - generic, - traits::{IdentifyAccount, Verify, BlakeTwo256}, - MultiSignature, RuntimeDebug, OpaqueExtrinsic, -}; - -#[cfg(feature = "std")] -use serde::{Deserialize, Serialize}; - -/// An index to a block. -pub type BlockNumber = u32; - -/// Alias to 512-bit hash when used in the context of a transaction signature on the chain. -pub type Signature = MultiSignature; - -/// Alias to the public key used for this chain, actually a `MultiSigner`. Like the signature, this -/// also isn't a fixed size when encoded, as different cryptos have different size public keys. -pub type AccountPublic = ::Signer; - -/// Some way of identifying an account on the chain. We intentionally make it equivalent -/// to the public key of our transaction signing scheme. -pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - -/// The type for looking up accounts. We don't expect more than 4 billion of them, but you -/// never know... -pub type AccountIndex = u32; - -/// Balance of an account. -pub type Balance = u128; - -/// Signed version of Balance -pub type Amount = i128; - -/// Index of a transaction in the chain. -pub type Index = u32; - -/// A hash of some data used by the chain. -pub type Hash = sp_core::H256; - -/// Index of a transaction in the relay chain. 32-bit should be plenty. -pub type Nonce = u32; - -/// Digest item type. -pub type DigestItem = generic::DigestItem; - -/// Header type. -pub type Header = generic::Header; - -/// Block type. -pub type OpaqueBlock = generic::Block; - -/// AuraId type. -pub type AuraId = sp_consensus_aura::sr25519::AuthorityId; - -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -pub enum TokenSymbol { - USDT = 0, - DAI = 1, -} - -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -pub enum CurrencyId { - Native, - UINK, - DOT, - KSM, - ETH, - Token(TokenSymbol), -} - -impl Default for CurrencyId { - fn default() -> Self { - CurrencyId::Native - } -} - #[ignore] #[test] fn print_module_account() { diff --git a/runtime/fuxi/Cargo.toml b/runtime/fuxi/Cargo.toml index f2a0869..8e12d9a 100644 --- a/runtime/fuxi/Cargo.toml +++ b/runtime/fuxi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fuxi-runtime" -version = "2.0.1" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" build = "build.rs" @@ -11,83 +11,83 @@ description = "Uniarts node runtime for fuxi network" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.102", optional = true, features = ["derive"] } hex-literal = { version = "0.3.1", optional = true } -frame-system = { version = "2.0.1", default-features = false } -frame-support = { version = "2.0.1", default-features = false } -frame-executive = { version = "2.0.1", default-features = false } -frame-system-rpc-runtime-api = { version = "2.0.1", default-features = false } +frame-system = { version = "3.0.0", default-features = false } +frame-support = { version = "3.0.0", default-features = false } +frame-executive = { version = "3.0.0", default-features = false } +frame-system-rpc-runtime-api = { version = "3.0.0", default-features = false } -sp-api = { version = "2.0.1", default-features = false } -sp-block-builder = { version = "2.0.1", default-features = false} -sp-consensus-aura = { version = "0.8.0", default-features = false } -sp-core = { version = "2.0.1", default-features = false } -sp-inherents = { version = "2.0.1", default-features = false } -sp-offchain = { version = "2.0.1", default-features = false } -sp-runtime = { version = "2.0.1", default-features = false } -sp-session = { version = "2.0.1", default-features = false } -sp-std = { version = "2.0.1", default-features = false } -sp-transaction-pool = { version = "2.0.1", default-features = false } -sp-version = { version = "2.0.1", default-features = false } +sp-api = { version = "3.0.0", default-features = false } +sp-block-builder = { version = "3.0.0", default-features = false} +sp-consensus-aura = { version = "0.9.0", default-features = false } +sp-core = { version = "3.0.0", default-features = false } +sp-inherents = { version = "3.0.0", default-features = false } +sp-offchain = { version = "3.0.0", default-features = false } +sp-runtime = { version = "3.0.0", default-features = false } +sp-session = { version = "3.0.0", default-features = false } +sp-std = { version = "3.0.0", default-features = false } +sp-transaction-pool = { version = "3.0.0", default-features = false } +sp-version = { version = "3.0.0", default-features = false } -pallet-aura = { version = "2.0.1", default-features = false } -pallet-balances = { version = "2.0.1", default-features = false } -pallet-grandpa = { version = "2.0.1", default-features = false } -pallet-authorship = { version = "2.0.1", default-features = false } -pallet-randomness-collective-flip = { version = "2.0.1", default-features = false } -pallet-sudo = { version = "2.0.1", default-features = false } -pallet-timestamp = { version = "2.0.1", default-features = false } -pallet-transaction-payment = { version = "2.0.1", default-features = false } -pallet-session = { version = "2.0.1", default-features = false, features = ["historical"] } -pallet-nicks = { version = "2.0.1", default-features = false } -pallet-vesting = { version = "2.0.1", default-features = false } -pallet-collective = { version = "2.0.1", default-features = false } -pallet-membership = { version = "2.0.1", default-features = false } -pallet-treasury = { version = "2.0.1", default-features = false } -pallet-identity = { version = "2.0.1", default-features = false } -pallet-scheduler = { version = "2.0.1", default-features = false } -pallet-multisig = { version = "2.0.1", default-features = false } -pallet-proxy = { version = "2.0.1", default-features = false } -pallet-utility = { version = "2.0.1", default-features = false } -pallet-indices = { version = "2.0.1", default-features = false } -pallet-recovery = { version = "2.0.1", default-features = false } -pallet-society = { version = "2.0.1", default-features = false } -pallet-elections-phragmen = { version = "2.0.1", default-features = false } -pallet-contracts = { version = "2.0.1", default-features = false } -pallet-contracts-primitives = { version = "2.0.1", default-features = false } -pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false } +pallet-aura = { version = "3.0.0", default-features = false } +pallet-balances = { version = "3.0.0", default-features = false } +pallet-grandpa = { version = "3.0.0", default-features = false } +pallet-authorship = { version = "3.0.0", default-features = false } +pallet-randomness-collective-flip = { version = "3.0.0", default-features = false } +pallet-sudo = { version = "3.0.0", default-features = false } +pallet-timestamp = { version = "3.0.0", default-features = false } +pallet-transaction-payment = { version = "3.0.0", default-features = false } +pallet-session = { version = "3.0.0", default-features = false, features = ["historical"] } +pallet-nicks = { version = "3.0.0", default-features = false } +pallet-vesting = { version = "3.0.0", default-features = false } +pallet-collective = { version = "3.0.0", default-features = false } +pallet-membership = { version = "3.0.0", default-features = false } +pallet-treasury = { version = "3.0.0", default-features = false } +pallet-bounties = { version = "3.0.0", default-features = false } +pallet-identity = { version = "3.0.0", default-features = false } +pallet-scheduler = { version = "3.0.0", default-features = false } +pallet-multisig = { version = "3.0.0", default-features = false } +pallet-proxy = { version = "3.0.0", default-features = false } +pallet-utility = { version = "3.0.0", default-features = false } +pallet-indices = { version = "3.0.0", default-features = false } +pallet-recovery = { version = "3.0.0", default-features = false } +pallet-society = { version = "3.0.0", default-features = false } +pallet-elections-phragmen = { version = "3.0.0", default-features = false } +pallet-contracts = { version = "3.0.0", default-features = false } +pallet-contracts-primitives = { version = "3.0.0", default-features = false } +pallet-contracts-rpc-runtime-api = { version = "3.0.0", default-features = false } # orml -orml-currencies = { default-features = false, version = '0.3.0' } -orml-tokens = { default-features = false, version = '0.3.0' } +orml-currencies = { default-features = false, version = '0.4.0' } +orml-tokens = { default-features = false, version = '0.4.0' } +orml-traits = { default-features = false, version = '0.4.0' } # Used for RPCs -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.1", default-features = false } -pallet-staking-rpc-runtime-api = { version = "0.1.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } +pallet-transaction-payment-rpc-runtime-api = { version = "3.0.0", default-features = false } +pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } -# Uni-Arts pallets -uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-certificate = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-nft-multi = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-nft-blindbox = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-token = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-trade = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-bridge = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -# pallet-lotteries = { path = "../../pallets/lotteries", default-features = false } -primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } +# Uni-Arts configs +uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-nft-multi = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-nft-blindbox = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-bridge = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +# pallet-lotteries = { path = "../../configs/lotteries", default-features = false } +uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } # Used for runtime benchmarking -frame-benchmarking = { version = "2.0.1", default-features = false, optional = true } -frame-system-benchmarking = { version = "2.0.1", default-features = false, optional = true } +frame-benchmarking = { version = "3.0.0", default-features = false, optional = true } +frame-system-benchmarking = { version = "3.0.0", default-features = false, optional = true } [build-dependencies] -wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner" } +substrate-wasm-builder = '4.0.0' [features] default = ["std"] @@ -108,12 +108,14 @@ std = [ "pallet-collective/std", "pallet-membership/std", "pallet-treasury/std", + "pallet-bounties/std", "pallet-elections-phragmen/std", "pallet-identity/std", "pallet-randomness-collective-flip/std", "pallet-session/std", "pallet-society/std", "pallet-sudo/std", + "pallet-assets/std", "pallet-timestamp/std", "pallet-transaction-payment/std", "pallet-transaction-payment-rpc-runtime-api/std", @@ -125,8 +127,6 @@ std = [ "pallet-nft-multi/std", "pallet-nft-blindbox/std", "pallet-validator-set/std", - "pallet-token/std", - "pallet-trade/std", "pallet-staking/std", "pallet-rewards/std", "pallet-staking-rpc-runtime-api/std", @@ -150,7 +150,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", - "primitives/std", + "uniarts-primitives/std", ] runtime-benchmarks = [ diff --git a/runtime/fuxi/build.rs b/runtime/fuxi/build.rs index 5270504..203d775 100644 --- a/runtime/fuxi/build.rs +++ b/runtime/fuxi/build.rs @@ -1,10 +1,9 @@ -use wasm_builder_runner::WasmBuilder; +use substrate_wasm_builder::WasmBuilder; fn main() { WasmBuilder::new() .with_current_project() - .with_wasm_builder_from_crates("2.0.0") - .export_heap_base() .import_memory() + .export_heap_base() .build() } diff --git a/runtime/fuxi/src/configs/frame_system_config.rs b/runtime/fuxi/src/configs/frame_system_config.rs new file mode 100644 index 0000000..d25322f --- /dev/null +++ b/runtime/fuxi/src/configs/frame_system_config.rs @@ -0,0 +1,89 @@ +use frame_support::{weights::{constants::RocksDbWeight, DispatchClass}}; +use sp_runtime::traits::{BlakeTwo256, AccountIdLookup}; +use sp_version::RuntimeVersion; +use frame_system::{Config, limits::{BlockWeights, BlockLength} }; + +use uniarts_primitives::*; +use crate::{weights::frame_system::WeightInfo, *}; + +// pub struct BaseFilter; +// impl Filter for BaseFilter { +// fn filter(_: &Call) -> bool { +// true +// } +// } + +frame_support::parameter_types! { + pub const BlocksPerDay: u32 = 6 * 60 * 24; + pub const Version: RuntimeVersion = VERSION; + pub const SS58Prefix: u8 = 45; + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); +} + +impl Config for Runtime { + /// The basic call filter to use in dispatchable. + type BaseCallFilter = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Nonce; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = Header; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type PalletInfo = PalletInfo; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = WeightInfo; + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/mod.rs b/runtime/fuxi/src/configs/mod.rs new file mode 100644 index 0000000..2878adc --- /dev/null +++ b/runtime/fuxi/src/configs/mod.rs @@ -0,0 +1,34 @@ +pub mod frame_system_config; +pub mod pallet_contracts_config; +pub mod pallet_transaction_payment_config; +pub mod pallet_elections_phragmen_config; +pub mod pallet_treasury_config; +pub mod pallet_rewards_config; +pub mod pallet_validator_set_config; +pub mod pallet_session_config; +pub mod pallet_aura_config; +pub mod pallet_grandpa_config; +pub mod pallet_vesting_config; +pub mod pallet_timestamp_config; +pub mod pallet_authorship_config; +pub mod pallet_nicks_config; +pub mod pallet_sudo_config; +pub mod pallet_names_config; +pub mod pallet_assets_config; +pub mod orml_currencies_config; +pub mod orml_tokens_config; +pub mod pallet_nft_multi_config; +pub mod pallet_nft_blindbox_config; +pub mod pallet_society_config; +pub mod pallet_scheduler_config; +pub mod pallet_collective_config; +pub mod pallet_membership_config; +pub mod pallet_identity_config; +pub mod pallet_balances_config; +pub mod pallet_bounties_config; +pub mod pallet_utility_config; +pub mod pallet_multisig_config; +pub mod pallet_indices_config; +pub mod pallet_recovery_config; +pub mod pallet_bridge_config; +pub mod pallet_proxy_config; \ No newline at end of file diff --git a/runtime/fuxi/src/configs/orml_currencies_config.rs b/runtime/fuxi/src/configs/orml_currencies_config.rs new file mode 100644 index 0000000..6db359a --- /dev/null +++ b/runtime/fuxi/src/configs/orml_currencies_config.rs @@ -0,0 +1,15 @@ +use orml_currencies::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native; +} + +impl Config for Runtime { + type Event = Event; + type MultiCurrency = UniTokens; + type NativeCurrency = BasicCurrencyAdapter; + type GetNativeCurrencyId = GetNativeCurrencyId; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/orml_tokens_config.rs b/runtime/fuxi/src/configs/orml_tokens_config.rs new file mode 100644 index 0000000..a8b86e2 --- /dev/null +++ b/runtime/fuxi/src/configs/orml_tokens_config.rs @@ -0,0 +1,26 @@ +use orml_tokens::Config; +use uniarts_primitives::*; +use crate::*; +use crate::weights::orml_tokens::WeightInfo; +use orml_traits::parameter_type_with_key; +use sp_runtime::traits::Zero; + +parameter_type_with_key! { + pub ExistentialDeposits: |_currency_id: CurrencyId| -> Balance { + Zero::zero() + }; +} + +parameter_types! { + pub TreasuryModuleAccount: AccountId = UniArtsTreasuryModuleId::get().into_account(); +} + +impl Config for Runtime { + type Event = Event; + type Balance = Balance; + type Amount = Amount; + type CurrencyId = CurrencyId; + type ExistentialDeposits = ExistentialDeposits; + type OnDust = orml_tokens::TransferDust; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_assets_config.rs b/runtime/fuxi/src/configs/pallet_assets_config.rs new file mode 100644 index 0000000..c04fbbb --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_assets_config.rs @@ -0,0 +1,25 @@ +use pallet_assets::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const AssetDepositBase: Balance = 100 * DOLLARS; + pub const AssetDepositPerZombie: Balance = 1 * DOLLARS; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = 10 * DOLLARS; + pub const MetadataDepositPerByte: Balance = 1 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type Balance = u64; + type AssetId = u32; + type Currency = Balances; + type ForceOrigin = EnsureRoot; + type AssetDepositBase = AssetDepositBase; + type AssetDepositPerZombie = AssetDepositPerZombie; + type StringLimit = StringLimit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type WeightInfo = pallet_assets::weights::SubstrateWeight; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_aura_config.rs b/runtime/fuxi/src/configs/pallet_aura_config.rs new file mode 100644 index 0000000..0c434e8 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_aura_config.rs @@ -0,0 +1,7 @@ +use pallet_aura::Config; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use crate::*; + +impl Config for Runtime { + type AuthorityId = AuraId; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_authorship_config.rs b/runtime/fuxi/src/configs/pallet_authorship_config.rs new file mode 100644 index 0000000..48d010c --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_authorship_config.rs @@ -0,0 +1,29 @@ +use pallet_authorship::Config; +use crate::*; + +pub struct AuraAccountAdapter; + +impl FindAuthor for AuraAccountAdapter { + fn find_author<'a, I>(digests: I) -> Option + where I: 'a + IntoIterator + { + if let Some(index) = pallet_aura::Module::::find_author(digests) { + let validator = pallet_session::Module::::validators()[index as usize].clone(); + Some(validator) + } + else { + None + } + } +} + +frame_support::parameter_types! { + pub const UncleGenerations: BlockNumber = 0; +} + +impl Config for Runtime { + type FindAuthor = AuraAccountAdapter; + type UncleGenerations = UncleGenerations; + type FilterUncle = (); + type EventHandler = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_balances_config.rs b/runtime/fuxi/src/configs/pallet_balances_config.rs new file mode 100644 index 0000000..0ee5926 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_balances_config.rs @@ -0,0 +1,23 @@ +use pallet_balances::Config; +use uniarts_primitives::*; +use crate::*; +use crate::weights::pallet_balances::WeightInfo; + +frame_support::parameter_types! { + pub const ExistentialDeposit: u128 = 500; + // For weight estimation, we assume that the most locks on an individual account will be 50. + // This number may need to be adjusted in the future if this assumption no longer holds true. + pub const MaxLocks: u32 = 50; +} + +impl Config for Runtime { + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_bounties_config.rs b/runtime/fuxi/src/configs/pallet_bounties_config.rs new file mode 100644 index 0000000..d1ed767 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_bounties_config.rs @@ -0,0 +1,25 @@ +use pallet_bounties::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 5 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type BountyCuratorDeposit = BountyCuratorDeposit; + type BountyValueMinimum = BountyValueMinimum; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_bridge_config.rs b/runtime/fuxi/src/configs/pallet_bridge_config.rs new file mode 100644 index 0000000..b5e4b5e --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_bridge_config.rs @@ -0,0 +1,13 @@ +use pallet_bridge::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const GetBridgeCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::USDT); +} + +impl Config for Runtime { + type Event = Event; + type Currency = Currencies; + type GetBridgeCurrencyId = GetBridgeCurrencyId; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_collective_config.rs b/runtime/fuxi/src/configs/pallet_collective_config.rs new file mode 100644 index 0000000..daf597c --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_collective_config.rs @@ -0,0 +1,37 @@ +use pallet_collective::Config; +use uniarts_primitives::*; +use crate::*; +use crate::weights::pallet_collective::WeightInfo; + +frame_support::parameter_types! { + pub const CouncilMotionDuration: BlockNumber = 3 * DAYS; + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +pub type CouncilInstance = pallet_collective::Instance0; +impl Config for Runtime { + type Origin = Origin; + type Proposal = Call; + type Event = Event; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = WeightInfo; +} + +pub type TechnicalCollective = pallet_collective::Instance1; +impl Config for Runtime { + type Origin = Origin; + type Proposal = Call; + type Event = Event; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_contracts_config.rs b/runtime/fuxi/src/configs/pallet_contracts_config.rs new file mode 100644 index 0000000..982f943 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_contracts_config.rs @@ -0,0 +1,60 @@ +use pallet_contracts::Config; +use pallet_contracts::weights::WeightInfo; +use sp_runtime::Perbill; +use frame_support::weights::Weight; +use uniarts_primitives::*; +pub use crate::constants::currency::*; +pub use crate::constants::time::*; +// use core::convert::TryInto; + +use crate::*; +use crate::frame_system_config::RuntimeBlockWeights; + + +frame_support::parameter_types! { + pub const TombstoneDeposit: Balance = deposit( + 1, + sp_std::mem::size_of::>() as u32 + ); + pub DepositPerContract: Balance = TombstoneDeposit::get(); + pub const DepositPerStorageByte: Balance = deposit(0, 1); + pub const DepositPerStorageItem: Balance = deposit(1, 0); + pub RentFraction: Perbill = Perbill::from_rational_approximation(1u32, 30 * DAYS); + pub const SurchargeReward: Balance = 150 * MILLI; + pub const SignedClaimHandicap: u32 = 2; + pub const MaxDepth: u32 = 32; + pub const MaxValueSize: u32 = 16 * 1024; + pub const MaxCodeSize: u32 = 60 * 1024; + // The lazy deletion runs inside on_initialize. + pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * + RuntimeBlockWeights::get().max_block; + // The weight needed for decoding the queue should be less or equal than a fifth + // of the overall weight dedicated to the lazy deletion. + pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / ( + ::WeightInfo::on_initialize_per_queue_item(1) - + ::WeightInfo::on_initialize_per_queue_item(0) + )) / 5) as u32; +} + +impl Config for Runtime { + type Time = Timestamp; + type Randomness = RandomnessCollectiveFlip; + type Currency = Uart; + type Event = Event; + type RentPayment = (); + type SignedClaimHandicap = SignedClaimHandicap; + type TombstoneDeposit = TombstoneDeposit; + type DepositPerContract = DepositPerContract; + type DepositPerStorageByte = DepositPerStorageByte; + type DepositPerStorageItem = DepositPerStorageItem; + type RentFraction = RentFraction; + type SurchargeReward = SurchargeReward; + type MaxDepth = MaxDepth; + type MaxValueSize = MaxValueSize; + type WeightPrice = pallet_transaction_payment::Module; + type WeightInfo = pallet_contracts::weights::SubstrateWeight; + type ChainExtension = (); + type DeletionQueueDepth = DeletionQueueDepth; + type DeletionWeightLimit = DeletionWeightLimit; + type MaxCodeSize = MaxCodeSize; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_elections_phragmen_config.rs b/runtime/fuxi/src/configs/pallet_elections_phragmen_config.rs new file mode 100644 index 0000000..722eb4b --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_elections_phragmen_config.rs @@ -0,0 +1,32 @@ +use crate::{weights::pallet_elections_phragmen::WeightInfo, *}; +use pallet_elections_phragmen::Config; +use frame_support::traits::U128CurrencyToVote; + +frame_support::parameter_types! { + pub const CandidacyBond: Balance = 10 * UART; + // 1 storage item created, key size is 32 bytes, value size is 16+16. + pub const VotingBondBase: Balance = deposit(1, 64); + // additional data per vote is 32 bytes (account id). + pub const VotingBondFactor: Balance = deposit(0, 32); + pub const TermDuration: BlockNumber = 24 * HOURS; + pub const DesiredMembers: u32 = 7; + pub const DesiredRunnersUp: u32 = 7; +} + +impl Config for Runtime { + type Event = Event; + type ModuleId = ElectionsPhragmenModuleId; + type Currency = Uart; + type ChangeMembers = Council; + type InitializeMembers = Council; + type CurrencyToVote = U128CurrencyToVote; + type CandidacyBond = CandidacyBond; + type VotingBondBase = VotingBondBase; + type VotingBondFactor = VotingBondFactor; + type LoserCandidate = Treasury; + type KickedMember = Treasury; + type DesiredMembers = DesiredMembers; + type DesiredRunnersUp = DesiredRunnersUp; + type TermDuration = TermDuration; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_grandpa_config.rs b/runtime/fuxi/src/configs/pallet_grandpa_config.rs new file mode 100644 index 0000000..db452b8 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_grandpa_config.rs @@ -0,0 +1,22 @@ +use pallet_grandpa::Config; +use pallet_grandpa::{AuthorityId as GrandpaId}; +use crate::*; + +impl Config for Runtime { + type Event = Event; + type Call = Call; + + type KeyOwnerProofSystem = (); + + type KeyOwnerProof = + >::Proof; + + type KeyOwnerIdentification = >::IdentificationTuple; + + type HandleEquivocation = (); + + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_identity_config.rs b/runtime/fuxi/src/configs/pallet_identity_config.rs new file mode 100644 index 0000000..15a7e1c --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_identity_config.rs @@ -0,0 +1,27 @@ +use pallet_identity::Config; +use uniarts_primitives::*; +use crate::*; +use super::pallet_membership_config::EnsureRootOrMoreThanHalfCouncil; + +frame_support::parameter_types! { + pub const BasicDeposit: Balance = 10 * UART; // 258 bytes on-chain + pub const FieldDeposit: Balance = 250 * MICRO; // 66 bytes on-chain + pub const SubAccountDeposit: Balance = 2 * UART; // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type MaxRegistrars = MaxRegistrars; + type Slashed = Treasury; + type ForceOrigin = EnsureRootOrMoreThanHalfCouncil; + type RegistrarOrigin = EnsureRootOrMoreThanHalfCouncil; + type WeightInfo = weights::pallet_identity::WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_indices_config.rs b/runtime/fuxi/src/configs/pallet_indices_config.rs new file mode 100644 index 0000000..4f77cef --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_indices_config.rs @@ -0,0 +1,14 @@ +use pallet_indices::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_indices::WeightInfo, *}; + +frame_support::parameter_types! { + pub const IndexDeposit: Balance = 1 * UART; +} +impl Config for Runtime { + type AccountIndex = AccountIndex; + type Currency = Uart; + type Deposit = IndexDeposit; + type Event = Event; + type WeightInfo =WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_membership_config.rs b/runtime/fuxi/src/configs/pallet_membership_config.rs new file mode 100644 index 0000000..4b7aa96 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_membership_config.rs @@ -0,0 +1,51 @@ +use pallet_membership::Config; +use uniarts_primitives::*; +use crate::*; +use super::pallet_collective_config::CouncilInstance; + +pub type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilInstance>, +>; + +pub type ApproveOrigin = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilInstance>, +>; + +pub struct MembershipChangedGroup; +impl ChangeMembers for MembershipChangedGroup { + fn change_members_sorted( + incoming: &[AccountId], + outgoing: &[AccountId], + sorted_new: &[AccountId], + ) { + TechnicalCommittee::change_members_sorted(incoming, outgoing, sorted_new); + } +} + +pub type CouncilMembershipInstance = pallet_membership::Instance0; +impl Config for Runtime { + type Event = Event; + type AddOrigin = EnsureRootOrMoreThanHalfCouncil; + type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; + type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; + type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; + type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; + type MembershipInitialized = Council; + type MembershipChanged = Council; +} + +pub type TechnicalCommitteeMembershipInstance = pallet_membership::Instance1; +impl Config for Runtime { + type Event = Event; + type AddOrigin = EnsureRootOrMoreThanHalfCouncil; + type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; + type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; + type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; + type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; + type MembershipInitialized = TechnicalCommittee; + type MembershipChanged = MembershipChangedGroup; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_multisig_config.rs b/runtime/fuxi/src/configs/pallet_multisig_config.rs new file mode 100644 index 0000000..5bf4d28 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_multisig_config.rs @@ -0,0 +1,21 @@ +use pallet_multisig::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_multisig::WeightInfo, *}; + +frame_support::parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u16 = 100; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_names_config.rs b/runtime/fuxi/src/configs/pallet_names_config.rs new file mode 100644 index 0000000..d90d72f --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_names_config.rs @@ -0,0 +1,36 @@ +use pallet_names::Config; +use crate::*; + +impl Config for Runtime { + type Name = Vec; + type Value = Vec; + type Currency = Uart; + type Event = Event; + + fn get_name_fee(op: &pallet_names::Operation) -> Option { + /* Single-letter names are not allowed (nor the empty name). Everything + else is fine. */ + if op.name.len() < 2 { + return None + } + + Some(match op.operation { + pallet_names::OperationType::Registration => 1000, + pallet_names::OperationType::Update => 100, + }) + } + + fn get_expiration(op: &pallet_names::Operation) -> Option { + /* Short names (up to three characters) will expire after 10 blocks. + Longer names will stick around forever. */ + if op.name.len() <= 3 { + Some(10) + } else { + None + } + } + + fn deposit_fee(_b: >::NegativeImbalance) { + /* Just burn the name fee by dropping the imbalance. */ + } +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_nft_blindbox_config.rs b/runtime/fuxi/src/configs/pallet_nft_blindbox_config.rs new file mode 100644 index 0000000..f8602b1 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_nft_blindbox_config.rs @@ -0,0 +1,10 @@ +use pallet_nft_blindbox::Config; +use crate::*; + +impl Config for Runtime { + type LockModuleId = UniArtsBlindBoxModuleId; + type NftHandler = Nft; + type Event = Event; + type Randomness = RandomnessCollectiveFlip; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_nft_multi_config.rs b/runtime/fuxi/src/configs/pallet_nft_multi_config.rs new file mode 100644 index 0000000..dd175bd --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_nft_multi_config.rs @@ -0,0 +1,10 @@ +use pallet_nft_multi::Config; +use crate::*; + +/// Used for the module nft-multi in `./nft-multi.rs` +impl Config for Runtime { + type ModuleId = UniArtsNftModuleId; + type MultiCurrency = Currencies; + type Event = Event; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_nicks_config.rs b/runtime/fuxi/src/configs/pallet_nicks_config.rs new file mode 100644 index 0000000..be94399 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_nicks_config.rs @@ -0,0 +1,27 @@ +use pallet_nicks::Config; +use crate::*; + +frame_support::parameter_types! { + // Choose a fee that incentivizes desireable behavior. + pub const NickReservationFee: u128 = 100; + pub const MinNickLength: usize = 6; + // Maximum bounds on storage are important to secure your chain. + pub const MaxNickLength: usize = 32; +} + +impl Config for Runtime { + /// The Balances pallet implements the ReservableCurrency Config. + type Currency = Uart; + /// Use the NickReservationFee from the parameter_types block. + type ReservationFee = NickReservationFee; + /// No action is taken when deposits are forfeited. + type Slashed = Treasury; + /// Configure the FRAME System Root origin as the Nick pallet admin. + type ForceOrigin = frame_system::EnsureRoot; + /// Use the MinNickLength from the parameter_types block. + type MinLength = MinNickLength; + /// Use the MaxNickLength from the parameter_types block. + type MaxLength = MaxNickLength; + /// The ubiquitous event type. + type Event = Event; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_proxy_config.rs b/runtime/fuxi/src/configs/pallet_proxy_config.rs new file mode 100644 index 0000000..54e20f0 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_proxy_config.rs @@ -0,0 +1,111 @@ +use codec::{Decode, Encode}; +use frame_support::traits::InstanceFilter; +use pallet_proxy::Config; +use sp_runtime::{traits::BlakeTwo256, RuntimeDebug}; +use uniarts_primitives::*; +use crate::{weights::pallet_proxy::WeightInfo, *}; + +/// The type used to represent the kinds of proxying allowed. +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] +pub enum ProxyType { + Any, + NonTransfer, + Governance, + Staking, + IdentityJudgement, +} +impl Default for ProxyType { + fn default() -> Self { + Self::Any + } +} + +impl InstanceFilter for ProxyType { + fn filter(&self, c: &Call) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => matches!( + c, + Call::System(..) | + Call::Timestamp(..) | + Call::Indices(pallet_indices::Call::claim(..)) | + Call::Indices(pallet_indices::Call::free(..)) | + Call::Indices(pallet_indices::Call::freeze(..)) | + // Specifically omitting the entire Balances pallet + Call::Recovery(pallet_recovery::Call::as_recovered(..)) | + Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | + Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | + Call::Recovery(pallet_recovery::Call::close_recovery(..)) | + Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | + Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | + Call::Authorship(..) | + Call::Staking(..) | + Call::Session(..) | + Call::Grandpa(..) | + Call::Utility(..) | + Call::Society(..) | + Call::Council(..) | + Call::CouncilMembership(..) | + Call::TechnicalCommittee(..) | + Call::TechnicalMembership(..) | + Call::ElectionsPhragmen(..) | + Call::Treasury(..) | + Call::Identity(..) | + Call::Scheduler(..) | + Call::Proxy(..) | + Call::Multisig(..) | + Call::Nft(..) | + Call::BlindBox(..) | + Call::Contracts(..) + ), + ProxyType::Governance => matches!( + c, + Call::Council(..) | + Call::Treasury(..) | + Call::TechnicalCommittee(..) | + Call::ElectionsPhragmen(..) | + Call::Utility(..) + ), + ProxyType::Staking => matches!(c, Call::Staking(..)), + ProxyType::IdentityJudgement => matches!( + c, + Call::Identity(pallet_identity::Call::provide_judgement(..)) + ) + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } +} + +frame_support::parameter_types! { + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const MaxPending: u16 = 32; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = MaxProxies; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_recovery_config.rs b/runtime/fuxi/src/configs/pallet_recovery_config.rs new file mode 100644 index 0000000..9179a14 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_recovery_config.rs @@ -0,0 +1,20 @@ +use pallet_recovery::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const ConfigDepositBase: Balance = 10 * MILLI; + pub const FriendDepositFactor: Balance = MILLI; + pub const MaxFriends: u16 = 9; + pub const RecoveryDeposit: Balance = 10 * MILLI; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type ConfigDepositBase = ConfigDepositBase; + type FriendDepositFactor = FriendDepositFactor; + type MaxFriends = MaxFriends; + type RecoveryDeposit = RecoveryDeposit; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_rewards_config.rs b/runtime/fuxi/src/configs/pallet_rewards_config.rs new file mode 100644 index 0000000..7facb9c --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_rewards_config.rs @@ -0,0 +1,66 @@ +use crate::{weights::pallet_rewards::WeightInfo, *}; +use uniarts_primitives::*; +use pallet_rewards::Config; +use pallet_staking; +use super::frame_system_config::BlocksPerDay; + +pub use crate::constants::currency::*; +pub use crate::constants::time::*; + +/* + 150_000_000 UARTs will be minted during 6 years. + 8 UARTs/block. Total supply is 250_000_000. + 75 days of mining in the sixth year. + + 1: 42048000 -> 16.8% + 2: 33638400 -> 13.4% + 3: 26910720 -> 10.8% + 4: 21528576 -> 8.6% + 5: 17222860 -> 6.9% + 6: 8651443 -> 3.5% +*/ +frame_support::parameter_types! { + pub const MiningRewardPerBlock: Balance = 8 * UART; + pub const RewardThreshold: Balance = 30 * (BlocksPerDay::get() as Balance) * MiningRewardPerBlock::get(); + pub const StakingRewardPerBlock: Balance = 1 * UART; + pub const AmpFactor: Balance = 1e12 as Balance; + pub const BlocksPerYear: u32 = 365 * BlocksPerDay::get(); + pub const MiningCap: Balance = 150_000_000 * UART; +} + +pub struct AccountIdOf; +impl Convert> for AccountIdOf { + fn convert(a: T) -> Option { + Some(a) + } +} + +pub struct ConvertNumberToBalance; +impl> Convert for ConvertNumberToBalance { + fn convert(a: BlockNumber) -> Balance { + Balance::saturated_from::(a) + } +} + +impl Config for Runtime { + type AccountIdOf = AccountIdOf; + type Balance = Balance; + type Currency = Uart; + type RewardThreshold = RewardThreshold; + type RewardPerBlock = MiningRewardPerBlock; + type BlocksPerYear = BlocksPerYear; + type MiningCap = MiningCap; + type Event = Event; + type WeightInfo = WeightInfo; +} + +impl pallet_staking::Config for Runtime { + type ModuleId = StakingModuleId; + type Event = Event; + type Currency = Uart; + type RewardPerBlock = StakingRewardPerBlock; + type Id = u32; + type AmpFactor = AmpFactor; + type ConvertNumberToBalance = ConvertNumberToBalance; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_scheduler_config.rs b/runtime/fuxi/src/configs/pallet_scheduler_config.rs new file mode 100644 index 0000000..dcb79dd --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_scheduler_config.rs @@ -0,0 +1,17 @@ +use pallet_scheduler::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_scheduler::WeightInfo, *}; + +frame_support::parameter_types! { + pub const MaxScheduledPerBlock: u32 = 50; +} +impl Config for Runtime { + type Event = Event; + type Origin = Origin; + type PalletsOrigin = OriginCaller; + type Call = Call; + type MaximumWeight = MaximumBlockWeight; + type ScheduleOrigin = EnsureRoot; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_session_config.rs b/runtime/fuxi/src/configs/pallet_session_config.rs new file mode 100644 index 0000000..0342d13 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_session_config.rs @@ -0,0 +1,25 @@ +use uniarts_primitives::*; +use pallet_session::Config; +use super::pallet_validator_set_config::DisabledValidatorsThreshold; +use crate::*; +use crate::weights::pallet_session::WeightInfo; + +pub struct ValidatorIdOf; +impl Convert> for ValidatorIdOf { + fn convert(a: T) -> Option { + Some(a) + } +} + +impl Config for Runtime { + type Event = Event; + type ValidatorId = AccountId; + type ValidatorIdOf = ValidatorIdOf; + type ShouldEndSession = ValidatorSet; + type NextSessionRotation = ValidatorSet; + type SessionManager = ValidatorSet; + type SessionHandler = ::KeyTypeIdProviders; + type Keys = opaque::SessionKeys; + type DisabledValidatorsThreshold = DisabledValidatorsThreshold; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_society_config.rs b/runtime/fuxi/src/configs/pallet_society_config.rs new file mode 100644 index 0000000..9b5ef79 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_society_config.rs @@ -0,0 +1,31 @@ +use pallet_society::Config; +use uniarts_primitives::*; +use crate::*; +use crate::pallet_membership_config::EnsureRootOrMoreThanHalfCouncil; + +frame_support::parameter_types! { + pub const CandidateDeposit: Balance = 10 * UART; + pub const WrongSideDeduction: Balance = 2 * UART; + pub const MaxStrikes: u32 = 10; + pub const RotationPeriod: BlockNumber = 80 * HOURS; + pub const PeriodSpend: Balance = 500 * UART; + pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; + pub const ChallengePeriod: BlockNumber = 7 * DAYS; +} + +impl Config for Runtime { + type Event = Event; + type ModuleId = SocietyModuleId; + type Currency = Uart; + type Randomness = RandomnessCollectiveFlip; + type CandidateDeposit = CandidateDeposit; + type WrongSideDeduction = WrongSideDeduction; + type MaxStrikes = MaxStrikes; + type PeriodSpend = PeriodSpend; + type MembershipChanged = (); + type RotationPeriod = RotationPeriod; + type MaxLockDuration = MaxLockDuration; + type FounderSetOrigin = EnsureRootOrMoreThanHalfCouncil; + type SuspensionJudgementOrigin = pallet_society::EnsureFounder; + type ChallengePeriod = ChallengePeriod; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_sudo_config.rs b/runtime/fuxi/src/configs/pallet_sudo_config.rs new file mode 100644 index 0000000..ee3dd3e --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_sudo_config.rs @@ -0,0 +1,7 @@ +use pallet_sudo::Config; +use crate::*; + +impl Config for Runtime { + type Event = Event; + type Call = Call; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_timestamp_config.rs b/runtime/fuxi/src/configs/pallet_timestamp_config.rs new file mode 100644 index 0000000..6bf2637 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_timestamp_config.rs @@ -0,0 +1,14 @@ +use pallet_timestamp::Config; +use crate::{weights::pallet_timestamp::WeightInfo, *}; + +frame_support::parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_transaction_payment_config.rs b/runtime/fuxi/src/configs/pallet_transaction_payment_config.rs new file mode 100644 index 0000000..f7add60 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_transaction_payment_config.rs @@ -0,0 +1,38 @@ +use pallet_transaction_payment::Config; +use sp_runtime::{Perquintill, FixedPointNumber}; + +use uniarts_primitives::*; +pub use crate::constants::currency::*; +use crate::*; + +pub struct DealWithFees; + +impl OnUnbalanced> for DealWithFees { + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(fees) = fees_then_tips.next() { + // for fees, 90% to treasury, 10% to author + let mut split = fees.ration(90, 10); + if let Some(tips) = fees_then_tips.next() { + // for tips, if any, 90% to treasury, 10% to author (though this can be anything) + tips.ration_merge_into(90, 10, &mut split); + } + Treasury::on_unbalanced(split.0); + Author::on_unbalanced(split.1); + } + } +} + +frame_support::parameter_types! { + pub const TransactionByteFee: Balance = 1 * MICRO; + pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); + pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000); + pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); +} + +impl Config for Runtime { + type OnChargeTransaction = CurrencyAdapter; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = IdentityFee; + type FeeMultiplierUpdate = + TargetedFeeAdjustment; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_treasury_config.rs b/runtime/fuxi/src/configs/pallet_treasury_config.rs new file mode 100644 index 0000000..af9458c --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_treasury_config.rs @@ -0,0 +1,40 @@ +use sp_runtime::{Percent, Permill}; +use crate::{weights::pallet_treasury::WeightInfo, *}; +use pallet_treasury::Config; +use crate::pallet_membership_config::{EnsureRootOrMoreThanHalfCouncil, ApproveOrigin}; + +frame_support::parameter_types! { + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 10 * UART; + pub const SpendPeriod: BlockNumber = 1 * DAYS; + pub const Burn: Permill = Permill::from_percent(0); + pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipFindersFee: Percent = Percent::from_percent(10); + pub const TipReportDepositBase: Balance = 1 * UART; + pub const SevenDays: BlockNumber = 7 * DAYS; + pub const ZeroDay: BlockNumber = 0; + pub const OneDay: BlockNumber = DAYS; + pub const DataDepositPerByte: Balance = 1 * MILLI; + pub const BountyDepositBase: Balance = 1 * UART; + pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 10 * UART; + pub const MaximumReasonLength: u32 = 16384; +} + +impl Config for Runtime { + type ModuleId = UniArtsTreasuryModuleId; + type Currency = Uart; + type ApproveOrigin = ApproveOrigin; + type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; + type Event = Event; + type OnSlash = Treasury; + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type SpendPeriod = SpendPeriod; + type Burn = Burn; + type BurnDestination = Society; + type WeightInfo = WeightInfo; + type SpendFunds = Bounties; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_utility_config.rs b/runtime/fuxi/src/configs/pallet_utility_config.rs new file mode 100644 index 0000000..3cf41f5 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_utility_config.rs @@ -0,0 +1,8 @@ +use pallet_utility::Config; +use crate::{weights::pallet_utility::WeightInfo, *}; + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_validator_set_config.rs b/runtime/fuxi/src/configs/pallet_validator_set_config.rs new file mode 100644 index 0000000..9fd3983 --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_validator_set_config.rs @@ -0,0 +1,16 @@ +use sp_runtime::Perbill; +use uniarts_primitives::*; +use pallet_validator_set::Config; +use crate::constants::currency::*; +use crate::*; + +frame_support::parameter_types! { + pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); + pub const ValidatorMortgageLimit: Balance = 10_000 * UART; +} + +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type ValidatorMortgageLimit = ValidatorMortgageLimit; +} \ No newline at end of file diff --git a/runtime/fuxi/src/configs/pallet_vesting_config.rs b/runtime/fuxi/src/configs/pallet_vesting_config.rs new file mode 100644 index 0000000..2b0755f --- /dev/null +++ b/runtime/fuxi/src/configs/pallet_vesting_config.rs @@ -0,0 +1,15 @@ +use pallet_vesting::Config; +use sp_runtime::traits::ConvertInto; +use crate::*; + +frame_support::parameter_types! { + pub const MinVestedTransfer: Balance = 100 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/fuxi/src/constants.rs b/runtime/fuxi/src/constants.rs index 31b04c3..ec09362 100644 --- a/runtime/fuxi/src/constants.rs +++ b/runtime/fuxi/src/constants.rs @@ -1,5 +1,5 @@ pub mod currency { - use primitives::Balance; + use uniarts_primitives::Balance; pub const DOLLARS: Balance = 1_000_000; pub const CENTS: Balance = DOLLARS / 100; @@ -14,4 +14,17 @@ pub mod currency { pub const fn deposit(items: u32, bytes: u32) -> Balance { items as Balance * 20 * UART + (bytes as Balance) * 100 * MICRO } +} + +pub mod time { + use uniarts_primitives::{Moment, BlockNumber}; + + pub const MILLISECS_PER_BLOCK: Moment = 6000; + + pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; + + // Time is measured by number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; } \ No newline at end of file diff --git a/runtime/fuxi/src/lib.rs b/runtime/fuxi/src/lib.rs index a341c59..b0326fd 100644 --- a/runtime/fuxi/src/lib.rs +++ b/runtime/fuxi/src/lib.rs @@ -6,21 +6,33 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +/// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics. +#[cfg(feature = "std")] +pub fn wasm_binary_unwrap() -> &'static [u8] { + WASM_BINARY.expect("Development wasm binary is not available. This means the client is \ + built with `SKIP_WASM_BUILD` flag and it is only usable for \ + production chains. Please rebuild with the flag disabled.") +} + +/// Constant values used within the runtime. pub mod constants; +pub use constants::time::*; +pub use constants::currency::*; +pub mod configs; +pub use configs::*; -/// Weights for pallets used in the runtime. +/// Weights for configs used in the runtime. mod weights; // --- crates --- -use codec::{Decode, Encode}; use sp_std::prelude::*; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ - ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, RuntimeDebug, + ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, transaction_validity::{TransactionValidity, TransactionSource} }; use sp_runtime::traits::{ - BlakeTwo256, Block as BlockT, IdentityLookup, NumberFor, Saturating, ConvertInto, AccountIdConversion, + BlakeTwo256, Block as BlockT, NumberFor, Saturating, AccountIdConversion, Convert, OpaqueKeys, SaturatedConversion, Bounded }; use frame_system::{EnsureOneOf, EnsureRoot}; @@ -30,22 +42,27 @@ use sp_core::{u32_trait::{_1, _2, _3, _5}, }; use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; use pallet_grandpa::fg_primitives; use sp_version::RuntimeVersion; -use pallet_contracts_rpc_runtime_api::ContractExecResult; #[cfg(feature = "std")] use sp_version::NativeVersion; use orml_currencies::BasicCurrencyAdapter; +use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; +pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment, CurrencyAdapter}; +use sp_inherents::{InherentData, CheckInherentsResult}; // Uni-Arts -use constants::{currency::*}; type Uart = Balances; // A few exports that help ease life for downstream crates. #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; +#[cfg(any(feature = "std", test))] +pub use pallet_balances::Call as BalancesCall; +#[cfg(any(feature = "std", test))] +pub use frame_system::Call as SystemCall; +#[cfg(any(feature = "std", test))] +pub use pallet_timestamp::Call as TimestampCall; pub use sp_runtime::{Permill, Perbill, Percent, ModuleId}; -pub use pallet_timestamp::Call as TimestampCall; -pub use pallet_balances::Call as BalancesCall; pub use frame_support::{ construct_runtime, parameter_types, StorageValue, ConsensusEngineId, traits::{OnUnbalanced, ChangeMembers, KeyOwnerProofSystem, Randomness, StorageMapShim, Currency, Imbalance, @@ -57,23 +74,25 @@ pub use frame_support::{ }, }; -pub use primitives::{ +pub use uniarts_primitives::{ BlockNumber, Signature, AccountId, AccountIndex, Balance, Index, Hash, DigestItem, - TokenSymbol, CurrencyId, Amount, + TokenSymbol, CurrencyId, Amount, Header, }; -/// Import pallets. +/// Import configs. // pub use pallet_certificate; -pub use pallet_nft_multi; -pub use pallet_nicks; -pub use pallet_rewards; pub use pallet_staking; pub use pallet_validator_set; -pub use pallet_token; -pub use pallet_trade; pub use uniarts_common::*; -// pub use pallet_lotteries; -pub use pallet_contracts::Gas; + +/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers. +/// This is used to limit the maximal weight of a single extrinsic. +const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used +/// by Operational extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +/// We allow for 2 seconds of compute with a 6 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know /// the specifics of the runtime. They can then be made to be agnostic over specific formats @@ -106,18 +125,9 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 43, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, }; -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -158,899 +168,71 @@ parameter_types! { pub const Version: RuntimeVersion = VERSION; } -// Configure FRAME pallets to include in runtime. - -impl frame_system::Trait for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = (); - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type Event = Event; - /// The ubiquitous origin type. - type Origin = Origin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Maximum weight of each block. - type MaximumBlockWeight = MaximumBlockWeight; - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The weight of the overhead invoked on the block import process, independent of the - /// extrinsics included in that block. - type BlockExecutionWeight = BlockExecutionWeight; - /// The base weight of any extrinsic processed by the runtime, independent of the - /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) - type ExtrinsicBaseWeight = ExtrinsicBaseWeight; - /// The maximum weight that a single extrinsic of `Normal` dispatch class can have, - /// idependent of the logic of that extrinsics. (Roughly max block weight - average on - /// initialize cost). - type MaximumExtrinsicWeight = MaximumExtrinsicWeight; - /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. - type MaximumBlockLength = MaximumBlockLength; - /// Portion of the block weight that is available to all normal transactions. - type AvailableBlockRatio = AvailableBlockRatio; - /// Version of the runtime. - type Version = Version; - - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); -} - -parameter_types! { - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); - pub const ValidatorMortgageLimit: Balance = 10_000 * UART; -} - -impl pallet_validator_set::Trait for Runtime { - type Event = Event; - type Currency = Uart; - type ValidatorMortgageLimit = ValidatorMortgageLimit; -} - -pub struct ValidatorIdOf; -impl Convert> for ValidatorIdOf { - fn convert(a: T) -> Option { - Some(a) - } -} - -impl pallet_session::Trait for Runtime { - type Event = Event; - type ValidatorId = AccountId; - type ValidatorIdOf = ValidatorIdOf; - type ShouldEndSession = ValidatorSet; - type NextSessionRotation = ValidatorSet; - type SessionManager = ValidatorSet; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = opaque::SessionKeys; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; - type WeightInfo = weights::pallet_session::WeightInfo; -} - -impl pallet_aura::Trait for Runtime { - type AuthorityId = AuraId; -} - -impl pallet_grandpa::Trait for Runtime { - type Event = Event; - type Call = Call; - - type KeyOwnerProofSystem = (); - - type KeyOwnerProof = - >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; - - type HandleEquivocation = (); - - type WeightInfo = (); -} - -parameter_types! { - pub const MiningRewardPerBlock: Balance = 8 * UART; - pub const RewardThreshold: Balance = 30 * (BlocksPerDay::get() as Balance) * MiningRewardPerBlock::get(); - pub const StakingRewardPerBlock: Balance = 1 * UART; - pub const AmpFactor: Balance = 1e12 as Balance; - pub const BlocksPerYear: u32 = 365 * BlocksPerDay::get(); - pub const MiningCap: Balance = 150_000_000 * UART; -} - -pub struct AccountIdOf; -impl Convert> for AccountIdOf { - fn convert(a: T) -> Option { - Some(a) - } -} - -pub struct ConvertNumberToBalance; -impl> Convert for ConvertNumberToBalance { - fn convert(a: BlockNumber) -> Balance { - Balance::saturated_from::(a) - } -} - - -impl pallet_rewards::Trait for Runtime { - type AccountIdOf = AccountIdOf; - type Balance = Balance; - type Currency = Uart; - type RewardThreshold = RewardThreshold; - type RewardPerBlock = MiningRewardPerBlock; - type BlocksPerYear = BlocksPerYear; - type MiningCap = MiningCap; - type Event = Event; - type WeightInfo = weights::pallet_rewards::WeightInfo; -} - - - -impl pallet_staking::Trait for Runtime { - type ModuleId = StakingModuleId; - type Event = Event; - type Currency = Uart; - type RewardPerBlock = StakingRewardPerBlock; - type Id = u32; - type AmpFactor = AmpFactor; - type ConvertNumberToBalance = ConvertNumberToBalance; - type WeightInfo = (); -} - -parameter_types! { - pub const MinVestedTransfer: Balance = 100 * DOLLARS; -} - -impl pallet_vesting::Trait for Runtime { - type Event = Event; - type Currency = Uart; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Trait for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - // For weight estimation, we assume that the most locks on an individual account will be 50. - // This number may need to be adjusted in the future if this assumption no longer holds true. - pub const MaxLocks: u32 = 50; -} - -impl pallet_balances::Trait for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type MaxLocks = MaxLocks; - type WeightInfo = weights::pallet_balances::WeightInfo; -} - -// impl pallet_balances::Trait for Runtime { -// /// The type for recording an account's balance. -// type Balance = Balance; -// /// The ubiquitous event type. -// type Event = Event; -// type DustRemoval = (); -// type ExistentialDeposit = ExistentialDeposit; -// type AccountStore = System; -// type WeightInfo = (); -// } - -parameter_types! { - pub const UncleGenerations: BlockNumber = 0; -} - -impl pallet_authorship::Trait for Runtime { - type FindAuthor = AuraAccountAdapter; - type UncleGenerations = UncleGenerations; - type FilterUncle = (); - type EventHandler = (); -} - -pub struct AuraAccountAdapter; - -impl FindAuthor for AuraAccountAdapter { - fn find_author<'a, I>(digests: I) -> Option - where I: 'a + IntoIterator - { - if let Some(index) = pallet_aura::Module::::find_author(digests) { - let validator = pallet_session::Module::::validators()[index as usize].clone(); - Some(validator) - } - else { - None - } - } -} - -pub struct DealWithFees; - -impl OnUnbalanced> for DealWithFees { - fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { - if let Some(fees) = fees_then_tips.next() { - // for fees, 90% to treasury, 10% to author - let mut split = fees.ration(90, 10); - if let Some(tips) = fees_then_tips.next() { - // for tips, if any, 90% to treasury, 10% to author (though this can be anything) - tips.ration_merge_into(90, 10, &mut split); - } - Treasury::on_unbalanced(split.0); - Author::on_unbalanced(split.1); - } - } -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1 * MICRO; -} - -impl pallet_transaction_payment::Trait for Runtime { - type Currency = Uart; - type OnTransactionPayment = DealWithFees; - type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; - type FeeMultiplierUpdate = (); -} - -parameter_types! { - // Choose a fee that incentivizes desireable behavior. - pub const NickReservationFee: u128 = 100; - pub const MinNickLength: usize = 6; - // Maximum bounds on storage are important to secure your chain. - pub const MaxNickLength: usize = 32; -} - -impl pallet_nicks::Trait for Runtime { - /// The Balances pallet implements the ReservableCurrency trait. - type Currency = Uart; - /// Use the NickReservationFee from the parameter_types block. - type ReservationFee = NickReservationFee; - /// No action is taken when deposits are forfeited. - type Slashed = Treasury; - /// Configure the FRAME System Root origin as the Nick pallet admin. - type ForceOrigin = frame_system::EnsureRoot; - /// Use the MinNickLength from the parameter_types block. - type MinLength = MinNickLength; - /// Use the MaxNickLength from the parameter_types block. - type MaxLength = MaxNickLength; - /// The ubiquitous event type. - type Event = Event; -} - -impl pallet_sudo::Trait for Runtime { - type Event = Event; - type Call = Call; -} +// Configure FRAME configs to include in runtime. +// In config mod -impl orml_tokens::Trait for Runtime { - type Event = Event; - type Balance = Balance; - type Amount = Amount; - type CurrencyId = CurrencyId; - type OnReceived = (); - type WeightInfo = (); -} - -parameter_types! { - pub const GetNativeCurrencyId: CurrencyId = CurrencyId::Native; -} - -impl orml_currencies::Trait for Runtime { - type Event = Event; - type MultiCurrency = UniTokens; - type NativeCurrency = BasicCurrencyAdapter; - type GetNativeCurrencyId = GetNativeCurrencyId; - type WeightInfo = (); -} - -// impl pallet_certificate::Trait for Runtime { -// type Event = Event; -// type WorkId = u32; -// } - -impl pallet_token::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const PriceFactor: u128 = 100_000_000; - pub const BlocksPerDay: u32 = 6 * 60 * 24; - pub const OpenedOrdersArrayCap: u8 = 20; - pub const ClosedOrdersArrayCap: u8 = 100; -} - -impl pallet_trade::Trait for Runtime { - type Event = Event; - type Price = u128; - type PriceFactor = PriceFactor; - type BlocksPerDay = BlocksPerDay; - type OpenedOrdersArrayCap = OpenedOrdersArrayCap; - type ClosedOrdersArrayCap = ClosedOrdersArrayCap; -} - -impl pallet_names::Trait for Runtime { - type Name = Vec; - type Value = Vec; - type Currency = Uart; - type Event = Event; - - fn get_name_fee(op: &pallet_names::Operation) -> Option { - /* Single-letter names are not allowed (nor the empty name). Everything - else is fine. */ - if op.name.len() < 2 { - return None - } - - Some(match op.operation { - pallet_names::OperationType::Registration => 1000, - pallet_names::OperationType::Update => 100, - }) - } - - fn get_expiration(op: &pallet_names::Operation) -> Option { - /* Short names (up to three characters) will expire after 10 blocks. - Longer names will stick around forever. */ - if op.name.len() <= 3 { - Some(10) - } else { - None - } - } - - fn deposit_fee(_b: >::NegativeImbalance) { - /* Just burn the name fee by dropping the imbalance. */ - } - -} - -/// Used for the module nft-multi in `./nft-multi.rs` -impl pallet_nft_multi::Trait for Runtime { - type ModuleId = UniArtsNftModuleId; - type MultiCurrency = Currencies; - type Event = Event; - type WeightInfo = (); -} - -impl pallet_nft_blindbox::Trait for Runtime { - type LockModuleId = UniArtsBlindBoxModuleId; - type NftHandler = Nft; - type Event = Event; - type Randomness = RandomnessCollectiveFlip; - type WeightInfo = (); -} - -parameter_types! { - pub const CandidateDeposit: Balance = 10 * UART; - pub const WrongSideDeduction: Balance = 2 * UART; - pub const MaxStrikes: u32 = 10; - pub const RotationPeriod: BlockNumber = 80 * HOURS; - pub const PeriodSpend: Balance = 500 * UART; - pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; - pub const ChallengePeriod: BlockNumber = 7 * DAYS; -} - -impl pallet_society::Trait for Runtime { - type Event = Event; - type ModuleId = SocietyModuleId; - type Currency = Uart; - type Randomness = RandomnessCollectiveFlip; - type CandidateDeposit = CandidateDeposit; - type WrongSideDeduction = WrongSideDeduction; - type MaxStrikes = MaxStrikes; - type PeriodSpend = PeriodSpend; - type MembershipChanged = (); - type RotationPeriod = RotationPeriod; - type MaxLockDuration = MaxLockDuration; - type FounderSetOrigin = EnsureRootOrMoreThanHalfCouncil; - type SuspensionJudgementOrigin = pallet_society::EnsureFounder; - type ChallengePeriod = ChallengePeriod; -} - -// Uni-Art Treasury -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 3 * DAYS; - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; - pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; -} - -type CouncilInstance = pallet_collective::Instance0; -impl pallet_collective::Trait for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; -} - -type TechnicalCollective = pallet_collective::Instance1; -impl pallet_collective::Trait for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = TechnicalMaxProposals; - type MaxMembers = TechnicalMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; -} - -type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< - AccountId, - EnsureRoot, - pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilInstance>, ->; - -pub struct MembershipChangedGroup; -impl ChangeMembers for MembershipChangedGroup { - fn change_members_sorted( - incoming: &[AccountId], - outgoing: &[AccountId], - sorted_new: &[AccountId], - ) { - TechnicalCommittee::change_members_sorted(incoming, outgoing, sorted_new); - } -} - -type CouncilMembershipInstance = pallet_membership::Instance0; -impl pallet_membership::Trait for Runtime { - type Event = Event; - type AddOrigin = EnsureRootOrMoreThanHalfCouncil; - type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; - type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; - type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; - type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; - type MembershipInitialized = Council; - type MembershipChanged = Council; -} - -type TechnicalCommitteeMembershipInstance = pallet_membership::Instance1; -impl pallet_membership::Trait for Runtime { - type Event = Event; - type AddOrigin = EnsureRootOrMoreThanHalfCouncil; - type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; - type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; - type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; - type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = MembershipChangedGroup; -} - -parameter_types! { - pub const CandidacyBond: Balance = 10 * UART; - pub const VotingBond: Balance = 1 * UART; - pub const TermDuration: BlockNumber = 24 * HOURS; - pub const DesiredMembers: u32 = 13; - pub const DesiredRunnersUp: u32 = 7; -} - -impl pallet_elections_phragmen::Trait for Runtime { - type ModuleId = ElectionsPhragmenModuleId; - type Event = Event; - type Currency = Uart; - type CurrencyToVote = uniarts_common::currency::CurrencyToVoteHandler; - type ChangeMembers = Council; - type InitializeMembers = Council; - type CandidacyBond = CandidacyBond; - type VotingBond = VotingBond; - type TermDuration = TermDuration; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type BadReport = Treasury; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; -} - -// Uni-Art Treasury -type ApproveOrigin = EnsureOneOf< - AccountId, - EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilInstance>, ->; - -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 1 * UART; - pub const SpendPeriod: BlockNumber = 1 * DAYS; - pub const Burn: Permill = Permill::from_percent(0); - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(10); - pub const TipReportDepositBase: Balance = 1 * UART; - pub const SevenDays: BlockNumber = 7 * DAYS; - pub const ZeroDay: BlockNumber = 0; - pub const OneDay: BlockNumber = DAYS; - pub const DataDepositPerByte: Balance = 1 * MILLI; - pub const BountyDepositBase: Balance = 1 * UART; - pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); - pub const BountyValueMinimum: Balance = 10 * UART; - pub const MaximumReasonLength: u32 = 16384; -} - -impl pallet_treasury::Trait for Runtime { - type ModuleId = UniArtsTreasuryModuleId; - type Currency = Uart; - type ApproveOrigin = ApproveOrigin; - type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; - type Tippers = ElectionsPhragmen; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type Event = Event; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = Society; - type DataDepositPerByte = DataDepositPerByte; - type OnSlash = Treasury; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type BountyCuratorDeposit = BountyCuratorDeposit; - type BountyValueMinimum = BountyValueMinimum; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_treasury::WeightInfo; -} - -parameter_types! { - pub const BasicDeposit: Balance = 10 * UART; // 258 bytes on-chain - pub const FieldDeposit: Balance = 250 * MICRO; // 66 bytes on-chain - pub const SubAccountDeposit: Balance = 2 * UART; // 53 bytes on-chain - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; -} -impl pallet_identity::Trait for Runtime { - type Event = Event; - type Currency = Uart; - type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EnsureRootOrMoreThanHalfCouncil; - type RegistrarOrigin = EnsureRootOrMoreThanHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; -} - -parameter_types! { - pub const MaxScheduledPerBlock: u32 = 50; -} -impl pallet_scheduler::Trait for Runtime { - type Event = Event; - type Origin = Origin; - type PalletsOrigin = OriginCaller; - type Call = Call; - type MaximumWeight = MaximumBlockWeight; - type ScheduleOrigin = EnsureRoot; - type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; -} - -parameter_types! { - pub const TombstoneDeposit: Balance = 1 * UART; - pub const RentByteFee: Balance = 1 * MILLI; - pub const RentDepositOffset: Balance = 100 * UART; - pub const SurchargeReward: Balance = 150 * UART; -} - -impl pallet_contracts::Trait for Runtime { - type Time = Timestamp; - type Randomness = RandomnessCollectiveFlip; - type Currency = Uart; - type Event = Event; - type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer; - type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter; - type RentPayment = (); - type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap; - type TombstoneDeposit = TombstoneDeposit; - type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset; - type RentByteFee = RentByteFee; - type RentDepositOffset = RentDepositOffset; - type SurchargeReward = SurchargeReward; - type MaxDepth = pallet_contracts::DefaultMaxDepth; - type MaxValueSize = pallet_contracts::DefaultMaxValueSize; - type WeightPrice = pallet_transaction_payment::Module; -} - -/// The type used to represent the kinds of proxying allowed. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] -pub enum ProxyType { - Any, - NonTransfer, - Governance, - Staking, - IdentityJudgement, -} -impl Default for ProxyType { - fn default() -> Self { - Self::Any - } -} - -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => matches!( - c, - Call::System(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim(..)) | - Call::Indices(pallet_indices::Call::free(..)) | - Call::Indices(pallet_indices::Call::freeze(..)) | - // Specifically omitting the entire Balances pallet - Call::Recovery(pallet_recovery::Call::as_recovered(..)) | - Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | - Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | - Call::Recovery(pallet_recovery::Call::close_recovery(..)) | - Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | - Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | - Call::Authorship(..) | - Call::Staking(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::Utility(..) | - Call::Society(..) | - Call::Council(..) | - Call::CouncilMembership(..) | - Call::TechnicalCommittee(..) | - Call::TechnicalMembership(..) | - Call::ElectionsPhragmen(..) | - Call::Treasury(..) | - Call::Identity(..) | - Call::Scheduler(..) | - Call::Proxy(..) | - Call::Multisig(..) | - Call::Nicks(..) | - Call::Nft(..) | - Call::BlindBox(..) | - Call::Token(..) | - Call::Trade(..) | - Call::Contracts(..) - ), - ProxyType::Governance => matches!( - c, - Call::Council(..) | - Call::Treasury(..) | - Call::TechnicalCommittee(..) | - Call::ElectionsPhragmen(..) | - Call::Utility(..) - ), - ProxyType::Staking => matches!(c, Call::Staking(..)), - ProxyType::IdentityJudgement => matches!( - c, - Call::Identity(pallet_identity::Call::provide_judgement(..)) - ) - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } -} - -parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const MaxProxies: u16 = 32; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); - pub const MaxPending: u16 = 32; -} - -impl pallet_proxy::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Uart; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; - type WeightInfo = weights::pallet_proxy::WeightInfo; -} - -impl pallet_utility::Trait for Runtime { - type Event = Event; - type Call = Call; - type WeightInfo = weights::pallet_utility::WeightInfo; -} - -parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); - pub const MaxSignatories: u16 = 100; -} - -impl pallet_multisig::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Uart; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; -} - -parameter_types! { - pub const IndexDeposit: Balance = 1 * UART; -} -impl pallet_indices::Trait for Runtime { - type AccountIndex = AccountIndex; - type Currency = Uart; - type Deposit = IndexDeposit; - type Event = Event; - type WeightInfo = weights::pallet_indices::WeightInfo; -} - -parameter_types! { - pub const ConfigDepositBase: Balance = 10 * MILLI; - pub const FriendDepositFactor: Balance = MILLI; - pub const MaxFriends: u16 = 9; - pub const RecoveryDeposit: Balance = 10 * MILLI; -} - -impl pallet_recovery::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Uart; - type ConfigDepositBase = ConfigDepositBase; - type FriendDepositFactor = FriendDepositFactor; - type MaxFriends = MaxFriends; - type RecoveryDeposit = RecoveryDeposit; -} - -parameter_types! { - pub const GetBridgeCurrencyId: CurrencyId = CurrencyId::Token(TokenSymbol::USDT); -} - -impl pallet_bridge::Trait for Runtime { - type Event = Event; - type Currency = Currencies; - type GetBridgeCurrencyId = GetBridgeCurrencyId; -} - -// parameter_types! { -// pub const TicketPrice: Balance = 10 * UART; -// pub const LuckyPeriod: BlockNumber = 1200; -// } -// -// impl pallet_lotteries::Trait for Runtime { -// type Event = Event; -// type Call = Call; -// type ModuleId = LotteryModuleId; -// type Currency = Uart; -// type LotteryDrawOrigin = EnsureRootOrMoreThanHalfCouncil; -// type TicketPrice = TicketPrice; -// type LuckyPeriod = LuckyPeriod; -// type Randomness = RandomnessCollectiveFlip; -// } - -// Create the runtime by composing the FRAME pallets that were previously configured. +// Create the runtime by composing the FRAME configs that were previously configured. construct_runtime!( pub enum Runtime where Block = Block, NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Module, Call, Config, Storage, Event}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, - Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Indices: pallet_indices::{Module, Call, Storage, Config, Event}, - - Authorship: pallet_authorship::{Module, Call, Storage}, - Session: pallet_session::{Module, Call, Storage, Event, Config}, - ValidatorSet: pallet_validator_set::{Module, Call, Storage, Event, Config}, - Aura: pallet_aura::{Module, Config, Inherent}, - Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event}, - Rewards: pallet_rewards::{Module, Call, Storage, Event}, - Staking: pallet_staking::{Module, Call, Storage, Event}, - Vesting: pallet_vesting::{Module, Call, Storage, Event, Config}, - - Nicks: pallet_nicks::{Module, Call, Storage, Event}, - Balances: pallet_balances::{Module, Call, Storage, Config, Event}, - Contracts: pallet_contracts::{Module, Call, Storage, Event, Config}, + System: frame_system::{Module, Call, Config, Storage, Event} = 0, + Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 1, + // System scheduler. + Scheduler: pallet_scheduler::{Module, Call, Storage, Event} = 2, + Utility: pallet_utility::{Module, Call, Event} = 3, + Multisig: pallet_multisig::{Module, Call, Storage, Event} =4, + Proxy: pallet_proxy::{Module, Call, Storage, Event} = 5, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage} = 6, + Balances: pallet_balances::{Module, Call, Storage, Config, Event} = 7, + + Indices: pallet_indices::{Module, Call, Storage, Config, Event} = 10, + Authorship: pallet_authorship::{Module, Call, Storage} = 11, + Session: pallet_session::{Module, Call, Storage, Event, Config} = 12, + ValidatorSet: pallet_validator_set::{Module, Call, Storage, Event, Config} = 13, + Aura: pallet_aura::{Module, Config} = 14, + Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event} = 15, + Rewards: pallet_rewards::{Module, Call, Storage, Event} = 16, + Staking: pallet_staking::{Module, Call, Storage, Event} = 17, + Vesting: pallet_vesting::{Module, Call, Storage, Event, Config} = 18, + + Nicks: pallet_nicks::{Module, Call, Storage, Event} = 21, + Contracts: pallet_contracts::{Module, Call, Storage, Config, Event} = 22, // Lotteries: pallet_lotteries::{Module, Call, Storage, Event}, // Uart: pallet_balances::::{Module, Call, Storage, Config, Event}, // Orml - Currencies: orml_currencies::{Module, Call, Event}, - UniTokens: orml_tokens::{Module, Storage, Event, Config}, + Currencies: orml_currencies::{Module, Call, Event} = 31, + UniTokens: orml_tokens::{Module, Storage, Event, Config} = 32, // Governance - Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config}, - CouncilMembership: pallet_membership::::{Module, Call, Storage, Event, Config}, - Treasury: pallet_treasury::{Module, Call, Storage, Config, Event}, - TechnicalCommittee: pallet_collective::::{Module, Call, Storage, Origin, Config, Event}, - TechnicalMembership: pallet_membership::::{Module, Call, Storage, Config, Event}, - Identity: pallet_identity::{Module, Call, Storage, Event}, - ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event}, + Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config} = 41, + CouncilMembership: pallet_membership::::{Module, Call, Storage, Event, Config} = 42, + Treasury: pallet_treasury::{Module, Call, Storage, Config, Event} = 43, + Bounties: pallet_bounties::{Module, Call, Storage, Event} = 44, + TechnicalCommittee: pallet_collective::::{Module, Call, Storage, Origin, Config, Event} = 45, + TechnicalMembership: pallet_membership::::{Module, Call, Storage, Config, Event} = 46, + Identity: pallet_identity::{Module, Call, Storage, Event} = 47, + ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event} = 48, // Society module. - Society: pallet_society::{Module, Call, Storage, Event}, + Society: pallet_society::{Module, Call, Storage, Event} = 49, - // System scheduler. - Scheduler: pallet_scheduler::{Module, Call, Storage, Event}, - TransactionPayment: pallet_transaction_payment::{Module, Storage}, - Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, + TransactionPayment: pallet_transaction_payment::{Module, Storage} = 51, + Sudo: pallet_sudo::{Module, Call, Config, Storage, Event} = 52, + Recovery: pallet_recovery::{Module, Call, Storage, Event} = 53, - Names: pallet_names::{Module, Call, Storage, Event}, - Nft: pallet_nft_multi::{Module, Call, Storage, Event}, - BlindBox: pallet_nft_blindbox::{Module, Call, Storage, Event}, - Token: pallet_token::{Module, Call, Storage, Event}, - Trade: pallet_trade::{Module, Call, Storage, Event}, - Bridge: pallet_bridge::{Module, Call, Storage, Event, Config}, - Utility: pallet_utility::{Module, Call, Event}, - Proxy: pallet_proxy::{Module, Call, Storage, Event}, - Multisig: pallet_multisig::{Module, Call, Storage, Event}, - Recovery: pallet_recovery::{Module, Call, Storage, Event}, + Names: pallet_names::{Module, Call, Storage, Event} = 61, + Assets: pallet_assets::{Module, Call, Storage, Event} = 62, + Nft: pallet_nft_multi::{Module, Call, Storage, Event} = 63, + BlindBox: pallet_nft_blindbox::{Module, Call, Storage, Event} = 64, + Bridge: pallet_bridge::{Module, Call, Storage, Event, Config} = 65, } ); /// The address format for describing accounts. -pub type Address = AccountId; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; +pub type Address = sp_runtime::MultiAddress; /// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification @@ -1110,14 +292,11 @@ impl_runtime_apis! { Executive::finalize_block() } - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + fn inherent_extrinsics(data: InherentData) -> Vec<::Extrinsic> { data.create_extrinsics() } - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { + fn check_inherents(block: Block, data: InherentData) -> CheckInherentsResult { data.check_extrinsics(&block) } @@ -1195,48 +374,44 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_info(uxt, len) } + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } } - impl pallet_contracts_rpc_runtime_api::ContractsApi for Runtime { - fn call( - origin: AccountId, - dest: AccountId, - value: Balance, - gas_limit: u64, - input_data: Vec, - ) -> ContractExecResult { - let (exec_result, gas_consumed) = - Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data); - match exec_result { - Ok(v) => ContractExecResult::Success { - flags: v.flags.bits(), - data: v.data, - gas_consumed: gas_consumed, - }, - Err(_) => ContractExecResult::Error, - } - } + impl pallet_contracts_rpc_runtime_api::ContractsApi + for Runtime + { + fn call( + origin: AccountId, + dest: AccountId, + value: Balance, + gas_limit: u64, + input_data: Vec, + ) -> pallet_contracts_primitives::ContractExecResult { + Contracts::bare_call(origin, dest, value, gas_limit, input_data) + } - fn get_storage( - address: AccountId, - key: [u8; 32], - ) -> pallet_contracts_primitives::GetStorageResult { - Contracts::get_storage(address, key) - } + fn get_storage( + address: AccountId, + key: [u8; 32], + ) -> pallet_contracts_primitives::GetStorageResult { + Contracts::get_storage(address, key) + } - fn rent_projection( - address: AccountId, - ) -> pallet_contracts_primitives::RentProjectionResult { - Contracts::rent_projection(address) - } - } + fn rent_projection( + address: AccountId, + ) -> pallet_contracts_primitives::RentProjectionResult { + Contracts::rent_projection(address) + } + } impl pallet_staking_rpc_runtime_api::StakingApi for Runtime { fn staking_module_account_id() -> AccountId { @@ -1260,7 +435,7 @@ impl_runtime_apis! { use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; use frame_system_benchmarking::Module as SystemBench; - impl frame_system_benchmarking::Trait for Runtime {} + impl frame_system_benchmarking::Config for Runtime {} let whitelist: Vec = vec![ // Block Number diff --git a/runtime/fuxi/src/weights/frame_system.rs b/runtime/fuxi/src/weights/frame_system.rs new file mode 100644 index 0000000..6848989 --- /dev/null +++ b/runtime/fuxi/src/weights/frame_system.rs @@ -0,0 +1,38 @@ +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + fn remark(_b: u32) -> Weight { + (1_815_000 as Weight) + } + fn set_heap_pages() -> Weight { + (2_463_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn set_changes_trie_config() -> Weight { + (11_280_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn set_storage(i: u32) -> Weight { + (0 as Weight) + .saturating_add((821_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + fn kill_storage(i: u32) -> Weight { + (0 as Weight) + .saturating_add((549_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + fn kill_prefix(p: u32) -> Weight { + (0 as Weight) + .saturating_add((872_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + } + fn suicide() -> Weight { + (37_209_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + } +} \ No newline at end of file diff --git a/runtime/fuxi/src/weights/mod.rs b/runtime/fuxi/src/weights/mod.rs index c0bdc50..0a19864 100644 --- a/runtime/fuxi/src/weights/mod.rs +++ b/runtime/fuxi/src/weights/mod.rs @@ -1,3 +1,4 @@ +pub mod frame_system; pub mod pallet_scheduler; pub mod pallet_multisig; pub mod pallet_proxy; @@ -10,4 +11,5 @@ pub mod pallet_balances; pub mod pallet_elections_phragmen; pub mod pallet_treasury; pub mod pallet_identity; -pub mod pallet_rewards; \ No newline at end of file +pub mod pallet_rewards; +pub mod orml_tokens; \ No newline at end of file diff --git a/runtime/fuxi/src/weights/orml_tokens.rs b/runtime/fuxi/src/weights/orml_tokens.rs new file mode 100644 index 0000000..da62f40 --- /dev/null +++ b/runtime/fuxi/src/weights/orml_tokens.rs @@ -0,0 +1,20 @@ +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for orml_tokens. +pub struct WeightInfo(PhantomData); +impl orml_tokens::WeightInfo for WeightInfo { + fn transfer() -> Weight { + (65_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } + fn transfer_all() -> Weight { + (67_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } +} \ No newline at end of file diff --git a/runtime/fuxi/src/weights/pallet_balances.rs b/runtime/fuxi/src/weights/pallet_balances.rs index 364edb2..5e21f94 100644 --- a/runtime/fuxi/src/weights/pallet_balances.rs +++ b/runtime/fuxi/src/weights/pallet_balances.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_balances::WeightInfo for WeightInfo { +impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { (90_276_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_collective.rs b/runtime/fuxi/src/weights/pallet_collective.rs index 9410855..4a1b5f6 100644 --- a/runtime/fuxi/src/weights/pallet_collective.rs +++ b/runtime/fuxi/src/weights/pallet_collective.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { +impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32) -> Weight { (0 as Weight) .saturating_add((20_311_000 as Weight).saturating_mul(m as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_elections_phragmen.rs b/runtime/fuxi/src/weights/pallet_elections_phragmen.rs index d48470d..af81678 100644 --- a/runtime/fuxi/src/weights/pallet_elections_phragmen.rs +++ b/runtime/fuxi/src/weights/pallet_elections_phragmen.rs @@ -9,66 +9,74 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_elections_phragmen::WeightInfo for WeightInfo { - fn vote(v: u32) -> Weight { - (82_513_000 as Weight) - .saturating_add((120_000 as Weight).saturating_mul(v as Weight)) +impl pallet_elections_phragmen::WeightInfo for WeightInfo { + fn vote_equal(v: u32) -> Weight { + (54_923_000 as Weight) + .saturating_add((324_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn vote_update(v: u32) -> Weight { - (51_149_000 as Weight) - .saturating_add((102_000 as Weight).saturating_mul(v as Weight)) + fn vote_more(v: u32) -> Weight { + (83_389_000 as Weight) + .saturating_add((341_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn remove_voter() -> Weight { - (67_398_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + fn vote_less(v: u32) -> Weight { + (78_865_000 as Weight) + .saturating_add((343_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn report_defunct_voter_correct(c: u32, v: u32) -> Weight { - (0 as Weight) - .saturating_add((1_676_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((33_438_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn report_defunct_voter_incorrect(c: u32, v: u32) -> Weight { - (0 as Weight) - .saturating_add((1_678_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((33_333_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) + fn remove_voter() -> Weight { + (72_370_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn submit_candidacy(c: u32) -> Weight { - (67_154_000 as Weight) - .saturating_add((273_000 as Weight).saturating_mul(c as Weight)) + (68_455_000 as Weight) + .saturating_add((370_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_candidate(c: u32) -> Weight { - (40_784_000 as Weight) - .saturating_add((141_000 as Weight).saturating_mul(c as Weight)) + (54_009_000 as Weight) + .saturating_add((200_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_members() -> Weight { - (73_194_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (84_797_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn renounce_candidacy_runners_up() -> Weight { - (44_186_000 as Weight) + (59_095_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn remove_member_with_replacement() -> Weight { - (110_232_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + (132_820_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn remove_member_wrong_refund() -> Weight { - (8_411_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) + (8_551_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) + } + fn clean_defunct_voters(v: u32, _d: u32) -> Weight { + (0 as Weight) + .saturating_add((151_754_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) + } + fn election_phragmen(c: u32, v: u32, e: u32) -> Weight { + (0 as Weight) + .saturating_add((134_602_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((111_037_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((7_150_000 as Weight).saturating_mul(e as Weight)) + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) } } \ No newline at end of file diff --git a/runtime/fuxi/src/weights/pallet_identity.rs b/runtime/fuxi/src/weights/pallet_identity.rs index b4b097c..ee1409e 100644 --- a/runtime/fuxi/src/weights/pallet_identity.rs +++ b/runtime/fuxi/src/weights/pallet_identity.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_identity::WeightInfo for WeightInfo { +impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32) -> Weight { (26_389_000 as Weight) .saturating_add((287_000 as Weight).saturating_mul(r as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_indices.rs b/runtime/fuxi/src/weights/pallet_indices.rs index b8a46dd..54e2b15 100644 --- a/runtime/fuxi/src/weights/pallet_indices.rs +++ b/runtime/fuxi/src/weights/pallet_indices.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_indices::WeightInfo for WeightInfo { +impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { (50_405_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_multisig.rs b/runtime/fuxi/src/weights/pallet_multisig.rs index e6cb87a..9724305 100644 --- a/runtime/fuxi/src/weights/pallet_multisig.rs +++ b/runtime/fuxi/src/weights/pallet_multisig.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { +impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(z: u32) -> Weight { (12_114_000 as Weight).saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } diff --git a/runtime/fuxi/src/weights/pallet_proxy.rs b/runtime/fuxi/src/weights/pallet_proxy.rs index dcd23b8..6778aea 100644 --- a/runtime/fuxi/src/weights/pallet_proxy.rs +++ b/runtime/fuxi/src/weights/pallet_proxy.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_proxy::WeightInfo for WeightInfo { +impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32) -> Weight { (29_879_000 as Weight) .saturating_add((190_000 as Weight).saturating_mul(p as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_rewards.rs b/runtime/fuxi/src/weights/pallet_rewards.rs index 1f2954c..bf687cd 100644 --- a/runtime/fuxi/src/weights/pallet_rewards.rs +++ b/runtime/fuxi/src/weights/pallet_rewards.rs @@ -7,7 +7,7 @@ use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_rewards::WeightInfo for WeightInfo { +impl pallet_rewards::WeightInfo for WeightInfo { fn claim() -> Weight { (50_000_000 as Weight) .saturating_add(DbWeight::get().reads(3 as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_scheduler.rs b/runtime/fuxi/src/weights/pallet_scheduler.rs index 847907e..efe06c3 100644 --- a/runtime/fuxi/src/weights/pallet_scheduler.rs +++ b/runtime/fuxi/src/weights/pallet_scheduler.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_scheduler::WeightInfo for WeightInfo { +impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32) -> Weight { (32_493_000 as Weight) .saturating_add((49_000 as Weight).saturating_mul(s as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_session.rs b/runtime/fuxi/src/weights/pallet_session.rs index 4442690..8b6bbbc 100644 --- a/runtime/fuxi/src/weights/pallet_session.rs +++ b/runtime/fuxi/src/weights/pallet_session.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_session::WeightInfo for WeightInfo { +impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { (87_465_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) diff --git a/runtime/fuxi/src/weights/pallet_timestamp.rs b/runtime/fuxi/src/weights/pallet_timestamp.rs index e797f54..8fd4387 100644 --- a/runtime/fuxi/src/weights/pallet_timestamp.rs +++ b/runtime/fuxi/src/weights/pallet_timestamp.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_timestamp::WeightInfo for WeightInfo { +impl pallet_timestamp::WeightInfo for WeightInfo { // WARNING! Some components were not used: ["t"] fn set() -> Weight { (10_860_000 as Weight) diff --git a/runtime/fuxi/src/weights/pallet_treasury.rs b/runtime/fuxi/src/weights/pallet_treasury.rs index 5184cb2..1fd03ab 100644 --- a/runtime/fuxi/src/weights/pallet_treasury.rs +++ b/runtime/fuxi/src/weights/pallet_treasury.rs @@ -7,118 +7,28 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { +impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (79604000 as Weight) + (52_217_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (61001000 as Weight) + (83_066_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal() -> Weight { - (17835000 as Weight) + (11_351_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn report_awesome(r: u32) -> Weight { - (101602000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // WARNING! Some components were not used: ["r"] - fn retract_tip() -> Weight { - (82970000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn tip_new(r: u32, t: u32) -> Weight { - (63995000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add((153000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn tip(t: u32) -> Weight { - (46765000 as Weight) - .saturating_add((711000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn close_tip(t: u32) -> Weight { - (160874000 as Weight) - .saturating_add((379000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn propose_bounty(d: u32) -> Weight { - (86198000 as Weight) - .saturating_add((1000 as Weight).saturating_mul(d as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn approve_bounty() -> Weight { - (23063000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn propose_curator() -> Weight { - (18890000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn unassign_curator() -> Weight { - (66768000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn accept_curator() -> Weight { - (69131000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn award_bounty() -> Weight { - (48184000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn claim_bounty() -> Weight { - (243104000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn close_bounty_proposed() -> Weight { - (65917000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn close_bounty_active() -> Weight { - (157232000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn extend_bounty_expiry() -> Weight { - (46216000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } fn on_initialize_proposals(p: u32) -> Weight { - (119765000 as Weight) - .saturating_add((108368000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + (110_747_000 as Weight) + .saturating_add((69_650_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) } - fn on_initialize_bounties(b: u32) -> Weight { - (112536000 as Weight) - .saturating_add((107132000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) - } } \ No newline at end of file diff --git a/runtime/fuxi/src/weights/pallet_utility.rs b/runtime/fuxi/src/weights/pallet_utility.rs index a933621..0dd8b86 100644 --- a/runtime/fuxi/src/weights/pallet_utility.rs +++ b/runtime/fuxi/src/weights/pallet_utility.rs @@ -9,12 +9,14 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_utility::WeightInfo for WeightInfo { +impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32) -> Weight { (18_450_000 as Weight).saturating_add((1_730_000 as Weight).saturating_mul(c as Weight)) } - // WARNING! Some components were not used: ["u"] fn as_derivative() -> Weight { - (5_360_000 as Weight) + (5_548_000 as Weight) + } + fn batch_all(c: u32) -> Weight { + (19_735_000 as Weight).saturating_add((1_990_000 as Weight).saturating_mul(c as Weight)) } } \ No newline at end of file diff --git a/runtime/fuxi/types.json b/runtime/fuxi/types.json index 719f364..2f14b21 100644 --- a/runtime/fuxi/types.json +++ b/runtime/fuxi/types.json @@ -1,7 +1,14 @@ { "Keys": "SessionKeys2", - "Address": "AccountId", - "LookupSource": "AccountId", + "Address": "MultiAddress", + "LookupSource": "MultiAddress", + "AccountData": { + "free": "Balance", + "reserved": "Balance", + "misc_frozen": "Balance", + "fee_frozen": "Balance" + }, + "AccountInfo": "AccountInfoWithDualRefCount", "WorkId": "u32", "Id": "u32", "Name": "Vec", diff --git a/runtime/pangu/Cargo.toml b/runtime/pangu/Cargo.toml index 46aca06..f11d8a1 100644 --- a/runtime/pangu/Cargo.toml +++ b/runtime/pangu/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pangu-runtime" -version = "2.0.1" +version = "3.0.0" authors = ["terry.tu "] edition = "2018" build = "build.rs" @@ -11,79 +11,77 @@ description = "Uniarts node runtime for pangu network" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", optional = true, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.102", optional = true, features = ["derive"] } hex-literal = { version = "0.3.1", optional = true } -frame-system = { version = "2.0.1", default-features = false } -frame-support = { version = "2.0.1", default-features = false } -frame-executive = { version = "2.0.1", default-features = false } -frame-system-rpc-runtime-api = { version = "2.0.1", default-features = false } +frame-system = { version = "3.0.0", default-features = false } +frame-support = { version = "3.0.0", default-features = false } +frame-executive = { version = "3.0.0", default-features = false } +frame-system-rpc-runtime-api = { version = "3.0.0", default-features = false } -sp-api = { version = "2.0.1", default-features = false } -sp-block-builder = { default-features = false, version = "2.0.1"} -sp-consensus-aura = { version = "0.8.0", default-features = false } -sp-core = { version = "2.0.1", default-features = false } -sp-inherents = { default-features = false, version = "2.0.1"} -sp-offchain = { version = "2.0.1", default-features = false } -sp-runtime = { version = "2.0.1", default-features = false } -sp-session = { version = "2.0.1", default-features = false } -sp-std = { version = "2.0.1", default-features = false } -sp-transaction-pool = { version = "2.0.1", default-features = false } -sp-version = { version = "2.0.1", default-features = false } +sp-api = { version = "3.0.0", default-features = false } +sp-block-builder = { default-features = false, version = "3.0.0"} +sp-consensus-aura = { version = "0.9.0", default-features = false } +sp-core = { version = "3.0.0", default-features = false } +sp-inherents = { default-features = false, version = "3.0.0"} +sp-offchain = { version = "3.0.0", default-features = false } +sp-runtime = { version = "3.0.0", default-features = false } +sp-session = { version = "3.0.0", default-features = false } +sp-std = { version = "3.0.0", default-features = false } +sp-transaction-pool = { version = "3.0.0", default-features = false } +sp-version = { version = "3.0.0", default-features = false } -pallet-aura = { version = "2.0.1", default-features = false } -pallet-balances = { version = "2.0.1", default-features = false } -pallet-grandpa = { version = "2.0.1", default-features = false } -pallet-authorship = { version = "2.0.1", default-features = false } -pallet-randomness-collective-flip = { version = "2.0.1", default-features = false } -pallet-sudo = { version = "2.0.1", default-features = false } -pallet-timestamp = { version = "2.0.1", default-features = false } -pallet-transaction-payment = { version = "2.0.1", default-features = false } -pallet-session = { version = "2.0.1", default-features = false, features = ["historical"] } -pallet-nicks = { version = "2.0.1", default-features = false } -pallet-vesting = { version = "2.0.1", default-features = false } -pallet-collective = { version = "2.0.1", default-features = false } -pallet-membership = { version = "2.0.1", default-features = false } -pallet-treasury = { version = "2.0.1", default-features = false } -pallet-identity = { version = "2.0.1", default-features = false } -pallet-scheduler = { version = "2.0.1", default-features = false } -pallet-multisig = { version = "2.0.1", default-features = false } -pallet-proxy = { version = "2.0.1", default-features = false } -pallet-utility = { version = "2.0.1", default-features = false } -pallet-indices = { version = "2.0.1", default-features = false } -pallet-recovery = { version = "2.0.1", default-features = false } -pallet-society = { version = "2.0.1", default-features = false } -pallet-elections-phragmen = { version = "2.0.1", default-features = false } -pallet-contracts = { version = "2.0.1", default-features = false } -pallet-contracts-primitives = { version = "2.0.1", default-features = false } -pallet-contracts-rpc-runtime-api = { version = "0.8.0", default-features = false } +pallet-aura = { version = "3.0.0", default-features = false } +pallet-balances = { version = "3.0.0", default-features = false } +pallet-grandpa = { version = "3.0.0", default-features = false } +pallet-authorship = { version = "3.0.0", default-features = false } +pallet-randomness-collective-flip = { version = "3.0.0", default-features = false } +pallet-sudo = { version = "3.0.0", default-features = false } +pallet-timestamp = { version = "3.0.0", default-features = false } +pallet-transaction-payment = { version = "3.0.0", default-features = false } +pallet-session = { version = "3.0.0", default-features = false, features = ["historical"] } +pallet-nicks = { version = "3.0.0", default-features = false } +pallet-vesting = { version = "3.0.0", default-features = false } +pallet-collective = { version = "3.0.0", default-features = false } +pallet-membership = { version = "3.0.0", default-features = false } +pallet-treasury = { version = "3.0.0", default-features = false } +pallet-bounties = { version = "3.0.0", default-features = false } +pallet-identity = { version = "3.0.0", default-features = false } +pallet-scheduler = { version = "3.0.0", default-features = false } +pallet-multisig = { version = "3.0.0", default-features = false } +pallet-proxy = { version = "3.0.0", default-features = false } +pallet-utility = { version = "3.0.0", default-features = false } +pallet-indices = { version = "3.0.0", default-features = false } +pallet-recovery = { version = "3.0.0", default-features = false } +pallet-society = { version = "3.0.0", default-features = false } +pallet-elections-phragmen = { version = "3.0.0", default-features = false } +pallet-contracts = { version = "3.0.0", default-features = false } +pallet-contracts-primitives = { version = "3.0.0", default-features = false } +pallet-contracts-rpc-runtime-api = { version = "3.0.0", default-features = false } # Used for RPCs -pallet-transaction-payment-rpc-runtime-api = { version = "2.0.1", default-features = false } -pallet-staking-rpc-runtime-api = { version = "0.1.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" } +pallet-transaction-payment-rpc-runtime-api = { version = "3.0.0", default-features = false } +pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" } -# Uni-Arts pallets -uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1", default-features = false } -pallet-certificate = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-nft = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-token = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -pallet-trade = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } -# pallet-lotteries = { path = "../../pallets/lotteries", default-features = false } -primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v2.0.1" , default-features = false } +# Uni-Arts configs +uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0", default-features = false } +pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +pallet-nft = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } +# pallet-lotteries = { path = "../../configs/lotteries", default-features = false } +uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.0" , default-features = false } # Used for runtime benchmarking -frame-benchmarking = { version = "2.0.1", default-features = false, optional = true } -frame-system-benchmarking = { version = "2.0.1", default-features = false, optional = true } +frame-benchmarking = { version = "3.0.0", default-features = false, optional = true } +frame-system-benchmarking = { version = "3.0.0", default-features = false, optional = true } [build-dependencies] -wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner" } +substrate-wasm-builder = '4.0.0' [features] default = ["std"] @@ -104,6 +102,7 @@ std = [ "pallet-collective/std", "pallet-membership/std", "pallet-treasury/std", + "pallet-bounties/std", "pallet-elections-phragmen/std", "pallet-identity/std", "pallet-randomness-collective-flip/std", @@ -120,9 +119,6 @@ std = [ "pallet-names/std", "pallet-nft/std", "pallet-validator-set/std", - "pallet-token/std", - "pallet-trade/std", - "pallet-staking/std", "pallet-rewards/std", "pallet-staking-rpc-runtime-api/std", "pallet-multisig/std", @@ -143,7 +139,7 @@ std = [ "sp-std/std", "sp-transaction-pool/std", "sp-version/std", - "primitives/std", + "uniarts-primitives/std", ] runtime-benchmarks = [ diff --git a/runtime/pangu/build.rs b/runtime/pangu/build.rs index 5270504..203d775 100644 --- a/runtime/pangu/build.rs +++ b/runtime/pangu/build.rs @@ -1,10 +1,9 @@ -use wasm_builder_runner::WasmBuilder; +use substrate_wasm_builder::WasmBuilder; fn main() { WasmBuilder::new() .with_current_project() - .with_wasm_builder_from_crates("2.0.0") - .export_heap_base() .import_memory() + .export_heap_base() .build() } diff --git a/runtime/pangu/src/configs/frame_system_config.rs b/runtime/pangu/src/configs/frame_system_config.rs new file mode 100644 index 0000000..9f06435 --- /dev/null +++ b/runtime/pangu/src/configs/frame_system_config.rs @@ -0,0 +1,89 @@ +use frame_support::{weights::{constants::RocksDbWeight, DispatchClass}}; +use sp_runtime::traits::{BlakeTwo256, AccountIdLookup}; +use sp_version::RuntimeVersion; +use frame_system::{Config, limits::{BlockWeights, BlockLength} }; + +use uniarts_primitives::*; +use crate::{weights::frame_system::WeightInfo, *}; + +// pub struct BaseFilter; +// impl Filter for BaseFilter { +// fn filter(_: &Call) -> bool { +// true +// } +// } + +frame_support::parameter_types! { + pub const BlocksPerDay: u32 = 10 * 60 * 24; + pub const Version: RuntimeVersion = VERSION; + pub const SS58Prefix: u8 = 45; + pub RuntimeBlockLength: BlockLength = + BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); + pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder() + .base_block(BlockExecutionWeight::get()) + .for_class(DispatchClass::all(), |weights| { + weights.base_extrinsic = ExtrinsicBaseWeight::get(); + }) + .for_class(DispatchClass::Normal, |weights| { + weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + }) + .for_class(DispatchClass::Operational, |weights| { + weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); + // Operational transactions have some extra reserved space, so that they + // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. + weights.reserved = Some( + MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT + ); + }) + .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) + .build_or_panic(); +} + +impl Config for Runtime { + /// The basic call filter to use in dispatchable. + type BaseCallFilter = (); + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The aggregated dispatch type that is available for extrinsics. + type Call = Call; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The index type for storing how many extrinsics an account has signed. + type Index = Nonce; + /// The index type for blocks. + type BlockNumber = BlockNumber; + /// The type for hashing blocks and tries. + type Hash = Hash; + /// The hashing algorithm used. + type Hashing = BlakeTwo256; + /// The header type. + type Header = Header; + /// The ubiquitous event type. + type Event = Event; + /// The ubiquitous origin type. + type Origin = Origin; + /// Maximum number of block number to block hash mappings to keep (oldest pruned first). + type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; + /// Version of the runtime. + type Version = Version; + /// Converts a module to the index of the module in `construct_runtime!`. + /// + /// This type is being generated by `construct_runtime!`. + type PalletInfo = PalletInfo; + /// What to do if a new account is created. + type OnNewAccount = (); + /// What to do if an account is fully reaped from the system. + type OnKilledAccount = (); + /// The data to be stored in an account. + type AccountData = pallet_balances::AccountData; + /// Weight information for the extrinsics of this pallet. + type SystemWeightInfo = WeightInfo; + /// This is used as an identifier of the chain. 42 is the generic substrate prefix. + type SS58Prefix = SS58Prefix; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/mod.rs b/runtime/pangu/src/configs/mod.rs new file mode 100644 index 0000000..85a5af0 --- /dev/null +++ b/runtime/pangu/src/configs/mod.rs @@ -0,0 +1,29 @@ +pub mod frame_system_config; +pub mod pallet_contracts_config; +pub mod pallet_transaction_payment_config; +pub mod pallet_elections_phragmen_config; +pub mod pallet_treasury_config; +pub mod pallet_rewards_config; +pub mod pallet_validator_set_config; +pub mod pallet_session_config; +pub mod pallet_aura_config; +pub mod pallet_grandpa_config; +pub mod pallet_vesting_config; +pub mod pallet_timestamp_config; +pub mod pallet_authorship_config; +pub mod pallet_sudo_config; +pub mod pallet_names_config; +pub mod pallet_assets_config; +pub mod pallet_society_config; +pub mod pallet_nft_config; +pub mod pallet_scheduler_config; +pub mod pallet_collective_config; +pub mod pallet_membership_config; +pub mod pallet_identity_config; +pub mod pallet_balances_config; +pub mod pallet_bounties_config; +pub mod pallet_utility_config; +pub mod pallet_multisig_config; +pub mod pallet_indices_config; +pub mod pallet_recovery_config; +pub mod pallet_proxy_config; \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_assets_config.rs b/runtime/pangu/src/configs/pallet_assets_config.rs new file mode 100644 index 0000000..c04fbbb --- /dev/null +++ b/runtime/pangu/src/configs/pallet_assets_config.rs @@ -0,0 +1,25 @@ +use pallet_assets::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const AssetDepositBase: Balance = 100 * DOLLARS; + pub const AssetDepositPerZombie: Balance = 1 * DOLLARS; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = 10 * DOLLARS; + pub const MetadataDepositPerByte: Balance = 1 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type Balance = u64; + type AssetId = u32; + type Currency = Balances; + type ForceOrigin = EnsureRoot; + type AssetDepositBase = AssetDepositBase; + type AssetDepositPerZombie = AssetDepositPerZombie; + type StringLimit = StringLimit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type WeightInfo = pallet_assets::weights::SubstrateWeight; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_aura_config.rs b/runtime/pangu/src/configs/pallet_aura_config.rs new file mode 100644 index 0000000..0c434e8 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_aura_config.rs @@ -0,0 +1,7 @@ +use pallet_aura::Config; +use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use crate::*; + +impl Config for Runtime { + type AuthorityId = AuraId; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_authorship_config.rs b/runtime/pangu/src/configs/pallet_authorship_config.rs new file mode 100644 index 0000000..48d010c --- /dev/null +++ b/runtime/pangu/src/configs/pallet_authorship_config.rs @@ -0,0 +1,29 @@ +use pallet_authorship::Config; +use crate::*; + +pub struct AuraAccountAdapter; + +impl FindAuthor for AuraAccountAdapter { + fn find_author<'a, I>(digests: I) -> Option + where I: 'a + IntoIterator + { + if let Some(index) = pallet_aura::Module::::find_author(digests) { + let validator = pallet_session::Module::::validators()[index as usize].clone(); + Some(validator) + } + else { + None + } + } +} + +frame_support::parameter_types! { + pub const UncleGenerations: BlockNumber = 0; +} + +impl Config for Runtime { + type FindAuthor = AuraAccountAdapter; + type UncleGenerations = UncleGenerations; + type FilterUncle = (); + type EventHandler = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_balances_config.rs b/runtime/pangu/src/configs/pallet_balances_config.rs new file mode 100644 index 0000000..9245cf9 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_balances_config.rs @@ -0,0 +1,45 @@ +use pallet_balances::Config; +use uniarts_primitives::*; +use crate::*; +use crate::weights::pallet_balances::WeightInfo; + +frame_support::parameter_types! { + pub const ExistentialDeposit: u128 = 500; + // For weight estimation, we assume that the most locks on an individual account will be 50. + // This number may need to be adjusted in the future if this assumption no longer holds true. + pub const MaxLocks: u32 = 50; +} + +// type UartInstance = pallet_balances::Instance0; +pub type UinkInstance = pallet_balances::Instance1; + +impl Config for Runtime { + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type MaxLocks = MaxLocks; + type WeightInfo = WeightInfo; +} + +// type UinkAccountStore = StorageMapShim< +// pallet_balances::Account, +// frame_system::Provider, +// Balance, +// pallet_balances::AccountData +// >; + +impl Config for Runtime { + /// The type for recording an account's balance. + type Balance = Balance; + /// The ubiquitous event type. + type Event = Event; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); + type MaxLocks = MaxLocks; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_bounties_config.rs b/runtime/pangu/src/configs/pallet_bounties_config.rs new file mode 100644 index 0000000..d1ed767 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_bounties_config.rs @@ -0,0 +1,25 @@ +use pallet_bounties::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const BountyDepositBase: Balance = 1 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS; + pub const MaximumReasonLength: u32 = 16384; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 5 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type BountyCuratorDeposit = BountyCuratorDeposit; + type BountyValueMinimum = BountyValueMinimum; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_collective_config.rs b/runtime/pangu/src/configs/pallet_collective_config.rs new file mode 100644 index 0000000..daf597c --- /dev/null +++ b/runtime/pangu/src/configs/pallet_collective_config.rs @@ -0,0 +1,37 @@ +use pallet_collective::Config; +use uniarts_primitives::*; +use crate::*; +use crate::weights::pallet_collective::WeightInfo; + +frame_support::parameter_types! { + pub const CouncilMotionDuration: BlockNumber = 3 * DAYS; + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; + pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +pub type CouncilInstance = pallet_collective::Instance0; +impl Config for Runtime { + type Origin = Origin; + type Proposal = Call; + type Event = Event; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = WeightInfo; +} + +pub type TechnicalCollective = pallet_collective::Instance1; +impl Config for Runtime { + type Origin = Origin; + type Proposal = Call; + type Event = Event; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_contracts_config.rs b/runtime/pangu/src/configs/pallet_contracts_config.rs new file mode 100644 index 0000000..982f943 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_contracts_config.rs @@ -0,0 +1,60 @@ +use pallet_contracts::Config; +use pallet_contracts::weights::WeightInfo; +use sp_runtime::Perbill; +use frame_support::weights::Weight; +use uniarts_primitives::*; +pub use crate::constants::currency::*; +pub use crate::constants::time::*; +// use core::convert::TryInto; + +use crate::*; +use crate::frame_system_config::RuntimeBlockWeights; + + +frame_support::parameter_types! { + pub const TombstoneDeposit: Balance = deposit( + 1, + sp_std::mem::size_of::>() as u32 + ); + pub DepositPerContract: Balance = TombstoneDeposit::get(); + pub const DepositPerStorageByte: Balance = deposit(0, 1); + pub const DepositPerStorageItem: Balance = deposit(1, 0); + pub RentFraction: Perbill = Perbill::from_rational_approximation(1u32, 30 * DAYS); + pub const SurchargeReward: Balance = 150 * MILLI; + pub const SignedClaimHandicap: u32 = 2; + pub const MaxDepth: u32 = 32; + pub const MaxValueSize: u32 = 16 * 1024; + pub const MaxCodeSize: u32 = 60 * 1024; + // The lazy deletion runs inside on_initialize. + pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO * + RuntimeBlockWeights::get().max_block; + // The weight needed for decoding the queue should be less or equal than a fifth + // of the overall weight dedicated to the lazy deletion. + pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / ( + ::WeightInfo::on_initialize_per_queue_item(1) - + ::WeightInfo::on_initialize_per_queue_item(0) + )) / 5) as u32; +} + +impl Config for Runtime { + type Time = Timestamp; + type Randomness = RandomnessCollectiveFlip; + type Currency = Uart; + type Event = Event; + type RentPayment = (); + type SignedClaimHandicap = SignedClaimHandicap; + type TombstoneDeposit = TombstoneDeposit; + type DepositPerContract = DepositPerContract; + type DepositPerStorageByte = DepositPerStorageByte; + type DepositPerStorageItem = DepositPerStorageItem; + type RentFraction = RentFraction; + type SurchargeReward = SurchargeReward; + type MaxDepth = MaxDepth; + type MaxValueSize = MaxValueSize; + type WeightPrice = pallet_transaction_payment::Module; + type WeightInfo = pallet_contracts::weights::SubstrateWeight; + type ChainExtension = (); + type DeletionQueueDepth = DeletionQueueDepth; + type DeletionWeightLimit = DeletionWeightLimit; + type MaxCodeSize = MaxCodeSize; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_elections_phragmen_config.rs b/runtime/pangu/src/configs/pallet_elections_phragmen_config.rs new file mode 100644 index 0000000..722eb4b --- /dev/null +++ b/runtime/pangu/src/configs/pallet_elections_phragmen_config.rs @@ -0,0 +1,32 @@ +use crate::{weights::pallet_elections_phragmen::WeightInfo, *}; +use pallet_elections_phragmen::Config; +use frame_support::traits::U128CurrencyToVote; + +frame_support::parameter_types! { + pub const CandidacyBond: Balance = 10 * UART; + // 1 storage item created, key size is 32 bytes, value size is 16+16. + pub const VotingBondBase: Balance = deposit(1, 64); + // additional data per vote is 32 bytes (account id). + pub const VotingBondFactor: Balance = deposit(0, 32); + pub const TermDuration: BlockNumber = 24 * HOURS; + pub const DesiredMembers: u32 = 7; + pub const DesiredRunnersUp: u32 = 7; +} + +impl Config for Runtime { + type Event = Event; + type ModuleId = ElectionsPhragmenModuleId; + type Currency = Uart; + type ChangeMembers = Council; + type InitializeMembers = Council; + type CurrencyToVote = U128CurrencyToVote; + type CandidacyBond = CandidacyBond; + type VotingBondBase = VotingBondBase; + type VotingBondFactor = VotingBondFactor; + type LoserCandidate = Treasury; + type KickedMember = Treasury; + type DesiredMembers = DesiredMembers; + type DesiredRunnersUp = DesiredRunnersUp; + type TermDuration = TermDuration; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_grandpa_config.rs b/runtime/pangu/src/configs/pallet_grandpa_config.rs new file mode 100644 index 0000000..db452b8 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_grandpa_config.rs @@ -0,0 +1,22 @@ +use pallet_grandpa::Config; +use pallet_grandpa::{AuthorityId as GrandpaId}; +use crate::*; + +impl Config for Runtime { + type Event = Event; + type Call = Call; + + type KeyOwnerProofSystem = (); + + type KeyOwnerProof = + >::Proof; + + type KeyOwnerIdentification = >::IdentificationTuple; + + type HandleEquivocation = (); + + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_identity_config.rs b/runtime/pangu/src/configs/pallet_identity_config.rs new file mode 100644 index 0000000..15a7e1c --- /dev/null +++ b/runtime/pangu/src/configs/pallet_identity_config.rs @@ -0,0 +1,27 @@ +use pallet_identity::Config; +use uniarts_primitives::*; +use crate::*; +use super::pallet_membership_config::EnsureRootOrMoreThanHalfCouncil; + +frame_support::parameter_types! { + pub const BasicDeposit: Balance = 10 * UART; // 258 bytes on-chain + pub const FieldDeposit: Balance = 250 * MICRO; // 66 bytes on-chain + pub const SubAccountDeposit: Balance = 2 * UART; // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type MaxRegistrars = MaxRegistrars; + type Slashed = Treasury; + type ForceOrigin = EnsureRootOrMoreThanHalfCouncil; + type RegistrarOrigin = EnsureRootOrMoreThanHalfCouncil; + type WeightInfo = weights::pallet_identity::WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_indices_config.rs b/runtime/pangu/src/configs/pallet_indices_config.rs new file mode 100644 index 0000000..4f77cef --- /dev/null +++ b/runtime/pangu/src/configs/pallet_indices_config.rs @@ -0,0 +1,14 @@ +use pallet_indices::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_indices::WeightInfo, *}; + +frame_support::parameter_types! { + pub const IndexDeposit: Balance = 1 * UART; +} +impl Config for Runtime { + type AccountIndex = AccountIndex; + type Currency = Uart; + type Deposit = IndexDeposit; + type Event = Event; + type WeightInfo =WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_membership_config.rs b/runtime/pangu/src/configs/pallet_membership_config.rs new file mode 100644 index 0000000..4b7aa96 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_membership_config.rs @@ -0,0 +1,51 @@ +use pallet_membership::Config; +use uniarts_primitives::*; +use crate::*; +use super::pallet_collective_config::CouncilInstance; + +pub type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilInstance>, +>; + +pub type ApproveOrigin = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilInstance>, +>; + +pub struct MembershipChangedGroup; +impl ChangeMembers for MembershipChangedGroup { + fn change_members_sorted( + incoming: &[AccountId], + outgoing: &[AccountId], + sorted_new: &[AccountId], + ) { + TechnicalCommittee::change_members_sorted(incoming, outgoing, sorted_new); + } +} + +pub type CouncilMembershipInstance = pallet_membership::Instance0; +impl Config for Runtime { + type Event = Event; + type AddOrigin = EnsureRootOrMoreThanHalfCouncil; + type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; + type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; + type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; + type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; + type MembershipInitialized = Council; + type MembershipChanged = Council; +} + +pub type TechnicalCommitteeMembershipInstance = pallet_membership::Instance1; +impl Config for Runtime { + type Event = Event; + type AddOrigin = EnsureRootOrMoreThanHalfCouncil; + type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; + type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; + type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; + type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; + type MembershipInitialized = TechnicalCommittee; + type MembershipChanged = MembershipChangedGroup; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_multisig_config.rs b/runtime/pangu/src/configs/pallet_multisig_config.rs new file mode 100644 index 0000000..5bf4d28 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_multisig_config.rs @@ -0,0 +1,21 @@ +use pallet_multisig::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_multisig::WeightInfo, *}; + +frame_support::parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); + pub const MaxSignatories: u16 = 100; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = MaxSignatories; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_names_config.rs b/runtime/pangu/src/configs/pallet_names_config.rs new file mode 100644 index 0000000..d90d72f --- /dev/null +++ b/runtime/pangu/src/configs/pallet_names_config.rs @@ -0,0 +1,36 @@ +use pallet_names::Config; +use crate::*; + +impl Config for Runtime { + type Name = Vec; + type Value = Vec; + type Currency = Uart; + type Event = Event; + + fn get_name_fee(op: &pallet_names::Operation) -> Option { + /* Single-letter names are not allowed (nor the empty name). Everything + else is fine. */ + if op.name.len() < 2 { + return None + } + + Some(match op.operation { + pallet_names::OperationType::Registration => 1000, + pallet_names::OperationType::Update => 100, + }) + } + + fn get_expiration(op: &pallet_names::Operation) -> Option { + /* Short names (up to three characters) will expire after 10 blocks. + Longer names will stick around forever. */ + if op.name.len() <= 3 { + Some(10) + } else { + None + } + } + + fn deposit_fee(_b: >::NegativeImbalance) { + /* Just burn the name fee by dropping the imbalance. */ + } +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_nft_config.rs b/runtime/pangu/src/configs/pallet_nft_config.rs new file mode 100644 index 0000000..7a91c4a --- /dev/null +++ b/runtime/pangu/src/configs/pallet_nft_config.rs @@ -0,0 +1,10 @@ +use pallet_nft::Config; +use crate::*; + +/// Used for the module nft in `./nft.rs` +impl Config for Runtime { + type ModuleId = UniArtsNftModuleId; + type Currency = Uart; + type Event = Event; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_nicks_config.rs b/runtime/pangu/src/configs/pallet_nicks_config.rs new file mode 100644 index 0000000..ddeb275 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_nicks_config.rs @@ -0,0 +1,27 @@ +// use pallet_nicks::Config; +// use crate::*; +// +// frame_support::parameter_types! { +// // Choose a fee that incentivizes desireable behavior. +// pub const NickReservationFee: u128 = 100; +// pub const MinNickLength: usize = 6; +// // Maximum bounds on storage are important to secure your chain. +// pub const MaxNickLength: usize = 32; +// } +// +// impl Config for Runtime { +// /// The Balances pallet implements the ReservableCurrency Config. +// type Currency = Uart; +// /// Use the NickReservationFee from the parameter_types block. +// type ReservationFee = NickReservationFee; +// /// No action is taken when deposits are forfeited. +// type Slashed = Treasury; +// /// Configure the FRAME System Root origin as the Nick pallet admin. +// type ForceOrigin = frame_system::EnsureRoot; +// /// Use the MinNickLength from the parameter_types block. +// type MinLength = MinNickLength; +// /// Use the MaxNickLength from the parameter_types block. +// type MaxLength = MaxNickLength; +// /// The ubiquitous event type. +// type Event = Event; +// } \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_proxy_config.rs b/runtime/pangu/src/configs/pallet_proxy_config.rs new file mode 100644 index 0000000..6e53711 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_proxy_config.rs @@ -0,0 +1,110 @@ +use codec::{Decode, Encode}; +use frame_support::traits::InstanceFilter; +use pallet_proxy::Config; +use uniarts_primitives::*; +use sp_runtime::{traits::BlakeTwo256, RuntimeDebug}; +use crate::{weights::pallet_proxy::WeightInfo, *}; + +/// The type used to represent the kinds of proxying allowed. +#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] +pub enum ProxyType { + Any, + NonTransfer, + Governance, + Staking, + IdentityJudgement, +} +impl Default for ProxyType { + fn default() -> Self { + Self::Any + } +} + +impl InstanceFilter for ProxyType { + fn filter(&self, c: &Call) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => matches!( + c, + Call::System(..) | + Call::Timestamp(..) | + Call::Indices(pallet_indices::Call::claim(..)) | + Call::Indices(pallet_indices::Call::free(..)) | + Call::Indices(pallet_indices::Call::freeze(..)) | + // Specifically omitting the entire Balances pallet + Call::Recovery(pallet_recovery::Call::as_recovered(..)) | + Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | + Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | + Call::Recovery(pallet_recovery::Call::close_recovery(..)) | + Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | + Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | + Call::Authorship(..) | + Call::Staking(..) | + Call::Session(..) | + Call::Grandpa(..) | + Call::Utility(..) | + Call::Society(..) | + Call::Council(..) | + Call::CouncilMembership(..) | + Call::TechnicalCommittee(..) | + Call::TechnicalMembership(..) | + Call::ElectionsPhragmen(..) | + Call::Treasury(..) | + Call::Identity(..) | + Call::Scheduler(..) | + Call::Proxy(..) | + Call::Multisig(..) | + Call::Nft(..) | + Call::Contracts(..) + ), + ProxyType::Governance => matches!( + c, + Call::Council(..) | + Call::Treasury(..) | + Call::TechnicalCommittee(..) | + Call::ElectionsPhragmen(..) | + Call::Utility(..) + ), + ProxyType::Staking => matches!(c, Call::Staking(..)), + ProxyType::IdentityJudgement => matches!( + c, + Call::Identity(pallet_identity::Call::provide_judgement(..)) + ) + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } +} + +frame_support::parameter_types! { + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const MaxProxies: u16 = 32; + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); + pub const MaxPending: u16 = 32; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = MaxProxies; + type MaxPending = MaxPending; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_recovery_config.rs b/runtime/pangu/src/configs/pallet_recovery_config.rs new file mode 100644 index 0000000..9179a14 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_recovery_config.rs @@ -0,0 +1,20 @@ +use pallet_recovery::Config; +use uniarts_primitives::*; +use crate::*; + +frame_support::parameter_types! { + pub const ConfigDepositBase: Balance = 10 * MILLI; + pub const FriendDepositFactor: Balance = MILLI; + pub const MaxFriends: u16 = 9; + pub const RecoveryDeposit: Balance = 10 * MILLI; +} + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Uart; + type ConfigDepositBase = ConfigDepositBase; + type FriendDepositFactor = FriendDepositFactor; + type MaxFriends = MaxFriends; + type RecoveryDeposit = RecoveryDeposit; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_rewards_config.rs b/runtime/pangu/src/configs/pallet_rewards_config.rs new file mode 100644 index 0000000..1a28877 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_rewards_config.rs @@ -0,0 +1,54 @@ +use crate::{weights::pallet_rewards::WeightInfo, *}; +use uniarts_primitives::*; +use pallet_rewards::Config; +use pallet_staking; +use super::frame_system_config::BlocksPerDay; + +pub use crate::constants::currency::*; +pub use crate::constants::time::*; + +frame_support::parameter_types! { + pub const MiningRewardPerBlock: Balance = 8 * UART; + pub const RewardThreshold: Balance = 30 * (BlocksPerDay::get() as Balance) * MiningRewardPerBlock::get(); + pub const StakingRewardPerBlock: Balance = 1 * UART; + pub const AmpFactor: Balance = 1e12 as Balance; + pub const BlocksPerYear: u32 = 10; //365 * BlocksPerDay::get(); + pub const MiningCap: Balance = 150_000_000 * UART; +} + +pub struct AccountIdOf; +impl Convert> for AccountIdOf { + fn convert(a: T) -> Option { + Some(a) + } +} + +pub struct ConvertNumberToBalance; +impl> Convert for ConvertNumberToBalance { + fn convert(a: BlockNumber) -> Balance { + Balance::saturated_from::(a) + } +} + +impl Config for Runtime { + type AccountIdOf = AccountIdOf; + type Balance = Balance; + type Currency = Uart; + type RewardThreshold = RewardThreshold; + type RewardPerBlock = MiningRewardPerBlock; + type BlocksPerYear = BlocksPerYear; + type MiningCap = MiningCap; + type Event = Event; + type WeightInfo = WeightInfo; +} + +impl pallet_staking::Config for Runtime { + type ModuleId = StakingModuleId; + type Event = Event; + type Currency = Uart; + type RewardPerBlock = StakingRewardPerBlock; + type Id = u32; + type AmpFactor = AmpFactor; + type ConvertNumberToBalance = ConvertNumberToBalance; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_scheduler_config.rs b/runtime/pangu/src/configs/pallet_scheduler_config.rs new file mode 100644 index 0000000..dcb79dd --- /dev/null +++ b/runtime/pangu/src/configs/pallet_scheduler_config.rs @@ -0,0 +1,17 @@ +use pallet_scheduler::Config; +use uniarts_primitives::*; +use crate::{weights::pallet_scheduler::WeightInfo, *}; + +frame_support::parameter_types! { + pub const MaxScheduledPerBlock: u32 = 50; +} +impl Config for Runtime { + type Event = Event; + type Origin = Origin; + type PalletsOrigin = OriginCaller; + type Call = Call; + type MaximumWeight = MaximumBlockWeight; + type ScheduleOrigin = EnsureRoot; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_session_config.rs b/runtime/pangu/src/configs/pallet_session_config.rs new file mode 100644 index 0000000..0342d13 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_session_config.rs @@ -0,0 +1,25 @@ +use uniarts_primitives::*; +use pallet_session::Config; +use super::pallet_validator_set_config::DisabledValidatorsThreshold; +use crate::*; +use crate::weights::pallet_session::WeightInfo; + +pub struct ValidatorIdOf; +impl Convert> for ValidatorIdOf { + fn convert(a: T) -> Option { + Some(a) + } +} + +impl Config for Runtime { + type Event = Event; + type ValidatorId = AccountId; + type ValidatorIdOf = ValidatorIdOf; + type ShouldEndSession = ValidatorSet; + type NextSessionRotation = ValidatorSet; + type SessionManager = ValidatorSet; + type SessionHandler = ::KeyTypeIdProviders; + type Keys = opaque::SessionKeys; + type DisabledValidatorsThreshold = DisabledValidatorsThreshold; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_society_config.rs b/runtime/pangu/src/configs/pallet_society_config.rs new file mode 100644 index 0000000..b9f4f02 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_society_config.rs @@ -0,0 +1,32 @@ +use pallet_society::Config; +use uniarts_primitives::*; +use crate::*; +use crate::pallet_membership_config::EnsureRootOrMoreThanHalfCouncil; + + +frame_support::parameter_types! { + pub const CandidateDeposit: Balance = 10 * UART; + pub const WrongSideDeduction: Balance = 2 * UART; + pub const MaxStrikes: u32 = 10; + pub const RotationPeriod: BlockNumber = 80 * HOURS; + pub const PeriodSpend: Balance = 500 * UART; + pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; + pub const ChallengePeriod: BlockNumber = 7 * DAYS; +} + +impl Config for Runtime { + type Event = Event; + type ModuleId = SocietyModuleId; + type Currency = Uart; + type Randomness = RandomnessCollectiveFlip; + type CandidateDeposit = CandidateDeposit; + type WrongSideDeduction = WrongSideDeduction; + type MaxStrikes = MaxStrikes; + type PeriodSpend = PeriodSpend; + type MembershipChanged = (); + type RotationPeriod = RotationPeriod; + type MaxLockDuration = MaxLockDuration; + type FounderSetOrigin = EnsureRootOrMoreThanHalfCouncil; + type SuspensionJudgementOrigin = pallet_society::EnsureFounder; + type ChallengePeriod = ChallengePeriod; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_sudo_config.rs b/runtime/pangu/src/configs/pallet_sudo_config.rs new file mode 100644 index 0000000..ee3dd3e --- /dev/null +++ b/runtime/pangu/src/configs/pallet_sudo_config.rs @@ -0,0 +1,7 @@ +use pallet_sudo::Config; +use crate::*; + +impl Config for Runtime { + type Event = Event; + type Call = Call; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_timestamp_config.rs b/runtime/pangu/src/configs/pallet_timestamp_config.rs new file mode 100644 index 0000000..6bf2637 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_timestamp_config.rs @@ -0,0 +1,14 @@ +use pallet_timestamp::Config; +use crate::{weights::pallet_timestamp::WeightInfo, *}; + +frame_support::parameter_types! { + pub const MinimumPeriod: u64 = SLOT_DURATION / 2; +} + +impl Config for Runtime { + /// A timestamp: milliseconds since the unix epoch. + type Moment = u64; + type OnTimestampSet = Aura; + type MinimumPeriod = MinimumPeriod; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_transaction_payment_config.rs b/runtime/pangu/src/configs/pallet_transaction_payment_config.rs new file mode 100644 index 0000000..f7add60 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_transaction_payment_config.rs @@ -0,0 +1,38 @@ +use pallet_transaction_payment::Config; +use sp_runtime::{Perquintill, FixedPointNumber}; + +use uniarts_primitives::*; +pub use crate::constants::currency::*; +use crate::*; + +pub struct DealWithFees; + +impl OnUnbalanced> for DealWithFees { + fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { + if let Some(fees) = fees_then_tips.next() { + // for fees, 90% to treasury, 10% to author + let mut split = fees.ration(90, 10); + if let Some(tips) = fees_then_tips.next() { + // for tips, if any, 90% to treasury, 10% to author (though this can be anything) + tips.ration_merge_into(90, 10, &mut split); + } + Treasury::on_unbalanced(split.0); + Author::on_unbalanced(split.1); + } + } +} + +frame_support::parameter_types! { + pub const TransactionByteFee: Balance = 1 * MICRO; + pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25); + pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000); + pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128); +} + +impl Config for Runtime { + type OnChargeTransaction = CurrencyAdapter; + type TransactionByteFee = TransactionByteFee; + type WeightToFee = IdentityFee; + type FeeMultiplierUpdate = + TargetedFeeAdjustment; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_treasury_config.rs b/runtime/pangu/src/configs/pallet_treasury_config.rs new file mode 100644 index 0000000..80dfdac --- /dev/null +++ b/runtime/pangu/src/configs/pallet_treasury_config.rs @@ -0,0 +1,41 @@ +use sp_runtime::{Percent, Permill}; +use crate::{weights::pallet_treasury::WeightInfo, *}; +use pallet_treasury::Config; +use crate::pallet_membership_config::{EnsureRootOrMoreThanHalfCouncil, ApproveOrigin}; + + +frame_support::parameter_types! { + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 10 * UART; + pub const SpendPeriod: BlockNumber = 1 * DAYS; + pub const Burn: Permill = Permill::from_percent(0); + pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipFindersFee: Percent = Percent::from_percent(10); + pub const TipReportDepositBase: Balance = 1 * UART; + pub const SevenDays: BlockNumber = 7 * DAYS; + pub const ZeroDay: BlockNumber = 0; + pub const OneDay: BlockNumber = DAYS; + pub const DataDepositPerByte: Balance = 1 * MILLI; + pub const BountyDepositBase: Balance = 1 * UART; + pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 10 * UART; + pub const MaximumReasonLength: u32 = 16384; +} + +impl Config for Runtime { + type ModuleId = UniArtsTreasuryModuleId; + type Currency = Uart; + type ApproveOrigin = ApproveOrigin; + type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; + type Event = Event; + type OnSlash = Treasury; + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type SpendPeriod = SpendPeriod; + type Burn = Burn; + type BurnDestination = Society; + type WeightInfo = WeightInfo; + type SpendFunds = Bounties; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_utility_config.rs b/runtime/pangu/src/configs/pallet_utility_config.rs new file mode 100644 index 0000000..3cf41f5 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_utility_config.rs @@ -0,0 +1,8 @@ +use pallet_utility::Config; +use crate::{weights::pallet_utility::WeightInfo, *}; + +impl Config for Runtime { + type Event = Event; + type Call = Call; + type WeightInfo = WeightInfo; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_validator_set_config.rs b/runtime/pangu/src/configs/pallet_validator_set_config.rs new file mode 100644 index 0000000..9fd3983 --- /dev/null +++ b/runtime/pangu/src/configs/pallet_validator_set_config.rs @@ -0,0 +1,16 @@ +use sp_runtime::Perbill; +use uniarts_primitives::*; +use pallet_validator_set::Config; +use crate::constants::currency::*; +use crate::*; + +frame_support::parameter_types! { + pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); + pub const ValidatorMortgageLimit: Balance = 10_000 * UART; +} + +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type ValidatorMortgageLimit = ValidatorMortgageLimit; +} \ No newline at end of file diff --git a/runtime/pangu/src/configs/pallet_vesting_config.rs b/runtime/pangu/src/configs/pallet_vesting_config.rs new file mode 100644 index 0000000..2b0755f --- /dev/null +++ b/runtime/pangu/src/configs/pallet_vesting_config.rs @@ -0,0 +1,15 @@ +use pallet_vesting::Config; +use sp_runtime::traits::ConvertInto; +use crate::*; + +frame_support::parameter_types! { + pub const MinVestedTransfer: Balance = 100 * DOLLARS; +} + +impl Config for Runtime { + type Event = Event; + type Currency = Uart; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); +} \ No newline at end of file diff --git a/runtime/pangu/src/constants.rs b/runtime/pangu/src/constants.rs index 31b04c3..ec09362 100644 --- a/runtime/pangu/src/constants.rs +++ b/runtime/pangu/src/constants.rs @@ -1,5 +1,5 @@ pub mod currency { - use primitives::Balance; + use uniarts_primitives::Balance; pub const DOLLARS: Balance = 1_000_000; pub const CENTS: Balance = DOLLARS / 100; @@ -14,4 +14,17 @@ pub mod currency { pub const fn deposit(items: u32, bytes: u32) -> Balance { items as Balance * 20 * UART + (bytes as Balance) * 100 * MICRO } +} + +pub mod time { + use uniarts_primitives::{Moment, BlockNumber}; + + pub const MILLISECS_PER_BLOCK: Moment = 6000; + + pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK; + + // Time is measured by number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; } \ No newline at end of file diff --git a/runtime/pangu/src/lib.rs b/runtime/pangu/src/lib.rs index b5057bf..957518b 100644 --- a/runtime/pangu/src/lib.rs +++ b/runtime/pangu/src/lib.rs @@ -6,21 +6,33 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +/// Wasm binary unwrapped. If built with `SKIP_WASM_BUILD`, the function panics. +#[cfg(feature = "std")] +pub fn wasm_binary_unwrap() -> &'static [u8] { + WASM_BINARY.expect("Development wasm binary is not available. This means the client is \ + built with `SKIP_WASM_BUILD` flag and it is only usable for \ + production chains. Please rebuild with the flag disabled.") +} + +/// Constant values used within the runtime. pub mod constants; +pub use constants::time::*; +pub use constants::currency::*; +pub mod configs; +pub use configs::*; -/// Weights for pallets used in the runtime. +/// Weights for configs used in the runtime. mod weights; // --- crates --- -use codec::{Decode, Encode}; use sp_std::prelude::*; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ - ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, RuntimeDebug, + ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, transaction_validity::{TransactionValidity, TransactionSource} }; use sp_runtime::traits::{ - BlakeTwo256, Block as BlockT, IdentityLookup, NumberFor, Saturating, ConvertInto, AccountIdConversion, + BlakeTwo256, Block as BlockT, NumberFor, Saturating, AccountIdConversion, Convert, OpaqueKeys, SaturatedConversion, Bounded }; use frame_system::{EnsureOneOf, EnsureRoot}; @@ -30,21 +42,26 @@ use sp_core::{u32_trait::{_1, _2, _3, _5}, }; use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; use pallet_grandpa::fg_primitives; use sp_version::RuntimeVersion; -use pallet_contracts_rpc_runtime_api::ContractExecResult; #[cfg(feature = "std")] use sp_version::NativeVersion; +use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; +pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment, CurrencyAdapter}; +use sp_inherents::{InherentData, CheckInherentsResult}; // Uni-Arts -use constants::{currency::*}; type Uart = Balances; // A few exports that help ease life for downstream crates. #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; +#[cfg(any(feature = "std", test))] +pub use pallet_balances::Call as BalancesCall; +#[cfg(any(feature = "std", test))] +pub use frame_system::Call as SystemCall; +#[cfg(any(feature = "std", test))] +pub use pallet_timestamp::Call as TimestampCall; pub use sp_runtime::{Permill, Perbill, Percent, ModuleId}; -pub use pallet_timestamp::Call as TimestampCall; -pub use pallet_balances::Call as BalancesCall; pub use frame_support::{ construct_runtime, parameter_types, StorageValue, ConsensusEngineId, traits::{OnUnbalanced, ChangeMembers, KeyOwnerProofSystem, Randomness, StorageMapShim, Currency, Imbalance, @@ -56,24 +73,25 @@ pub use frame_support::{ }, }; -pub use primitives::{ +pub use uniarts_primitives::{ BlockNumber, Signature, AccountId, AccountIndex, Balance, Index, Hash, DigestItem, - TokenSymbol, CurrencyId, + TokenSymbol, CurrencyId, Header, }; -/// Import pallets. +/// Import configs. // pub use pallet_certificate; -pub use pallet_assets; -pub use pallet_nft; -pub use pallet_nicks; -pub use pallet_rewards; pub use pallet_staking; pub use pallet_validator_set; -pub use pallet_token; -pub use pallet_trade; pub use uniarts_common::*; -// pub use pallet_lotteries; -pub use pallet_contracts::Gas; + +/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers. +/// This is used to limit the maximal weight of a single extrinsic. +const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); +/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used +/// by Operational extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +/// We allow for 2 seconds of compute with a 6 second average block time. +const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know /// the specifics of the runtime. They can then be made to be agnostic over specific formats @@ -106,18 +124,9 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_version: 24, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 1, + transaction_version: 2, }; -pub const MILLISECS_PER_BLOCK: u64 = 6000; - -pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - -// Time is measured by number of blocks. -pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); -pub const HOURS: BlockNumber = MINUTES * 60; -pub const DAYS: BlockNumber = HOURS * 24; - /// The version information used to identify this runtime when compiled natively. #[cfg(feature = "std")] pub fn native_version() -> NativeVersion { @@ -157,884 +166,66 @@ parameter_types! { pub const Version: RuntimeVersion = VERSION; } -// Configure FRAME pallets to include in runtime. - -impl frame_system::Trait for Runtime { - /// The basic call filter to use in dispatchable. - type BaseCallFilter = (); - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; - /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = IdentityLookup; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; - /// The type for hashing blocks and tries. - type Hash = Hash; - /// The hashing algorithm used. - type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header; - /// The ubiquitous event type. - type Event = Event; - /// The ubiquitous origin type. - type Origin = Origin; - /// Maximum number of block number to block hash mappings to keep (oldest pruned first). - type BlockHashCount = BlockHashCount; - /// Maximum weight of each block. - type MaximumBlockWeight = MaximumBlockWeight; - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The weight of the overhead invoked on the block import process, independent of the - /// extrinsics included in that block. - type BlockExecutionWeight = BlockExecutionWeight; - /// The base weight of any extrinsic processed by the runtime, independent of the - /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...) - type ExtrinsicBaseWeight = ExtrinsicBaseWeight; - /// The maximum weight that a single extrinsic of `Normal` dispatch class can have, - /// idependent of the logic of that extrinsics. (Roughly max block weight - average on - /// initialize cost). - type MaximumExtrinsicWeight = MaximumExtrinsicWeight; - /// Maximum size of all encoded transactions (in bytes) that are allowed in one block. - type MaximumBlockLength = MaximumBlockLength; - /// Portion of the block weight that is available to all normal transactions. - type AvailableBlockRatio = AvailableBlockRatio; - /// Version of the runtime. - type Version = Version; - - type PalletInfo = PalletInfo; - /// What to do if a new account is created. - type OnNewAccount = (); - /// What to do if an account is fully reaped from the system. - type OnKilledAccount = (); - /// The data to be stored in an account. - type AccountData = pallet_balances::AccountData; - /// Weight information for the extrinsics of this pallet. - type SystemWeightInfo = (); -} - -parameter_types! { - pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17); - pub const ValidatorMortgageLimit: Balance = 10_000 * UART; -} - -impl pallet_validator_set::Trait for Runtime { - type Event = Event; - type Currency = Balances; - type ValidatorMortgageLimit = ValidatorMortgageLimit; -} - -pub struct ValidatorIdOf; -impl Convert> for ValidatorIdOf { - fn convert(a: T) -> Option { - Some(a) - } -} - -impl pallet_session::Trait for Runtime { - type Event = Event; - type ValidatorId = AccountId; - type ValidatorIdOf = ValidatorIdOf; - type ShouldEndSession = ValidatorSet; - type NextSessionRotation = ValidatorSet; - type SessionManager = ValidatorSet; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = opaque::SessionKeys; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; - type WeightInfo = weights::pallet_session::WeightInfo; -} - -impl pallet_aura::Trait for Runtime { - type AuthorityId = AuraId; -} - -impl pallet_grandpa::Trait for Runtime { - type Event = Event; - type Call = Call; - - type KeyOwnerProofSystem = (); - - type KeyOwnerProof = - >::Proof; - - type KeyOwnerIdentification = >::IdentificationTuple; - - type HandleEquivocation = (); - - type WeightInfo = (); -} - -parameter_types! { - pub const MiningRewardPerBlock: Balance = 8 * UART; - pub const RewardThreshold: Balance = 30 * (BlocksPerDay::get() as Balance) * MiningRewardPerBlock::get(); - pub const StakingRewardPerBlock: Balance = 1 * UART; - pub const AmpFactor: Balance = 1e12 as Balance; - pub const BlocksPerYear: u32 = 10; //365 * BlocksPerDay::get(); - pub const MiningCap: Balance = 150_000_000 * UART; -} - -pub struct AccountIdOf; -impl Convert> for AccountIdOf { - fn convert(a: T) -> Option { - Some(a) - } -} - -pub struct ConvertNumberToBalance; -impl> Convert for ConvertNumberToBalance { - fn convert(a: BlockNumber) -> Balance { - Balance::saturated_from::(a) - } -} - - -impl pallet_rewards::Trait for Runtime { - type AccountIdOf = AccountIdOf; - type Balance = Balance; - type Currency = Uart; - type RewardThreshold = RewardThreshold; - type RewardPerBlock = MiningRewardPerBlock; - type BlocksPerYear = BlocksPerYear; - type MiningCap = MiningCap; - type Event = Event; - type WeightInfo = weights::pallet_rewards::WeightInfo; -} - - - -impl pallet_staking::Trait for Runtime { - type ModuleId = StakingModuleId; - type Event = Event; - type Currency = Uart; - type RewardPerBlock = StakingRewardPerBlock; - type Id = u32; - type AmpFactor = AmpFactor; - type ConvertNumberToBalance = ConvertNumberToBalance; - type WeightInfo = (); -} - -parameter_types! { - pub const MinVestedTransfer: Balance = 100 * DOLLARS; -} - -impl pallet_vesting::Trait for Runtime { - type Event = Event; - type Currency = Uart; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} - -impl pallet_timestamp::Trait for Runtime { - /// A timestamp: milliseconds since the unix epoch. - type Moment = u64; - type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; -} - -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - // For weight estimation, we assume that the most locks on an individual account will be 50. - // This number may need to be adjusted in the future if this assumption no longer holds true. - pub const MaxLocks: u32 = 50; -} - -// type UartInstance = pallet_balances::Instance0; -type UinkInstance = pallet_balances::Instance1; - -impl pallet_balances::Trait for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type MaxLocks = MaxLocks; - type WeightInfo = weights::pallet_balances::WeightInfo; -} - -// impl pallet_balances::Trait for Runtime { -// /// The type for recording an account's balance. -// type Balance = Balance; -// /// The ubiquitous event type. -// type Event = Event; -// type DustRemoval = (); -// type ExistentialDeposit = ExistentialDeposit; -// type AccountStore = System; -// type WeightInfo = (); -// } - -type UinkAccountStore = StorageMapShim< - pallet_balances::Account, - frame_system::CallOnCreatedAccount, - frame_system::CallKillAccount, - AccountId, - pallet_balances::AccountData - >; - -impl pallet_balances::Trait for Runtime { - /// The type for recording an account's balance. - type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = UinkAccountStore; - type WeightInfo = (); - type MaxLocks = MaxLocks; -} - -parameter_types! { - pub const UncleGenerations: BlockNumber = 0; -} - -impl pallet_authorship::Trait for Runtime { - type FindAuthor = AuraAccountAdapter; - type UncleGenerations = UncleGenerations; - type FilterUncle = (); - type EventHandler = (); -} - -pub struct AuraAccountAdapter; - -impl FindAuthor for AuraAccountAdapter { - fn find_author<'a, I>(digests: I) -> Option - where I: 'a + IntoIterator - { - if let Some(index) = pallet_aura::Module::::find_author(digests) { - let validator = pallet_session::Module::::validators()[index as usize].clone(); - Some(validator) - } - else { - None - } - } -} - -pub struct DealWithFees; - -impl OnUnbalanced> for DealWithFees { - fn on_unbalanceds(mut fees_then_tips: impl Iterator>) { - if let Some(fees) = fees_then_tips.next() { - // for fees, 90% to treasury, 10% to author - let mut split = fees.ration(90, 10); - if let Some(tips) = fees_then_tips.next() { - // for tips, if any, 90% to treasury, 10% to author (though this can be anything) - tips.ration_merge_into(90, 10, &mut split); - } - Treasury::on_unbalanced(split.0); - Author::on_unbalanced(split.1); - } - } -} - -parameter_types! { - pub const TransactionByteFee: Balance = 1 * MICRO; -} - -impl pallet_transaction_payment::Trait for Runtime { - type Currency = Uart; - type OnTransactionPayment = DealWithFees; - type TransactionByteFee = TransactionByteFee; - type WeightToFee = IdentityFee; - type FeeMultiplierUpdate = (); -} - -parameter_types! { - // Choose a fee that incentivizes desireable behavior. - pub const NickReservationFee: u128 = 100; - pub const MinNickLength: usize = 6; - // Maximum bounds on storage are important to secure your chain. - pub const MaxNickLength: usize = 32; -} - -impl pallet_nicks::Trait for Runtime { - /// The Balances pallet implements the ReservableCurrency trait. - type Currency = Uart; - /// Use the NickReservationFee from the parameter_types block. - type ReservationFee = NickReservationFee; - /// No action is taken when deposits are forfeited. - type Slashed = Treasury; - /// Configure the FRAME System Root origin as the Nick pallet admin. - type ForceOrigin = frame_system::EnsureRoot; - /// Use the MinNickLength from the parameter_types block. - type MinLength = MinNickLength; - /// Use the MaxNickLength from the parameter_types block. - type MaxLength = MaxNickLength; - /// The ubiquitous event type. - type Event = Event; -} - -impl pallet_sudo::Trait for Runtime { - type Event = Event; - type Call = Call; -} - -// impl pallet_certificate::Trait for Runtime { -// type Event = Event; -// type WorkId = u32; -// } - -impl pallet_assets::Trait for Runtime { - type Event = Event; - type Balance = Balance; - type AssetId = u32; -} - -impl pallet_token::Trait for Runtime { - type Event = Event; -} - -parameter_types! { - pub const PriceFactor: u128 = 100_000_000; - pub const BlocksPerDay: u32 = 6 * 60 * 24; - pub const OpenedOrdersArrayCap: u8 = 20; - pub const ClosedOrdersArrayCap: u8 = 100; -} - -impl pallet_trade::Trait for Runtime { - type Event = Event; - type Price = u128; - type PriceFactor = PriceFactor; - type BlocksPerDay = BlocksPerDay; - type OpenedOrdersArrayCap = OpenedOrdersArrayCap; - type ClosedOrdersArrayCap = ClosedOrdersArrayCap; -} - -impl pallet_names::Trait for Runtime { - type Name = Vec; - type Value = Vec; - type Currency = Uart; - type Event = Event; - - fn get_name_fee(op: &pallet_names::Operation) -> Option { - /* Single-letter names are not allowed (nor the empty name). Everything - else is fine. */ - if op.name.len() < 2 { - return None - } - - Some(match op.operation { - pallet_names::OperationType::Registration => 1000, - pallet_names::OperationType::Update => 100, - }) - } - - fn get_expiration(op: &pallet_names::Operation) -> Option { - /* Short names (up to three characters) will expire after 10 blocks. - Longer names will stick around forever. */ - if op.name.len() <= 3 { - Some(10) - } else { - None - } - } - - fn deposit_fee(_b: >::NegativeImbalance) { - /* Just burn the name fee by dropping the imbalance. */ - } - -} - -/// Used for the module nft in `./nft.rs` -impl pallet_nft::Trait for Runtime { - type ModuleId = UniArtsNftModuleId; - type Currency = Uart; - type Event = Event; - type WeightInfo = (); -} - -parameter_types! { - pub const CandidateDeposit: Balance = 10 * UART; - pub const WrongSideDeduction: Balance = 2 * UART; - pub const MaxStrikes: u32 = 10; - pub const RotationPeriod: BlockNumber = 80 * HOURS; - pub const PeriodSpend: Balance = 500 * UART; - pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; - pub const ChallengePeriod: BlockNumber = 7 * DAYS; -} - -impl pallet_society::Trait for Runtime { - type Event = Event; - type ModuleId = SocietyModuleId; - type Currency = Uart; - type Randomness = RandomnessCollectiveFlip; - type CandidateDeposit = CandidateDeposit; - type WrongSideDeduction = WrongSideDeduction; - type MaxStrikes = MaxStrikes; - type PeriodSpend = PeriodSpend; - type MembershipChanged = (); - type RotationPeriod = RotationPeriod; - type MaxLockDuration = MaxLockDuration; - type FounderSetOrigin = EnsureRootOrMoreThanHalfCouncil; - type SuspensionJudgementOrigin = pallet_society::EnsureFounder; - type ChallengePeriod = ChallengePeriod; -} - -// Uni-Art Treasury -parameter_types! { - pub const CouncilMotionDuration: BlockNumber = 3 * DAYS; - pub const CouncilMaxProposals: u32 = 100; - pub const CouncilMaxMembers: u32 = 100; - pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS; - pub const TechnicalMaxProposals: u32 = 100; - pub const TechnicalMaxMembers: u32 = 100; -} - -type CouncilInstance = pallet_collective::Instance0; -impl pallet_collective::Trait for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; - type MotionDuration = CouncilMotionDuration; - type MaxProposals = CouncilMaxProposals; - type MaxMembers = CouncilMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; -} - -type TechnicalCollective = pallet_collective::Instance1; -impl pallet_collective::Trait for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; - type MotionDuration = TechnicalMotionDuration; - type MaxProposals = TechnicalMaxProposals; - type MaxMembers = TechnicalMaxMembers; - type DefaultVote = pallet_collective::PrimeDefaultVote; - type WeightInfo = weights::pallet_collective::WeightInfo; -} - -type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< - AccountId, - EnsureRoot, - pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilInstance>, ->; - -pub struct MembershipChangedGroup; -impl ChangeMembers for MembershipChangedGroup { - fn change_members_sorted( - incoming: &[AccountId], - outgoing: &[AccountId], - sorted_new: &[AccountId], - ) { - TechnicalCommittee::change_members_sorted(incoming, outgoing, sorted_new); - } -} - -type CouncilMembershipInstance = pallet_membership::Instance0; -impl pallet_membership::Trait for Runtime { - type Event = Event; - type AddOrigin = EnsureRootOrMoreThanHalfCouncil; - type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; - type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; - type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; - type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; - type MembershipInitialized = Council; - type MembershipChanged = Council; -} - -type TechnicalCommitteeMembershipInstance = pallet_membership::Instance1; -impl pallet_membership::Trait for Runtime { - type Event = Event; - type AddOrigin = EnsureRootOrMoreThanHalfCouncil; - type RemoveOrigin = EnsureRootOrMoreThanHalfCouncil; - type SwapOrigin = EnsureRootOrMoreThanHalfCouncil; - type ResetOrigin = EnsureRootOrMoreThanHalfCouncil; - type PrimeOrigin = EnsureRootOrMoreThanHalfCouncil; - type MembershipInitialized = TechnicalCommittee; - type MembershipChanged = MembershipChangedGroup; -} - -parameter_types! { - pub const CandidacyBond: Balance = 10 * UART; - pub const VotingBond: Balance = 1 * UART; - pub const TermDuration: BlockNumber = 24 * HOURS; - pub const DesiredMembers: u32 = 13; - pub const DesiredRunnersUp: u32 = 7; -} - -impl pallet_elections_phragmen::Trait for Runtime { - type ModuleId = ElectionsPhragmenModuleId; - type Event = Event; - type Currency = Uart; - type CurrencyToVote = uniarts_common::currency::CurrencyToVoteHandler; - type ChangeMembers = Council; - type InitializeMembers = Council; - type CandidacyBond = CandidacyBond; - type VotingBond = VotingBond; - type TermDuration = TermDuration; - type DesiredMembers = DesiredMembers; - type DesiredRunnersUp = DesiredRunnersUp; - type LoserCandidate = Treasury; - type KickedMember = Treasury; - type BadReport = Treasury; - type WeightInfo = weights::pallet_elections_phragmen::WeightInfo; -} - -// Uni-Art Treasury -type ApproveOrigin = EnsureOneOf< - AccountId, - EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilInstance>, ->; - -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 1 * UART; - pub const SpendPeriod: BlockNumber = 1 * DAYS; - pub const Burn: Permill = Permill::from_percent(0); - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(10); - pub const TipReportDepositBase: Balance = 1 * UART; - pub const SevenDays: BlockNumber = 7 * DAYS; - pub const ZeroDay: BlockNumber = 0; - pub const OneDay: BlockNumber = DAYS; - pub const DataDepositPerByte: Balance = 1 * MILLI; - pub const BountyDepositBase: Balance = 1 * UART; - pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); - pub const BountyValueMinimum: Balance = 10 * UART; - pub const MaximumReasonLength: u32 = 16384; -} - -impl pallet_treasury::Trait for Runtime { - type ModuleId = UniArtsTreasuryModuleId; - type Currency = Uart; - type ApproveOrigin = ApproveOrigin; - type RejectOrigin = EnsureRootOrMoreThanHalfCouncil; - type Tippers = ElectionsPhragmen; - type TipCountdown = TipCountdown; - type TipFindersFee = TipFindersFee; - type TipReportDepositBase = TipReportDepositBase; - type Event = Event; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = Society; - type DataDepositPerByte = DataDepositPerByte; - type OnSlash = Treasury; - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type BountyCuratorDeposit = BountyCuratorDeposit; - type BountyValueMinimum = BountyValueMinimum; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_treasury::WeightInfo; -} - -parameter_types! { - pub const BasicDeposit: Balance = 10 * UART; // 258 bytes on-chain - pub const FieldDeposit: Balance = 250 * MICRO; // 66 bytes on-chain - pub const SubAccountDeposit: Balance = 2 * UART; // 53 bytes on-chain - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; -} -impl pallet_identity::Trait for Runtime { - type Event = Event; - type Currency = Uart; - type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EnsureRootOrMoreThanHalfCouncil; - type RegistrarOrigin = EnsureRootOrMoreThanHalfCouncil; - type WeightInfo = weights::pallet_identity::WeightInfo; -} +// Configure FRAME configs to include in runtime. +// In config mod -parameter_types! { - pub const MaxScheduledPerBlock: u32 = 50; -} -impl pallet_scheduler::Trait for Runtime { - type Event = Event; - type Origin = Origin; - type PalletsOrigin = OriginCaller; - type Call = Call; - type MaximumWeight = MaximumBlockWeight; - type ScheduleOrigin = EnsureRoot; - type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; -} - -parameter_types! { - pub const TombstoneDeposit: Balance = 1 * UART; - pub const RentByteFee: Balance = 1 * MILLI; - pub const RentDepositOffset: Balance = 100 * UART; - pub const SurchargeReward: Balance = 150 * UART; -} - -impl pallet_contracts::Trait for Runtime { - type Time = Timestamp; - type Randomness = RandomnessCollectiveFlip; - type Currency = Uart; - type Event = Event; - type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer; - type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter; - type RentPayment = (); - type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap; - type TombstoneDeposit = TombstoneDeposit; - type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset; - type RentByteFee = RentByteFee; - type RentDepositOffset = RentDepositOffset; - type SurchargeReward = SurchargeReward; - type MaxDepth = pallet_contracts::DefaultMaxDepth; - type MaxValueSize = pallet_contracts::DefaultMaxValueSize; - type WeightPrice = pallet_transaction_payment::Module; -} - -/// The type used to represent the kinds of proxying allowed. -#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] -pub enum ProxyType { - Any, - NonTransfer, - Governance, - Staking, - IdentityJudgement, -} -impl Default for ProxyType { - fn default() -> Self { - Self::Any - } -} - -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => matches!( - c, - Call::System(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim(..)) | - Call::Indices(pallet_indices::Call::free(..)) | - Call::Indices(pallet_indices::Call::freeze(..)) | - // Specifically omitting the entire Balances pallet - Call::Recovery(pallet_recovery::Call::as_recovered(..)) | - Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) | - Call::Recovery(pallet_recovery::Call::claim_recovery(..)) | - Call::Recovery(pallet_recovery::Call::close_recovery(..)) | - Call::Recovery(pallet_recovery::Call::remove_recovery(..)) | - Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) | - Call::Authorship(..) | - Call::Staking(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::Utility(..) | - Call::Society(..) | - Call::Council(..) | - Call::CouncilMembership(..) | - Call::TechnicalCommittee(..) | - Call::TechnicalMembership(..) | - Call::ElectionsPhragmen(..) | - Call::Treasury(..) | - Call::Identity(..) | - Call::Scheduler(..) | - Call::Proxy(..) | - Call::Multisig(..) | - Call::Nicks(..) | - Call::Nft(..) | - Call::Token(..) | - Call::Trade(..) | - Call::Contracts(..) - ), - ProxyType::Governance => matches!( - c, - Call::Council(..) | - Call::Treasury(..) | - Call::TechnicalCommittee(..) | - Call::ElectionsPhragmen(..) | - Call::Utility(..) - ), - ProxyType::Staking => matches!(c, Call::Staking(..)), - ProxyType::IdentityJudgement => matches!( - c, - Call::Identity(pallet_identity::Call::provide_judgement(..)) - ) - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } -} - -parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const MaxProxies: u16 = 32; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); - pub const MaxPending: u16 = 32; -} - -impl pallet_proxy::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; - type WeightInfo = weights::pallet_proxy::WeightInfo; -} - -impl pallet_utility::Trait for Runtime { - type Event = Event; - type Call = Call; - type WeightInfo = weights::pallet_utility::WeightInfo; -} - -parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); - pub const MaxSignatories: u16 = 100; -} - -impl pallet_multisig::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Uart; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; -} - -parameter_types! { - pub const IndexDeposit: Balance = 1 * UART; -} -impl pallet_indices::Trait for Runtime { - type AccountIndex = AccountIndex; - type Currency = Uart; - type Deposit = IndexDeposit; - type Event = Event; - type WeightInfo = weights::pallet_indices::WeightInfo; -} - -parameter_types! { - pub const ConfigDepositBase: Balance = 10 * MILLI; - pub const FriendDepositFactor: Balance = MILLI; - pub const MaxFriends: u16 = 9; - pub const RecoveryDeposit: Balance = 10 * MILLI; -} - -impl pallet_recovery::Trait for Runtime { - type Event = Event; - type Call = Call; - type Currency = Balances; - type ConfigDepositBase = ConfigDepositBase; - type FriendDepositFactor = FriendDepositFactor; - type MaxFriends = MaxFriends; - type RecoveryDeposit = RecoveryDeposit; -} - -// parameter_types! { -// pub const TicketPrice: Balance = 10 * UART; -// pub const LuckyPeriod: BlockNumber = 1200; -// } -// -// impl pallet_lotteries::Trait for Runtime { -// type Event = Event; -// type Call = Call; -// type ModuleId = LotteryModuleId; -// type Currency = Uart; -// type LotteryDrawOrigin = EnsureRootOrMoreThanHalfCouncil; -// type TicketPrice = TicketPrice; -// type LuckyPeriod = LuckyPeriod; -// type Randomness = RandomnessCollectiveFlip; -// } - -// Create the runtime by composing the FRAME pallets that were previously configured. +// Create the runtime by composing the FRAME configs that were previously configured. construct_runtime!( pub enum Runtime where Block = Block, NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Module, Call, Config, Storage, Event}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage}, - Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent}, - Indices: pallet_indices::{Module, Call, Storage, Config, Event}, - - Authorship: pallet_authorship::{Module, Call, Storage}, - Session: pallet_session::{Module, Call, Storage, Event, Config}, - ValidatorSet: pallet_validator_set::{Module, Call, Storage, Event, Config}, - Aura: pallet_aura::{Module, Config, Inherent}, - Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event}, - Rewards: pallet_rewards::{Module, Call, Storage, Event}, - Staking: pallet_staking::{Module, Call, Storage, Event}, - Vesting: pallet_vesting::{Module, Call, Storage, Event, Config}, - - Nicks: pallet_nicks::{Module, Call, Storage, Event}, - Balances: pallet_balances::{Module, Call, Storage, Config, Event}, - Contracts: pallet_contracts::{Module, Call, Storage, Event, Config}, + System: frame_system::{Module, Call, Config, Storage, Event} = 0, + Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 1, + // System scheduler. + Scheduler: pallet_scheduler::{Module, Call, Storage, Event} = 2, + Utility: pallet_utility::{Module, Call, Event} = 3, + Multisig: pallet_multisig::{Module, Call, Storage, Event} =4, + Proxy: pallet_proxy::{Module, Call, Storage, Event} = 5, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage} = 6, + Balances: pallet_balances::{Module, Call, Storage, Config, Event} = 7, + + Indices: pallet_indices::{Module, Call, Storage, Config, Event} = 10, + Authorship: pallet_authorship::{Module, Call, Storage} = 11, + Session: pallet_session::{Module, Call, Storage, Event, Config} = 12, + ValidatorSet: pallet_validator_set::{Module, Call, Storage, Event, Config} = 13, + Aura: pallet_aura::{Module, Config} = 14, + Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event} = 15, + Rewards: pallet_rewards::{Module, Call, Storage, Event} = 16, + Staking: pallet_staking::{Module, Call, Storage, Event} = 17, + Vesting: pallet_vesting::{Module, Call, Storage, Event, Config} = 18, + + // Nicks: pallet_nicks::{Module, Call, Storage, Event}, + Contracts: pallet_contracts::{Module, Call, Storage, Config, Event} = 22, // Lotteries: pallet_lotteries::{Module, Call, Storage, Event}, // Uart: pallet_balances::::{Module, Call, Storage, Config, Event}, - Uink: pallet_balances::::{Module, Call, Storage, Config, Event}, + Uink: pallet_balances::::{Module, Call, Storage, Config, Event} = 23, // Governance - Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config}, - CouncilMembership: pallet_membership::::{Module, Call, Storage, Event, Config}, - Treasury: pallet_treasury::{Module, Call, Storage, Config, Event}, - TechnicalCommittee: pallet_collective::::{Module, Call, Storage, Origin, Config, Event}, - TechnicalMembership: pallet_membership::::{Module, Call, Storage, Config, Event}, - Identity: pallet_identity::{Module, Call, Storage, Event}, - ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event}, - // Society module. - Society: pallet_society::{Module, Call, Storage, Event}, + Council: pallet_collective::::{Module, Call, Storage, Origin, Event, Config} = 31, + CouncilMembership: pallet_membership::::{Module, Call, Storage, Event, Config} = 32, + Treasury: pallet_treasury::{Module, Call, Storage, Config, Event} = 33, + Bounties: pallet_bounties::{Module, Call, Storage, Event} = 34, + TechnicalCommittee: pallet_collective::::{Module, Call, Storage, Origin, Config, Event} = 35, + TechnicalMembership: pallet_membership::::{Module, Call, Storage, Config, Event} = 36, + Identity: pallet_identity::{Module, Call, Storage, Event} = 37, + ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event} = 38, - // System scheduler. - Scheduler: pallet_scheduler::{Module, Call, Storage, Event}, - TransactionPayment: pallet_transaction_payment::{Module, Storage}, - Sudo: pallet_sudo::{Module, Call, Config, Storage, Event}, - - Assets: pallet_assets::{Module, Call, Storage, Event}, - Names: pallet_names::{Module, Call, Storage, Event}, - Nft: pallet_nft::{Module, Call, Storage, Event}, - Token: pallet_token::{Module, Call, Storage, Event}, - Trade: pallet_trade::{Module, Call, Storage, Event}, - Utility: pallet_utility::{Module, Call, Event}, - Proxy: pallet_proxy::{Module, Call, Storage, Event}, - Multisig: pallet_multisig::{Module, Call, Storage, Event}, - Recovery: pallet_recovery::{Module, Call, Storage, Event}, + // Society module. + Society: pallet_society::{Module, Call, Storage, Event} = 41, + TransactionPayment: pallet_transaction_payment::{Module, Storage} = 42, + Sudo: pallet_sudo::{Module, Call, Config, Storage, Event} = 43, + Recovery: pallet_recovery::{Module, Call, Storage, Event} = 44, + + Names: pallet_names::{Module, Call, Storage, Event} = 51, + Assets: pallet_assets::{Module, Call, Storage, Event} = 52, + Nft: pallet_nft::{Module, Call, Storage, Event} = 53, } ); /// The address format for describing accounts. -pub type Address = AccountId; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; +pub type Address = sp_runtime::MultiAddress; /// Block type as expected by this runtime. pub type Block = generic::Block; /// A Block signed with a Justification @@ -1094,14 +285,11 @@ impl_runtime_apis! { Executive::finalize_block() } - fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<::Extrinsic> { + fn inherent_extrinsics(data: InherentData) -> Vec<::Extrinsic> { data.create_extrinsics() } - fn check_inherents( - block: Block, - data: sp_inherents::InherentData, - ) -> sp_inherents::CheckInherentsResult { + fn check_inherents(block: Block, data: InherentData) -> CheckInherentsResult { data.check_extrinsics(&block) } @@ -1179,48 +367,44 @@ impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { - fn query_info( - uxt: ::Extrinsic, - len: u32, - ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< + Block, + Balance, + > for Runtime { + fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_info(uxt, len) } + fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } } - impl pallet_contracts_rpc_runtime_api::ContractsApi for Runtime { - fn call( - origin: AccountId, - dest: AccountId, - value: Balance, - gas_limit: u64, - input_data: Vec, - ) -> ContractExecResult { - let (exec_result, gas_consumed) = - Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data); - match exec_result { - Ok(v) => ContractExecResult::Success { - flags: v.flags.bits(), - data: v.data, - gas_consumed: gas_consumed, - }, - Err(_) => ContractExecResult::Error, - } - } + impl pallet_contracts_rpc_runtime_api::ContractsApi + for Runtime + { + fn call( + origin: AccountId, + dest: AccountId, + value: Balance, + gas_limit: u64, + input_data: Vec, + ) -> pallet_contracts_primitives::ContractExecResult { + Contracts::bare_call(origin, dest, value, gas_limit, input_data) + } - fn get_storage( - address: AccountId, - key: [u8; 32], - ) -> pallet_contracts_primitives::GetStorageResult { - Contracts::get_storage(address, key) - } + fn get_storage( + address: AccountId, + key: [u8; 32], + ) -> pallet_contracts_primitives::GetStorageResult { + Contracts::get_storage(address, key) + } - fn rent_projection( - address: AccountId, - ) -> pallet_contracts_primitives::RentProjectionResult { - Contracts::rent_projection(address) - } - } + fn rent_projection( + address: AccountId, + ) -> pallet_contracts_primitives::RentProjectionResult { + Contracts::rent_projection(address) + } + } impl pallet_staking_rpc_runtime_api::StakingApi for Runtime { fn staking_module_account_id() -> AccountId { @@ -1244,7 +428,7 @@ impl_runtime_apis! { use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; use frame_system_benchmarking::Module as SystemBench; - impl frame_system_benchmarking::Trait for Runtime {} + impl frame_system_benchmarking::Config for Runtime {} let whitelist: Vec = vec![ // Block Number diff --git a/runtime/pangu/src/weights/frame_system.rs b/runtime/pangu/src/weights/frame_system.rs new file mode 100644 index 0000000..6848989 --- /dev/null +++ b/runtime/pangu/src/weights/frame_system.rs @@ -0,0 +1,38 @@ +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +pub struct WeightInfo(PhantomData); +impl frame_system::WeightInfo for WeightInfo { + fn remark(_b: u32) -> Weight { + (1_815_000 as Weight) + } + fn set_heap_pages() -> Weight { + (2_463_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn set_changes_trie_config() -> Weight { + (11_280_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn set_storage(i: u32) -> Weight { + (0 as Weight) + .saturating_add((821_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + fn kill_storage(i: u32) -> Weight { + (0 as Weight) + .saturating_add((549_000 as Weight).saturating_mul(i as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + } + fn kill_prefix(p: u32) -> Weight { + (0 as Weight) + .saturating_add((872_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + } + fn suicide() -> Weight { + (37_209_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + } +} \ No newline at end of file diff --git a/runtime/pangu/src/weights/mod.rs b/runtime/pangu/src/weights/mod.rs index c0bdc50..0ff1e86 100644 --- a/runtime/pangu/src/weights/mod.rs +++ b/runtime/pangu/src/weights/mod.rs @@ -1,3 +1,4 @@ +pub mod frame_system; pub mod pallet_scheduler; pub mod pallet_multisig; pub mod pallet_proxy; diff --git a/runtime/pangu/src/weights/pallet_balances.rs b/runtime/pangu/src/weights/pallet_balances.rs index 364edb2..5e21f94 100644 --- a/runtime/pangu/src/weights/pallet_balances.rs +++ b/runtime/pangu/src/weights/pallet_balances.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_balances::WeightInfo for WeightInfo { +impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { (90_276_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/pangu/src/weights/pallet_collective.rs b/runtime/pangu/src/weights/pallet_collective.rs index 9410855..4a1b5f6 100644 --- a/runtime/pangu/src/weights/pallet_collective.rs +++ b/runtime/pangu/src/weights/pallet_collective.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_collective::WeightInfo for WeightInfo { +impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32) -> Weight { (0 as Weight) .saturating_add((20_311_000 as Weight).saturating_mul(m as Weight)) diff --git a/runtime/pangu/src/weights/pallet_elections_phragmen.rs b/runtime/pangu/src/weights/pallet_elections_phragmen.rs index d48470d..af81678 100644 --- a/runtime/pangu/src/weights/pallet_elections_phragmen.rs +++ b/runtime/pangu/src/weights/pallet_elections_phragmen.rs @@ -9,66 +9,74 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_elections_phragmen::WeightInfo for WeightInfo { - fn vote(v: u32) -> Weight { - (82_513_000 as Weight) - .saturating_add((120_000 as Weight).saturating_mul(v as Weight)) +impl pallet_elections_phragmen::WeightInfo for WeightInfo { + fn vote_equal(v: u32) -> Weight { + (54_923_000 as Weight) + .saturating_add((324_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn vote_update(v: u32) -> Weight { - (51_149_000 as Weight) - .saturating_add((102_000 as Weight).saturating_mul(v as Weight)) + fn vote_more(v: u32) -> Weight { + (83_389_000 as Weight) + .saturating_add((341_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn remove_voter() -> Weight { - (67_398_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + fn vote_less(v: u32) -> Weight { + (78_865_000 as Weight) + .saturating_add((343_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn report_defunct_voter_correct(c: u32, v: u32) -> Weight { - (0 as Weight) - .saturating_add((1_676_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((33_438_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn report_defunct_voter_incorrect(c: u32, v: u32) -> Weight { - (0 as Weight) - .saturating_add((1_678_000 as Weight).saturating_mul(c as Weight)) - .saturating_add((33_333_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) + fn remove_voter() -> Weight { + (72_370_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn submit_candidacy(c: u32) -> Weight { - (67_154_000 as Weight) - .saturating_add((273_000 as Weight).saturating_mul(c as Weight)) + (68_455_000 as Weight) + .saturating_add((370_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_candidate(c: u32) -> Weight { - (40_784_000 as Weight) - .saturating_add((141_000 as Weight).saturating_mul(c as Weight)) + (54_009_000 as Weight) + .saturating_add((200_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_members() -> Weight { - (73_194_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + (84_797_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn renounce_candidacy_runners_up() -> Weight { - (44_186_000 as Weight) + (59_095_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn remove_member_with_replacement() -> Weight { - (110_232_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) + (132_820_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn remove_member_wrong_refund() -> Weight { - (8_411_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) + (8_551_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) + } + fn clean_defunct_voters(v: u32, _d: u32) -> Weight { + (0 as Weight) + .saturating_add((151_754_000 as Weight).saturating_mul(v as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) + } + fn election_phragmen(c: u32, v: u32, e: u32) -> Weight { + (0 as Weight) + .saturating_add((134_602_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((111_037_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((7_150_000 as Weight).saturating_mul(e as Weight)) + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) + .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) } } \ No newline at end of file diff --git a/runtime/pangu/src/weights/pallet_identity.rs b/runtime/pangu/src/weights/pallet_identity.rs index b4b097c..ee1409e 100644 --- a/runtime/pangu/src/weights/pallet_identity.rs +++ b/runtime/pangu/src/weights/pallet_identity.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_identity::WeightInfo for WeightInfo { +impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32) -> Weight { (26_389_000 as Weight) .saturating_add((287_000 as Weight).saturating_mul(r as Weight)) diff --git a/runtime/pangu/src/weights/pallet_indices.rs b/runtime/pangu/src/weights/pallet_indices.rs index b8a46dd..54e2b15 100644 --- a/runtime/pangu/src/weights/pallet_indices.rs +++ b/runtime/pangu/src/weights/pallet_indices.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_indices::WeightInfo for WeightInfo { +impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { (50_405_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/pangu/src/weights/pallet_multisig.rs b/runtime/pangu/src/weights/pallet_multisig.rs index e6cb87a..9724305 100644 --- a/runtime/pangu/src/weights/pallet_multisig.rs +++ b/runtime/pangu/src/weights/pallet_multisig.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { +impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(z: u32) -> Weight { (12_114_000 as Weight).saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } diff --git a/runtime/pangu/src/weights/pallet_proxy.rs b/runtime/pangu/src/weights/pallet_proxy.rs index dcd23b8..6778aea 100644 --- a/runtime/pangu/src/weights/pallet_proxy.rs +++ b/runtime/pangu/src/weights/pallet_proxy.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_proxy::WeightInfo for WeightInfo { +impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32) -> Weight { (29_879_000 as Weight) .saturating_add((190_000 as Weight).saturating_mul(p as Weight)) diff --git a/runtime/pangu/src/weights/pallet_rewards.rs b/runtime/pangu/src/weights/pallet_rewards.rs index 1f2954c..bf687cd 100644 --- a/runtime/pangu/src/weights/pallet_rewards.rs +++ b/runtime/pangu/src/weights/pallet_rewards.rs @@ -7,7 +7,7 @@ use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_rewards::WeightInfo for WeightInfo { +impl pallet_rewards::WeightInfo for WeightInfo { fn claim() -> Weight { (50_000_000 as Weight) .saturating_add(DbWeight::get().reads(3 as Weight)) diff --git a/runtime/pangu/src/weights/pallet_scheduler.rs b/runtime/pangu/src/weights/pallet_scheduler.rs index 847907e..efe06c3 100644 --- a/runtime/pangu/src/weights/pallet_scheduler.rs +++ b/runtime/pangu/src/weights/pallet_scheduler.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_scheduler::WeightInfo for WeightInfo { +impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32) -> Weight { (32_493_000 as Weight) .saturating_add((49_000 as Weight).saturating_mul(s as Weight)) diff --git a/runtime/pangu/src/weights/pallet_session.rs b/runtime/pangu/src/weights/pallet_session.rs index 4442690..8b6bbbc 100644 --- a/runtime/pangu/src/weights/pallet_session.rs +++ b/runtime/pangu/src/weights/pallet_session.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_session::WeightInfo for WeightInfo { +impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { (87_465_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) diff --git a/runtime/pangu/src/weights/pallet_timestamp.rs b/runtime/pangu/src/weights/pallet_timestamp.rs index e797f54..8fd4387 100644 --- a/runtime/pangu/src/weights/pallet_timestamp.rs +++ b/runtime/pangu/src/weights/pallet_timestamp.rs @@ -9,7 +9,7 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_timestamp::WeightInfo for WeightInfo { +impl pallet_timestamp::WeightInfo for WeightInfo { // WARNING! Some components were not used: ["t"] fn set() -> Weight { (10_860_000 as Weight) diff --git a/runtime/pangu/src/weights/pallet_treasury.rs b/runtime/pangu/src/weights/pallet_treasury.rs index 5184cb2..1fd03ab 100644 --- a/runtime/pangu/src/weights/pallet_treasury.rs +++ b/runtime/pangu/src/weights/pallet_treasury.rs @@ -7,118 +7,28 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_treasury::WeightInfo for WeightInfo { +impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (79604000 as Weight) + (52_217_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (61001000 as Weight) + (83_066_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal() -> Weight { - (17835000 as Weight) + (11_351_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn report_awesome(r: u32) -> Weight { - (101602000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // WARNING! Some components were not used: ["r"] - fn retract_tip() -> Weight { - (82970000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn tip_new(r: u32, t: u32) -> Weight { - (63995000 as Weight) - .saturating_add((2000 as Weight).saturating_mul(r as Weight)) - .saturating_add((153000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn tip(t: u32) -> Weight { - (46765000 as Weight) - .saturating_add((711000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn close_tip(t: u32) -> Weight { - (160874000 as Weight) - .saturating_add((379000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn propose_bounty(d: u32) -> Weight { - (86198000 as Weight) - .saturating_add((1000 as Weight).saturating_mul(d as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn approve_bounty() -> Weight { - (23063000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn propose_curator() -> Weight { - (18890000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn unassign_curator() -> Weight { - (66768000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn accept_curator() -> Weight { - (69131000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn award_bounty() -> Weight { - (48184000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn claim_bounty() -> Weight { - (243104000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn close_bounty_proposed() -> Weight { - (65917000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn close_bounty_active() -> Weight { - (157232000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn extend_bounty_expiry() -> Weight { - (46216000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } fn on_initialize_proposals(p: u32) -> Weight { - (119765000 as Weight) - .saturating_add((108368000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) + (110_747_000 as Weight) + .saturating_add((69_650_000 as Weight).saturating_mul(p as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) } - fn on_initialize_bounties(b: u32) -> Weight { - (112536000 as Weight) - .saturating_add((107132000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight))) - } } \ No newline at end of file diff --git a/runtime/pangu/src/weights/pallet_utility.rs b/runtime/pangu/src/weights/pallet_utility.rs index a933621..0dd8b86 100644 --- a/runtime/pangu/src/weights/pallet_utility.rs +++ b/runtime/pangu/src/weights/pallet_utility.rs @@ -9,12 +9,14 @@ use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); -impl pallet_utility::WeightInfo for WeightInfo { +impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32) -> Weight { (18_450_000 as Weight).saturating_add((1_730_000 as Weight).saturating_mul(c as Weight)) } - // WARNING! Some components were not used: ["u"] fn as_derivative() -> Weight { - (5_360_000 as Weight) + (5_548_000 as Weight) + } + fn batch_all(c: u32) -> Weight { + (19_735_000 as Weight).saturating_add((1_990_000 as Weight).saturating_mul(c as Weight)) } } \ No newline at end of file diff --git a/runtime/pangu/types.json b/runtime/pangu/types.json index ec74fb6..9b3a66b 100644 --- a/runtime/pangu/types.json +++ b/runtime/pangu/types.json @@ -1,7 +1,14 @@ { "Keys": "SessionKeys2", - "Address": "AccountId", - "LookupSource": "AccountId", + "Address": "MultiAddress", + "LookupSource": "MultiAddress", + "AccountData": { + "free": "Balance", + "reserved": "Balance", + "misc_frozen": "Balance", + "fee_frozen": "Balance" + }, + "AccountInfo": "AccountInfoWithDualRefCount", "WorkId": "u32", "Id": "u32", "Name": "Vec",