From 1f396d7a1b2c324dffa738693901f9a4ece1f857 Mon Sep 17 00:00:00 2001 From: mraszyk <31483726+mraszyk@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:40:59 +0200 Subject: [PATCH] chore: add nns list proposals benchmark (#541) * chore: add nns list proposals benchmark * add 1000 proposals * fix * fix --------- Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> --- rust/bench/Cargo.lock | 257 +++++++++++++------------------------- rust/bench/bench.rs | 39 ++++++ rust/bench/nns.rs | 280 +++++++++++++++++++++--------------------- 3 files changed, 267 insertions(+), 309 deletions(-) diff --git a/rust/bench/Cargo.lock b/rust/bench/Cargo.lock index f4e2c86a..9d3c9add 100644 --- a/rust/bench/Cargo.lock +++ b/rust/bench/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arbitrary" @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "beef" @@ -109,9 +109,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "block-buffer" @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "candid" -version = "0.10.4" +version = "0.10.6" dependencies = [ "anyhow", "binread", @@ -179,7 +179,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.58", ] [[package]] @@ -201,12 +201,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" [[package]] name = "cfg-if" @@ -273,12 +270,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" version = "0.10.7" @@ -355,9 +346,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -370,12 +361,6 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -[[package]] -name = "hermit-abi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" - [[package]] name = "hex" version = "0.4.3" @@ -429,64 +414,52 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", ] -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] [[package]] name = "lalrpop" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", "itertools", "lalrpop-util", "petgraph", "pico-args", "regex", - "regex-syntax 0.7.5", + "regex-syntax 0.8.3", "string_cache", "term", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata", ] [[package]] @@ -509,13 +482,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", - "redox_syscall", ] [[package]] @@ -530,9 +502,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "logos" @@ -554,7 +526,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.49", + "syn 2.0.58", ] [[package]] @@ -568,15 +540,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "num-bigint" @@ -634,7 +606,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -687,9 +659,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -723,9 +695,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -734,25 +706,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -763,21 +735,24 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "rustversion" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] -name = "rustversion" -version = "1.0.14" +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "scopeguard" @@ -787,9 +762,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -805,13 +780,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.58", ] [[package]] @@ -844,9 +819,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "stacker" @@ -887,9 +862,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.49" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2", "quote", @@ -918,22 +893,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.58", ] [[package]] @@ -987,6 +962,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1024,43 +1009,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - [[package]] name = "windows-targets" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -1069,80 +1030,38 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/rust/bench/bench.rs b/rust/bench/bench.rs index 43b2a4c8..b92c9d31 100644 --- a/rust/bench/bench.rs +++ b/rust/bench/bench.rs @@ -228,6 +228,45 @@ fn nns() -> BenchResult { }) } +#[bench(raw)] +fn nns_list_proposal() -> BenchResult { + use crate::nns::{ListProposalInfoResponse, ProposalInfo}; + let mut config = DecoderConfig::new(); + config.set_decoding_quota(COST).set_skipping_quota(SKIP); + let proposal = ProposalInfo { + id: None, + status: 42, + topic: 42, + failure_reason: None, + ballots: vec![], + proposal_timestamp_seconds: 42, + reward_event_round: 42, + deadline_timestamp_seconds: Some(42), + failed_timestamp_seconds: 42, + reject_cost_e8s: 42, + derived_proposal_information: None, + latest_tally: None, + reward_status: 42, + decided_timestamp_seconds: 42, + proposal: None, + proposer: None, + executed_timestamp_seconds: 42, + }; + let list_proposals_info_response = ListProposalInfoResponse { + proposal_info: std::iter::repeat(proposal).take(1000).collect(), + }; + bench_fn(|| { + let bytes = { + let _p = bench_scope("1. Encoding"); + Encode!(&list_proposals_info_response).unwrap() + }; + { + let _p = bench_scope("2. Decoding"); + Decode!([config]; &bytes, ListProposalInfoResponse).unwrap(); + } + }) +} + #[bench(raw)] fn extra_args() -> BenchResult { let mut config = DecoderConfig::new(); diff --git a/rust/bench/nns.rs b/rust/bench/nns.rs index 740f376a..ccacfadc 100644 --- a/rust/bench/nns.rs +++ b/rust/bench/nns.rs @@ -4,90 +4,90 @@ use candid::{self, CandidType, Decode, Deserialize, Encode, Principal}; use ic_cdk::api::call::CallResult as Result; -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronId { pub id: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Followees { pub followees: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct KnownNeuronData { pub name: String, pub description: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct KnownNeuron { pub id: Option, pub known_neuron_data: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Spawn { pub percentage_to_spawn: Option, pub new_controller: Option, pub nonce: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Split { pub amount_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Follow { pub topic: i32, pub followees: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ClaimOrRefreshNeuronFromAccount { pub controller: Option, pub memo: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum By { NeuronIdOrSubaccount {}, MemoAndController(ClaimOrRefreshNeuronFromAccount), Memo(u64), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ClaimOrRefresh { pub by: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RemoveHotKey { pub hot_key_to_remove: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct AddHotKey { pub new_hot_key: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ChangeAutoStakeMaturity { pub requested_setting_for_auto_stake_maturity: bool, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct IncreaseDissolveDelay { pub additional_dissolve_delay_seconds: u32, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SetDissolveTimestamp { pub dissolve_timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Operation { RemoveHotKey(RemoveHotKey), AddHotKey(AddHotKey), @@ -100,23 +100,23 @@ pub enum Operation { SetDissolveTimestamp(SetDissolveTimestamp), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Configure { pub operation: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RegisterVote { pub vote: i32, pub proposal: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Merge { pub source_neuron_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct DisburseToNeuron { pub dissolve_delay_seconds: u64, pub kyc_verified: bool, @@ -125,33 +125,33 @@ pub struct DisburseToNeuron { pub nonce: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct StakeMaturity { pub percentage_to_stake: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MergeMaturity { pub percentage_to_merge: u32, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct AccountIdentifier { pub hash: serde_bytes::ByteBuf, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Amount { pub e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Disburse { pub to_account: Option, pub amount: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Command { Spawn(Spawn), Split(Split), @@ -167,42 +167,42 @@ pub enum Command { Disburse(Disburse), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum NeuronIdOrSubaccount { Subaccount(serde_bytes::ByteBuf), NeuronId(NeuronId), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ManageNeuron { pub id: Option, pub command: Option, pub neuron_id_or_subaccount: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Percentage { pub basis_points: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Duration { pub seconds: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Tokens { pub e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct VotingRewardParameters { pub reward_rate_transition_duration: Option, pub initial_reward_rate: Option, pub final_reward_rate: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GovernanceParameters { pub neuron_maximum_dissolve_delay_bonus: Option, pub neuron_maximum_age_for_age_bonus: Option, @@ -216,12 +216,12 @@ pub struct GovernanceParameters { pub voting_reward_parameters: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Image { pub base64_encoding: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct LedgerParameters { pub transaction_fee: Option, pub token_symbol: Option, @@ -229,28 +229,28 @@ pub struct LedgerParameters { pub token_name: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Canister { pub id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronBasketConstructionParameters { pub dissolve_delay_interval: Option, pub count: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GlobalTimeOfDay { pub seconds_after_utc_midnight: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Countries { pub iso_codes: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SwapParameters { pub minimum_participants: Option, pub neurons_fund_participation: Option, @@ -268,12 +268,12 @@ pub struct SwapParameters { pub restricted_countries: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SwapDistribution { pub total: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronDistribution { pub controller: Option, pub dissolve_delay: Option, @@ -282,19 +282,19 @@ pub struct NeuronDistribution { pub stake: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct DeveloperDistribution { pub developer_neurons: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct InitialTokenDistribution { pub treasury_distribution: Option, pub developer_distribution: Option, pub swap_distribution: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct CreateServiceNervousSystem { pub url: Option, pub governance_parameters: Option, @@ -308,48 +308,48 @@ pub struct CreateServiceNervousSystem { pub initial_token_distribution: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ExecuteNnsFunction { pub nns_function: i32, pub payload: serde_bytes::ByteBuf, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NodeProvider { pub id: Option, pub reward_account: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RewardToNeuron { pub dissolve_delay_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RewardToAccount { pub to_account: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum RewardMode { RewardToNeuron(RewardToNeuron), RewardToAccount(RewardToAccount), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RewardNodeProvider { pub node_provider: Option, pub reward_mode: Option, pub amount_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronBasketConstructionParameters1 { pub dissolve_delay_interval_seconds: u64, pub count: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Params { pub min_participant_icp_e8s: u64, pub neuron_basket_construction_parameters: Option, @@ -364,42 +364,42 @@ pub struct Params { pub max_direct_participation_icp_e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct OpenSnsTokenSwap { pub community_fund_investment_e8s: Option, pub target_swap_canister_id: Option, pub params: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct TimeWindow { pub start_timestamp_seconds: u64, pub end_timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SetOpenTimeWindowRequest { pub open_time_window: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SetSnsTokenSwapOpenTimeWindow { pub request: Option, pub swap_canister_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SetDefaultFollowees { pub default_followees: Vec<(i32, Followees)>, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RewardNodeProviders { pub use_registry_derived_rewards: Option, pub rewards: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NetworkEconomics { pub neuron_minimum_stake_e8s: u64, pub max_proposals_to_keep_per_topic: u32, @@ -411,28 +411,28 @@ pub struct NetworkEconomics { pub maximum_node_provider_rewards_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ApproveGenesisKyc { pub principals: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Change { ToRemove(NodeProvider), ToAdd(NodeProvider), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct AddOrRemoveNodeProvider { pub change: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Motion { pub motion_text: String, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Action { RegisterKnownNeuron(KnownNeuron), ManageNeuron(ManageNeuron), @@ -449,7 +449,7 @@ pub enum Action { Motion(Motion), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Proposal { pub url: String, pub title: Option, @@ -457,20 +457,20 @@ pub struct Proposal { pub summary: String, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MakingSnsProposal { pub proposal: Option>, pub caller: Option, pub proposer_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MostRecentMonthlyNodeProviderRewards { pub timestamp: u64, pub rewards: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GovernanceCachedMetrics { pub total_maturity_e8s_equivalent: u64, pub not_dissolving_neurons_e8s_buckets: Vec<(u64, f64)>, @@ -509,7 +509,7 @@ pub struct GovernanceCachedMetrics { pub seed_neuron_count: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct RewardEvent { pub rounds_since_last_distribution: Option, pub day_after_genesis: u64, @@ -520,7 +520,7 @@ pub struct RewardEvent { pub settled_proposals: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronStakeTransfer { pub to_subaccount: serde_bytes::ByteBuf, pub neuron_stake_e8s: u64, @@ -531,60 +531,60 @@ pub struct NeuronStakeTransfer { pub block_height: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Followers { pub followers: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct FollowersMap { pub followers_map: Vec<(u64, Followers)>, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Progress { LastNeuronId(NeuronId), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Migration { pub status: Option, pub failure_reason: Option, pub progress: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Migrations { pub neuron_indexes_migration: Option, pub copy_inactive_neurons_to_stable_memory_migration: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GovernanceError { pub error_message: String, pub error_type: i32, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct CfNeuron { pub has_created_neuron_recipes: Option, pub nns_neuron_id: u64, pub amount_icp_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct CfParticipant { pub hotkey_principal: String, pub cf_neurons: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Ballot { pub vote: i32, pub voting_power: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SwapParticipationLimits { pub min_participant_icp_e8s: Option, pub max_participant_icp_e8s: Option, @@ -592,7 +592,7 @@ pub struct SwapParticipationLimits { pub max_direct_participation_icp_e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundNeuronPortion { pub hotkey_principal: Option, pub is_capped: Option, @@ -601,17 +601,17 @@ pub struct NeuronsFundNeuronPortion { pub amount_icp_e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundSnapshot { pub neurons_fund_neuron_portions: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct IdealMatchedParticipationFunction { pub serialized_representation: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundParticipation { pub total_maturity_equivalent_icp_e8s: Option, pub intended_neurons_fund_participation_icp_e8s: Option, @@ -623,14 +623,14 @@ pub struct NeuronsFundParticipation { pub allocated_neurons_fund_participation_icp_e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundData { pub final_neurons_fund_participation: Option, pub initial_neurons_fund_participation: Option, pub neurons_fund_refunds: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct CanisterStatusResultV2 { pub status: Option, pub freezing_threshold: Option, @@ -641,13 +641,13 @@ pub struct CanisterStatusResultV2 { pub module_hash: serde_bytes::ByteBuf, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct CanisterSummary { pub status: Option, pub canister_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SwapBackgroundInformation { pub ledger_index_canister_summary: Option, pub fallback_controller_principal_ids: Vec, @@ -659,12 +659,12 @@ pub struct SwapBackgroundInformation { pub dapp_canister_summaries: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct DerivedProposalInformation { pub swap_background_information: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Tally { pub no: u64, pub yes: u64, @@ -672,12 +672,12 @@ pub struct Tally { pub timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct WaitForQuietState { pub current_deadline_timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ProposalData { pub id: Option, pub failure_reason: Option, @@ -699,7 +699,7 @@ pub struct ProposalData { pub original_total_community_fund_maturity_e8s_equivalent: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Command2 { Spawn(NeuronId), Split(Split), @@ -712,25 +712,25 @@ pub enum Command2 { Disburse(Disburse), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronInFlightCommand { pub command: Option, pub timestamp: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct BallotInfo { pub vote: i32, pub proposal_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum DissolveState { DissolveDelaySeconds(u64), WhenDissolvedTimestampSeconds(u64), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Neuron { pub id: Option, pub staked_maturity_e8s_equivalent: Option, @@ -755,7 +755,7 @@ pub struct Neuron { pub spawn_at_timestamp_seconds: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Governance { pub default_followees: Vec<(i32, Followees)>, pub making_sns_proposal: Option, @@ -779,42 +779,42 @@ pub struct Governance { pub genesis_timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result_ { Ok, Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result1 { Error(GovernanceError), NeuronId(NeuronId), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ClaimOrRefreshNeuronFromAccountResponse { pub result: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result2 { Ok(Neuron), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result3 { Ok(GovernanceCachedMetrics), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result4 { Ok(RewardNodeProviders), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronInfo { pub dissolve_delay_seconds: u64, pub recent_ballots: Vec, @@ -829,47 +829,47 @@ pub struct NeuronInfo { pub age_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result5 { Ok(NeuronInfo), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GetNeuronsFundAuditInfoRequest { pub nns_proposal_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundAuditInfo { pub final_neurons_fund_participation: Option, pub initial_neurons_fund_participation: Option, pub neurons_fund_refunds: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Ok { pub neurons_fund_audit_info: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result6 { Ok(Ok), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct GetNeuronsFundAuditInfoResponse { pub result: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result7 { Ok(NodeProvider), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ProposalInfo { pub id: Option, pub status: i32, @@ -890,29 +890,29 @@ pub struct ProposalInfo { pub executed_timestamp_seconds: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListKnownNeuronsResponse { pub known_neurons: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListNeurons { pub neuron_ids: Vec, pub include_neurons_readable_by_caller: bool, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListNeuronsResponse { pub neuron_infos: Vec<(u64, NeuronInfo)>, pub full_neurons: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListNodeProvidersResponse { pub node_providers: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListProposalInfo { pub include_reward_status: Vec, pub omit_large_fields: Option, @@ -923,22 +923,22 @@ pub struct ListProposalInfo { pub include_status: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ListProposalInfoResponse { pub proposal_info: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SpawnResponse { pub created_neuron_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ClaimOrRefreshResponse { pub refreshed_neuron_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MergeResponse { pub target_neuron: Option, pub source_neuron: Option, @@ -946,30 +946,30 @@ pub struct MergeResponse { pub source_neuron_info: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MakeProposalResponse { pub message: Option, pub proposal_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct StakeMaturityResponse { pub maturity_e8s: u64, pub staked_maturity_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct MergeMaturityResponse { pub merged_maturity_e8s: u64, pub new_stake_e8s: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct DisburseResponse { pub transfer_block_height: u64, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Command1 { Error(GovernanceError), Spawn(SpawnResponse), @@ -986,50 +986,50 @@ pub enum Command1 { Disburse(DisburseResponse), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct ManageNeuronResponse { pub command: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Committed { pub total_direct_contribution_icp_e8s: Option, pub total_neurons_fund_contribution_icp_e8s: Option, pub sns_governance_canister_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result8 { Committed(Committed), Aborted {}, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SettleCommunityFundParticipation { pub result: Option, pub open_sns_token_swap_proposal_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Committed1 { pub total_direct_participation_icp_e8s: Option, pub total_neurons_fund_participation_icp_e8s: Option, pub sns_governance_canister_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result9 { Committed(Committed1), Aborted {}, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SettleNeuronsFundParticipationRequest { pub result: Option, pub nns_proposal_id: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct NeuronsFundNeuron { pub hotkey_principal: Option, pub is_capped: Option, @@ -1037,23 +1037,23 @@ pub struct NeuronsFundNeuron { pub amount_icp_e8s: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct Ok1 { pub neurons_fund_neuron_portions: Vec, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub enum Result10 { Ok(Ok1), Err(GovernanceError), } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct SettleNeuronsFundParticipationResponse { pub result: Option, } -#[derive(CandidType, Deserialize)] +#[derive(CandidType, Deserialize, Clone)] pub struct UpdateNodeProvider { pub reward_account: Option, }