From ada38b422d51f0b2f2c6ef8665682d2c0d422938 Mon Sep 17 00:00:00 2001 From: AlphaGamingArcade Date: Sat, 7 Dec 2024 17:53:41 +0800 Subject: [PATCH] message --- Cargo.lock | 515 ++++++++++++++++++++++++++--------- node/Cargo.toml | 1 + node/src/chain_spec.rs | 33 ++- primitives/aga/src/lib.rs | 5 +- runtime/Cargo.toml | 12 +- runtime/src/assets_config.rs | 4 +- runtime/src/lib.rs | 133 +++++++-- 7 files changed, 541 insertions(+), 162 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06eb506..3b8dea8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,6 +117,7 @@ name = "aga-node" version = "0.0.0" dependencies = [ "aga-runtime", + "bs58 0.5.1", "clap", "frame-benchmarking-cli", "frame-system", @@ -180,8 +181,10 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", + "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", + "pallet-asset-rate", "pallet-assets", "pallet-aura", "pallet-authorship", @@ -189,6 +192,8 @@ dependencies = [ "pallet-contracts", "pallet-grandpa", "pallet-insecure-randomness-collective-flip", + "pallet-node-authorization", + "pallet-session", "pallet-sudo", "pallet-template", "pallet-timestamp", @@ -213,6 +218,7 @@ dependencies = [ "sp-storage 19.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", "sp-transaction-pool", "sp-version", + "substrate-validator-set", "substrate-wasm-builder", ] @@ -349,7 +355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" dependencies = [ "include_dir", - "itertools", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", @@ -363,7 +369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", - "itertools", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", @@ -376,9 +382,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -388,9 +394,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" dependencies = [ "ark-bls12-377", - "ark-ec", + "ark-ec 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -399,10 +405,10 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -412,11 +418,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" dependencies = [ "ark-bls12-381", - "ark-ec", - "ark-ff", + "ark-ec 0.4.2", + "ark-ff 0.4.2", "ark-models-ext", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -426,9 +432,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" dependencies = [ "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -438,10 +444,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" dependencies = [ "ark-bw6-761", - "ark-ec", - "ark-ff", + "ark-ec 0.4.2", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -450,18 +456,39 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-poly 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", - "itertools", + "itertools 0.10.5", "num-traits", "rayon", "zeroize", ] +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash 0.8.7", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.2", + "itertools 0.13.0", + "num-bigint", + "num-integer", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ed-on-bls12-377" version = "0.4.0" @@ -469,9 +496,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" dependencies = [ "ark-bls12-377", - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -480,11 +507,11 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" dependencies = [ - "ark-ec", + "ark-ec 0.4.2", "ark-ed-on-bls12-377", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -494,9 +521,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" dependencies = [ "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -505,11 +532,11 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" dependencies = [ - "ark-ec", + "ark-ec 0.4.2", "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -518,13 +545,13 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", - "itertools", + "itertools 0.10.5", "num-bigint", "num-traits", "paste", @@ -532,6 +559,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint", + "num-traits", + "paste", + "zeroize", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -542,6 +589,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.89", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -555,16 +612,29 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "ark-models-ext" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", ] @@ -574,23 +644,38 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash 0.8.7", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.2", +] + [[package]] name = "ark-scale" version = "0.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "parity-scale-codec", "scale-info", ] @@ -600,11 +685,11 @@ name = "ark-secret-scalar" version = "0.0.2" source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ark-transcript 0.0.2", "digest 0.10.7", "getrandom_or_panic", "zeroize", @@ -616,8 +701,21 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive", - "ark-std", + "ark-serialize-derive 0.4.2", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive 0.5.0", + "ark-std 0.5.0", + "arrayvec", "digest 0.10.7", "num-bigint", ] @@ -633,6 +731,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -644,15 +753,24 @@ dependencies = [ "rayon", ] +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "ark-transcript" version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563084372d89271122bd743ef0a608179726f5fad0566008ba55bd0f756489b8" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "digest 0.10.7", "rand_core 0.6.4", "sha3", @@ -660,12 +778,12 @@ dependencies = [ [[package]] name = "ark-transcript" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +version = "0.0.3" +source = "git+https://github.com/w3f/ark-transcript#37a169f587f45d67e5afad143bc2a7c9c864884b" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "digest 0.10.7", "rand_core 0.6.4", "sha3", @@ -826,11 +944,11 @@ version = "0.0.4" source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", - "ark-ec", + "ark-ec 0.4.2", "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "dleq_vrf", "fflonk", "merlin", @@ -1046,9 +1164,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "tinyvec", ] @@ -1354,13 +1472,13 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" +source = "git+https://github.com/w3f/ring-proof#1eedf08d97effe1921f4aa2e926575088b068e2b" dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "fflonk", "getrandom_or_panic", "rand_core 0.6.4", @@ -1572,7 +1690,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -1957,13 +2075,13 @@ name = "dleq_vrf" version = "0.0.2" source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ - "ark-ec", - "ark-ff", + "ark-ec 0.4.2", + "ark-ff 0.4.2", "ark-scale", "ark-secret-scalar", - "ark-serialize", - "ark-std", - "ark-transcript 0.0.2 (git+https://github.com/w3f/ring-vrf?rev=e9782f9)", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ark-transcript 0.0.2", "arrayvec", "zeroize", ] @@ -2094,6 +2212,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "either" version = "1.9.0" @@ -2138,6 +2268,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "env_logger" version = "0.10.2" @@ -2262,14 +2412,14 @@ dependencies = [ [[package]] name = "fflonk" -version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +version = "0.1.1" +source = "git+https://github.com/w3f/fflonk#eda051ea3b80042e844a3ebd17c2f60536e6ee3f" dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", "merlin", ] @@ -2424,7 +2574,7 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", @@ -2561,7 +2711,7 @@ dependencies = [ "derive-syn-parse", "expander", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", @@ -3005,6 +3155,15 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", +] + [[package]] name = "hashlink" version = "0.8.4" @@ -3478,6 +3637,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -4997,6 +5165,21 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", ] +[[package]] +name = "pallet-asset-rate" +version = "7.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0#3c3d6fceb82372a3019b37117aa453d564b212de" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", +] + [[package]] name = "pallet-assets" version = "29.0.0" @@ -5150,6 +5333,22 @@ dependencies = [ "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", ] +[[package]] +name = "pallet-node-authorization" +version = "28.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0#3c3d6fceb82372a3019b37117aa453d564b212de" +dependencies = [ + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", +] + [[package]] name = "pallet-session" version = "28.0.0" @@ -5666,6 +5865,12 @@ dependencies = [ "log", ] +[[package]] +name = "polkavm-common" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0dbafef4ab6ceecb4982ac3b550df430ef4f9fdbf07c108b7d4f91a0682fce" + [[package]] name = "polkavm-derive" version = "0.5.0" @@ -5682,7 +5887,16 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae8c4bea6f3e11cd89bb18bcdddac10bd9a24015399bd1c485ad68a985a19606" dependencies = [ - "polkavm-derive-impl-macro", + "polkavm-derive-impl-macro 0.9.0", +] + +[[package]] +name = "polkavm-derive" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206caf322dfc02144510ad8360ff2051e5072f0874dcab3b410f78cdd52d0ebb" +dependencies = [ + "polkavm-derive-impl-macro 0.17.0", ] [[package]] @@ -5709,6 +5923,18 @@ dependencies = [ "syn 2.0.89", ] +[[package]] +name = "polkavm-derive-impl" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42565aed4adbc4034612d0b17dea8db3681fb1bd1aed040d6edc5455a9f478a1" +dependencies = [ + "polkavm-common 0.17.0", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "polkavm-derive-impl-macro" version = "0.9.0" @@ -5719,6 +5945,16 @@ dependencies = [ "syn 2.0.89", ] +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d9838e95241b0bce4fe269cdd4af96464160505840ed5a8ac8536119ba19e2" +dependencies = [ + "polkavm-derive-impl 0.17.0", + "syn 2.0.89", +] + [[package]] name = "polkavm-linker" version = "0.9.2" @@ -5803,7 +6039,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -5999,7 +6235,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck 0.4.1", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -6020,7 +6256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -6033,7 +6269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 2.0.89", @@ -6390,15 +6626,14 @@ dependencies = [ [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#652286c32f96beb9ce7f5793f5e2c2c923f63b73" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "ark-transcript 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec", +source = "git+https://github.com/w3f/ring-proof#1eedf08d97effe1921f4aa2e926575088b068e2b" +dependencies = [ + "ark-ec 0.5.0", + "ark-ff 0.5.0", + "ark-poly 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "ark-transcript 0.0.3", "blake2 0.10.6", "common", "fflonk", @@ -6811,7 +7046,7 @@ dependencies = [ "clap", "fdlimit", "futures", - "itertools", + "itertools 0.10.5", "libp2p-identity", "log", "names", @@ -8305,14 +8540,14 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", - "bs58 0.5.0", + "bs58 0.5.1", "dyn-clonable", "ed25519-zebra", "futures", "hash-db", "hash256-std-hasher", "impl-serde 0.4.0", - "itertools", + "itertools 0.10.5", "k256", "libsecp256k1", "log", @@ -8345,7 +8580,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.10.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -8353,7 +8588,7 @@ dependencies = [ "ark-bls12-381-ext", "ark-bw6-761", "ark-bw6-761-ext", - "ark-ec", + "ark-ec 0.4.2", "ark-ed-on-bls12-377", "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", @@ -8407,7 +8642,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "proc-macro2", "quote", @@ -8428,7 +8663,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.25.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "environmental", "parity-scale-codec", @@ -8615,12 +8850,12 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "24.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.9.1", + "polkavm-derive 0.17.1", "primitive-types 0.13.1", "sp-externalities 0.25.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-runtime-interface-proc-macro 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -8647,7 +8882,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "Inflector", "expander", @@ -8740,7 +8975,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0 [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" [[package]] name = "sp-storage" @@ -8758,7 +8993,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "19.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "impl-serde 0.5.0", "parity-scale-codec", @@ -8795,7 +9030,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "16.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "parity-scale-codec", "tracing", @@ -8895,7 +9130,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "20.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#2ef2723126584dfcd6d2a9272282ee78375dbcd3" +source = "git+https://github.com/paritytech/polkadot-sdk#526a440203d1ff96640c6163291e57e10c8e4f9b" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -9184,6 +9419,26 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "substrate-validator-set" +version = "1.1.0" +source = "git+https://github.com/gautamdhameja/substrate-validator-set?tag=polkadot-v1.9.0#2c5e00ca3fd99380978d653fd79c8635aeb84c0c" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.9.0)", + "sp-weights", +] + [[package]] name = "substrate-wasm-builder" version = "17.0.0" @@ -10014,10 +10269,10 @@ checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" dependencies = [ "ark-bls12-377", "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-serialize-derive", + "ark-ec 0.4.2", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-serialize-derive 0.4.2", "arrayref", "constcat", "digest 0.10.7", diff --git a/node/Cargo.toml b/node/Cargo.toml index 3f52f62..8f4070d 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -18,6 +18,7 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] +bs58 = { version = "0.5.1" } clap = { version = "4.5.3", features = ["derive"] } futures = { version = "0.3.30", features = ["thread-pool"] } serde_json = { version = "1.0.114", default-features = true } diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 31f0824..b3a0256 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -1,4 +1,4 @@ -use aga_runtime::{AccountId, RuntimeGenesisConfig, Signature, WASM_BINARY}; +use aga_runtime::{AccountId, RuntimeGenesisConfig, Signature, WASM_BINARY, opaque::SessionKeys}; use sc_service::ChainType; use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_consensus_grandpa::AuthorityId as GrandpaId; @@ -33,8 +33,19 @@ where } /// Generate an Aura authority key. -pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) { - (get_from_seed::(s), get_from_seed::(s)) +// pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) { +// (get_from_seed::(s), get_from_seed::(s)) +// } +fn session_keys(aura: AuraId, grandpa: GrandpaId) -> SessionKeys { + SessionKeys { aura, grandpa } +} + +pub fn authority_keys_from_seed(s: &str) -> (AccountId, AuraId, GrandpaId) { + ( + get_account_id_from_seed::(s), + get_from_seed::(s), + get_from_seed::(s) + ) } pub fn development_config() -> Result { @@ -97,7 +108,7 @@ pub fn local_testnet_config() -> Result { /// Configure initial storage state for FRAME modules. fn testnet_genesis( - initial_authorities: Vec<(AuraId, GrandpaId)>, + initial_authorities: Vec<(AccountId, AuraId, GrandpaId)>, root_key: AccountId, endowed_accounts: Vec, _enable_println: bool, @@ -107,15 +118,23 @@ fn testnet_genesis( // Configure endowed accounts with initial balance of 1 << 60. "balances": endowed_accounts.iter().cloned().map(|k| (k, 1u64 << 60)).collect::>(), }, + "validatorSet": { + "initialValidators": initial_authorities.iter().map(|x| (x.0.clone())).collect::>(), + }, + "session": { + "keys": initial_authorities.iter().map(|x| { + (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())) + }).collect::>(), + }, "aura": { - "authorities": initial_authorities.iter().map(|x| (x.0.clone())).collect::>(), + "authorities": [], }, "grandpa": { - "authorities": initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect::>(), + "authorities": [], }, "sudo": { // Assign network admin rights. "key": Some(root_key), - }, + } }) } \ No newline at end of file diff --git a/primitives/aga/src/lib.rs b/primitives/aga/src/lib.rs index 6bc2f6d..472dd74 100644 --- a/primitives/aga/src/lib.rs +++ b/primitives/aga/src/lib.rs @@ -29,4 +29,7 @@ pub enum TransferType { pub trait DecimalConverter { fn convert_to(amount: u128, decimal: u8) -> u128; fn convert_from(amount: u128, decimal: u8) -> u128; -} \ No newline at end of file +} + +/// Simple index type with which we can count sessions. +pub type SessionIndex = u32; diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index de4988b..a34aea6 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -48,9 +48,13 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk # asset conversion pallet-asset-conversion = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.9.0", default-features = false } pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.9.0", default-features = false } +pallet-asset-rate = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.9.0", default-features = false } # Validator management sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.9.0", default-features = false } +pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false, features = ['historical'] } +pallet-node-authorization = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false} +pallet-validator-set = { package = "substrate-validator-set", version = "1.1.0", git = "https://github.com/gautamdhameja/substrate-validator-set", tag = "polkadot-v1.9.0", default-features = false } # primitives hex-literal = { version = "0.4.1", default-features = false } @@ -70,7 +74,7 @@ sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "p sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false, features = [ "serde", ] } -sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false} sp-std = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } sp-storage = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } @@ -96,6 +100,8 @@ aga-bridge = { path = "../pallets/bridge", default-features = false} pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false } aga-primitives = { path = "../primitives/aga", default-features = false } +log = "0.4" + [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", optional = true } @@ -124,11 +130,15 @@ std = [ "pallet-transaction-payment/std", "pallet-asset-conversion/std", "pallet-asset-conversion-tx-payment/std", + "pallet-asset-rate/std", "pallet-assets/std", "pallet-authorship/std", "pallet-contracts/std", "pallet-utility/std", + "pallet-session/std", + "pallet-node-authorization/std", + "pallet-validator-set/std", "aga-access-segregator/std", "aga-bridge/std", diff --git a/runtime/src/assets_config.rs b/runtime/src/assets_config.rs index b4bef36..2f4181d 100644 --- a/runtime/src/assets_config.rs +++ b/runtime/src/assets_config.rs @@ -97,7 +97,7 @@ pub type NativeAndAssets = UnionOf::Balance; + type Balance = Balance; type HigherPrecisionBalance = u128; type AssetKind = NativeOrWithIdOf; type Assets = NativeAndAssets; @@ -109,7 +109,7 @@ impl pallet_asset_conversion::Config for Runtime { type PoolSetupFeeAsset = Native; type PoolSetupFeeTarget = ResolveAssetTo; type PalletId = AssetConversionPalletId; - type WeightInfo = (); + type WeightInfo = pallet_asset_conversion::weights::SubstrateWeight; type LPFee = ConstU32<3>; // means 0.3% type LiquidityWithdrawalFee = LiquidityWithdrawalFee; type MaxSwapPathLength = ConstU32<4>; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index e68fc60..c2a0872 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -13,7 +13,7 @@ use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, One, Verify}, + traits::{BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, One, Verify, OpaqueKeys}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, MultiSignature, }; @@ -33,7 +33,10 @@ use frame_support::{ }, genesis_builder_helper::{build_config, create_default_config}, }; -use frame_system::limits::{BlockLength, BlockWeights}; +use frame_system::{ + EnsureRoot, + limits::{BlockLength, BlockWeights} +}; pub use frame_support::{ construct_runtime, derive_impl, parameter_types, traits::{ @@ -41,6 +44,7 @@ pub use frame_support::{ StorageInfo, }, weights::{ + ConstantMultiplier, constants::{ BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND, }, @@ -109,15 +113,15 @@ pub mod opaque { // https://docs.substrate.io/main-docs/build/upgrade#runtime-versioning #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("aga-testnet"), - impl_name: create_runtime_str!("aga-testnet"), + spec_name: create_runtime_str!("aga"), + impl_name: create_runtime_str!("aga"), authoring_version: 1, // The version of the runtime specification. A full node will not attempt to use its native // runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 100, + spec_version: 103, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -263,7 +267,11 @@ impl frame_support::traits::FindAuthor for AuraAccountAdapter { fn find_author<'a, I>(digests: I) -> Option where I: 'a + IntoIterator { - pallet_aura::AuraAuthorId::::find_author(digests).and_then(|k| { + // for (id, data) in digests { + // log::info!("Digest: {:?}, Data: {:?}", id, data); + // } + + pallet_aura::AuraAuthorId::::find_author(digests).and_then(|k| { AccountId::try_from(k.as_ref()).ok() }) } @@ -316,13 +324,20 @@ where { fn on_nonzero_unbalanced(amount: NegativeImbalance) { if let Some(author) = >::author() { + log::info!("Fee credited to block author: {:?}", author); >::resolve_creating(&author, amount); + } else { + log::warn!("No block author found!"); } } } parameter_types! { + // pub const TransactionByteFee: Balance = 5 * MILLICENTS; pub FeeMultiplier: Multiplier = Multiplier::one(); + /// This value increases the priority of `Operational` transactions by adding + /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. + pub const OperationalFeeMultiplier: u8 = 5; } impl pallet_transaction_payment::Config for Runtime { @@ -334,6 +349,15 @@ impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = ConstFeeMultiplier; } +// impl pallet_transaction_payment::Config for Runtime { +// type RuntimeEvent = RuntimeEvent; +// type OnChargeTransaction = CurrencyAdapter>; +// type OperationalFeeMultiplier = OperationalFeeMultiplier; +// type WeightToFee = IdentityFee; +// type LengthToFee = ConstantMultiplier; +// type FeeMultiplierUpdate = ConstFeeMultiplier; +// } + impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -415,25 +439,92 @@ impl aga_bridge::Config for Runtime { type WeightInfo = aga_bridge::weights::SubstrateWeight; } + +impl pallet_asset_rate::Config for Runtime { + type WeightInfo = pallet_asset_rate::weights::SubstrateWeight; + type RuntimeEvent = RuntimeEvent; + type CreateOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type Currency = Balances; + type AssetKind = u32; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = runtime_common::impls::benchmarks::AssetRateArguments; +} + +parameter_types! { + pub const MaxWellKnownNodes: u32 = 8; + pub const MaxPeerIdLength: u32 = 128; +} + +impl pallet_node_authorization::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type MaxWellKnownNodes = MaxWellKnownNodes; + type MaxPeerIdLength = MaxPeerIdLength; + type AddOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type SwapOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type WeightInfo = (); +} + +parameter_types! { + pub const MinAuthorities: u32 = 2; +} + +impl pallet_validator_set::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AddRemoveOrigin = EnsureRoot; + type MinAuthorities = MinAuthorities; + type WeightInfo = pallet_validator_set::weights::SubstrateWeight; +} + +parameter_types! { + pub const Period: u32 = 2 * MINUTES; + pub const Offset: u32 = 0; +} + +impl pallet_session::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + type ValidatorIdOf = pallet_validator_set::ValidatorOf; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = ValidatorSet; + type SessionHandler = ::KeyTypeIdProviders; + type Keys = opaque::SessionKeys; + type WeightInfo = pallet_session::weights::SubstrateWeight; +} + +impl pallet_session::historical::Config for Runtime { + type FullIdentification = Self::ValidatorId; + type FullIdentificationOf = Self::ValidatorIdOf; +} + construct_runtime!( pub enum Runtime { System: frame_system = 0, Timestamp: pallet_timestamp = 1, - Aura: pallet_aura = 2, - Grandpa: pallet_grandpa = 3, - Balances: pallet_balances = 4, - TransactionPayment: pallet_transaction_payment = 5, - Sudo: pallet_sudo = 6, - TemplateModule: pallet_template = 7, - Assets: pallet_assets:: = 8, - PoolAssets: pallet_assets:: = 9, - AssetConversion: pallet_asset_conversion = 10, - RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 11, - Utility: pallet_utility = 12, - Authorship: pallet_authorship = 13, - Contracts: pallet_contracts = 14, - AgaAccessSegregator: aga_access_segregator = 15, - AgaBridge: aga_bridge = 16 + Balances: pallet_balances = 2, + ValidatorSet: pallet_validator_set = 3, + Session: pallet_session = 4, + Aura: pallet_aura = 5, + Historical: pallet_session::historical = 6, + Grandpa: pallet_grandpa = 7, + TransactionPayment: pallet_transaction_payment = 8, + Sudo: pallet_sudo = 9, + TemplateModule: pallet_template = 10, + Assets: pallet_assets:: = 11, + PoolAssets: pallet_assets:: = 12, + AssetConversion: pallet_asset_conversion = 13, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 14, + Utility: pallet_utility = 15, + Authorship: pallet_authorship = 16, + Contracts: pallet_contracts = 17, + AgaAccessSegregator: aga_access_segregator = 18, + AgaBridge: aga_bridge = 19, + AssetRate: pallet_asset_rate = 20, + NodeAuthorization: pallet_node_authorization = 21 } );