From 5a4b005d55e095faa95f0a9633b9441208d39466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Mon, 25 Mar 2024 15:06:37 +0100 Subject: [PATCH 01/11] Add support for the new speculative execution results --- Cargo.lock | 184 +++++++++++++---------- Cargo.toml | 7 +- event_sidecar/Cargo.toml | 10 +- listener/Cargo.toml | 5 +- rpc_sidecar/Cargo.toml | 11 +- rpc_sidecar/src/node_client.rs | 50 +++--- rpc_sidecar/src/rpcs/chain.rs | 2 +- rpc_sidecar/src/rpcs/common.rs | 9 +- rpc_sidecar/src/rpcs/info.rs | 7 +- rpc_sidecar/src/rpcs/speculative_exec.rs | 19 +-- rpc_sidecar/src/testing/mod.rs | 7 +- types/Cargo.toml | 5 +- types/src/sse_data.rs | 6 +- 13 files changed, 178 insertions(+), 144 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b342f95..50e1cbd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,9 +55,9 @@ dependencies = [ [[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", ] @@ -167,9 +167,9 @@ checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arc-swap" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "archiver-rs" @@ -239,18 +239,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -290,9 +290,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -371,9 +371,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" dependencies = [ "serde", ] @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -468,7 +468,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -479,9 +479,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2" @@ -504,6 +504,20 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "casper-binary-port" +version = "1.0.0" +dependencies = [ + "bincode", + "casper-types", + "once_cell", + "schemars", + "serde", + "serde-map-to-array", + "thiserror", + "tracing", +] + [[package]] name = "casper-event-listener" version = "1.0.0" @@ -553,7 +567,7 @@ dependencies = [ "hex_fmt", "http", "hyper", - "indexmap 2.2.5", + "indexmap 2.2.6", "itertools 0.10.5", "jsonschema", "metrics", @@ -631,6 +645,7 @@ dependencies = [ "base16", "bincode", "bytes", + "casper-binary-port", "casper-json-rpc", "casper-types", "datasize", @@ -669,7 +684,7 @@ dependencies = [ "casper-event-sidecar", "casper-event-types", "casper-rpc-sidecar", - "clap 4.5.2", + "clap 4.5.3", "datasize", "derive-new 0.6.0", "futures", @@ -686,7 +701,6 @@ dependencies = [ [[package]] name = "casper-types" version = "3.0.0" -source = "git+https://github.com/casper-network/casper-node?branch=feat-2.0#35ed022327bdde7e7297b348023d89466f6b7fd2" dependencies = [ "base16", "base64 0.13.1", @@ -770,9 +784,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.2" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -792,14 +806,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.0" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -985,7 +999,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1055,7 +1069,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1320,9 +1334,9 @@ checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "ff" @@ -1336,9 +1350,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "filetime" @@ -1497,7 +1511,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1676,7 +1690,7 @@ version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbd06203b1a9b33a78c88252a625031b094d9e1b647260070c25b09910c0a804" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bstr", "gix-path", "libc", @@ -1755,7 +1769,7 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae6232f18b262770e343dcdd461c0011c9b9ae27f0c805e115012aa2b902c1b8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bstr", "gix-features", "gix-path", @@ -1788,7 +1802,7 @@ version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e50e63df6c8d4137f7fb882f27643b3a9756c468a1a2cdbe1ce443010ca8778" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bstr", "btoi", "filetime", @@ -1802,7 +1816,7 @@ dependencies = [ "itoa", "libc", "memmap2", - "rustix 0.38.31", + "rustix 0.38.32", "smallvec", "thiserror", ] @@ -1826,7 +1840,7 @@ checksum = "1dff438f14e67e7713ab9332f5fd18c8f20eb7eb249494f6c2bf170522224032" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -1983,7 +1997,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fddc27984a643b20dd03e97790555804f98cf07404e0e552c0ad8133266a79a1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "gix-path", "libc", "windows-sys 0.52.0", @@ -2073,9 +2087,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -2083,7 +2097,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2157,6 +2171,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2321,9 +2341,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -2338,7 +2358,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -2437,7 +2457,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "bytecount", - "clap 4.5.2", + "clap 4.5.3", "fancy-regex", "fraction", "getrandom", @@ -2514,7 +2534,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", "redox_syscall 0.4.1", ] @@ -2891,7 +2911,7 @@ version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -2908,7 +2928,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3102,7 +3122,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3279,7 +3299,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.2", + "bitflags 2.5.0", "lazy_static", "num-traits", "rand", @@ -3411,9 +3431,9 @@ 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", @@ -3455,9 +3475,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.26" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -3575,7 +3595,7 @@ dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", "rust-embed-utils", - "syn 2.0.52", + "syn 2.0.55", "walkdir", ] @@ -3620,11 +3640,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys 0.4.13", @@ -3760,7 +3780,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", "thiserror", ] @@ -3842,7 +3862,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -3862,7 +3882,7 @@ version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -3963,9 +3983,9 @@ dependencies = [ [[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 = "socket2" @@ -4110,7 +4130,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.2.5", + "indexmap 2.2.6", "log", "memchr", "native-tls", @@ -4195,7 +4215,7 @@ checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" dependencies = [ "atoi 2.0.0", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "bytes", "crc", @@ -4237,7 +4257,7 @@ checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" dependencies = [ "atoi 2.0.0", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "crc", "dotenvy", @@ -4395,7 +4415,7 @@ dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", "rustversion", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4428,9 +4448,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", @@ -4508,7 +4528,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "rustix 0.38.31", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -4547,7 +4567,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4655,7 +4675,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4774,7 +4794,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -4985,7 +5005,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "272ebdfbc99111033031d2f10e018836056e4d2c8e2acda76450ec7974269fa7" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_json", "utoipa-gen", @@ -5000,7 +5020,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] @@ -5020,9 +5040,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" [[package]] name = "valuable" @@ -5175,7 +5195,7 @@ dependencies = [ "once_cell", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -5209,7 +5229,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5535,7 +5555,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.13", - "rustix 0.38.31", + "rustix 0.38.32", ] [[package]] @@ -5570,7 +5590,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.52", + "syn 2.0.55", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 474afcca..46b37053 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,14 +7,17 @@ members = [ "metrics", "rpc_sidecar", "sidecar", - "types" + "types", ] [workspace.dependencies] anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" -casper-types = { git = "https://github.com/casper-network/casper-node", branch="feat-2.0" } + +#casper-types = { git = "https://github.com/casper-network/casper-node", branch="feat-2.0" } +casper-types = { path = "../../casper-node/types" } + casper-event-sidecar = { path = "./event_sidecar", version = "1.0.0" } casper-event-types = { path = "./types", version = "1.0.0" } casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" } diff --git a/event_sidecar/Cargo.toml b/event_sidecar/Cargo.toml index f122706c..3b562cc0 100644 --- a/event_sidecar/Cargo.toml +++ b/event_sidecar/Cargo.toml @@ -20,7 +20,10 @@ async-trait = "0.1.56" bytes = "1.2.0" casper-event-listener = { path = "../listener", version = "1.0.0" } casper-event-types.workspace = true -casper-types = { workspace = true, features = ["std", "json-schema"] } + +#casper-types = { workspace = true, features = ["std", "json-schema"] } +casper-types = { path = "../../casper-node/types" } + derive-new = "0.5.9" eventsource-stream = "0.2.3" futures = { workspace = true } @@ -55,7 +58,10 @@ wheelbuf = "0.2.0" [dev-dependencies] async-stream = { workspace = true } casper-event-types = { workspace = true, features = ["sse-data-testing"] } -casper-types = { workspace = true, features = ["std", "testing"] } + +#casper-types = { workspace = true, features = ["std", "testing"] } +casper-types = { path = "../../casper-node/types" } + colored = "2.0.0" futures-util = { workspace = true } once_cell = { workspace = true } diff --git a/listener/Cargo.toml b/listener/Cargo.toml index 5dd2dab5..2f199036 100644 --- a/listener/Cargo.toml +++ b/listener/Cargo.toml @@ -14,7 +14,10 @@ async-stream = { workspace = true } async-trait = { workspace = true } bytes = "1.2.0" casper-event-types.workspace = true -casper-types = { workspace = true, features = ["std"] } + +#casper-types = { workspace = true, features = ["std"] } +casper-types = { path = "../../casper-node/types" } + eventsource-stream = "0.2.3" futures = { workspace = true } futures-util = { workspace = true } diff --git a/rpc_sidecar/Cargo.toml b/rpc_sidecar/Cargo.toml index c19f45ec..7e185c73 100644 --- a/rpc_sidecar/Cargo.toml +++ b/rpc_sidecar/Cargo.toml @@ -18,7 +18,11 @@ base16 = "0.2.1" bincode = "1" bytes = "1.5.0" casper-json-rpc = { version = "1.0.0", path = "../json_rpc" } -casper-types = { workspace = true, features = ["datasize", "json-schema", "std"] } + +#casper-types = { workspace = true, features = ["datasize", "json-schema", "std"] } +casper-types = { path = "../../casper-node/types" } +casper-binary-port = { path = "../../casper-node/binary_port" } + datasize = { workspace = true, features = ["detailed", "fake_clock-types"] } futures = { workspace = true } http = "0.2.1" @@ -42,7 +46,10 @@ warp = { version = "0.3.6", features = ["compression"] } [dev-dependencies] assert-json-diff = "2" -casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } + +#casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } +casper-types = { path = "../../casper-node/types" } + pretty_assertions = "0.7.2" regex = "1" tempfile = "3" diff --git a/rpc_sidecar/src/node_client.rs b/rpc_sidecar/src/node_client.rs index cd7a2eee..5bec2db3 100644 --- a/rpc_sidecar/src/node_client.rs +++ b/rpc_sidecar/src/node_client.rs @@ -1,5 +1,11 @@ use anyhow::Error as AnyhowError; use async_trait::async_trait; +use casper_binary_port::{ + BinaryRequest, BinaryRequestHeader, BinaryResponse, BinaryResponseAndRequest, + ConsensusValidatorChanges, ErrorCode, GetRequest, GetTrieFullResult, GlobalStateQueryResult, + GlobalStateRequest, InformationRequest, NodeStatus, PayloadEntity, RecordId, + SpeculativeExecutionResult, TransactionWithExecutionInfo, +}; use serde::de::DeserializeOwned; use std::{ convert::{TryFrom, TryInto}, @@ -11,12 +17,6 @@ use std::{ use crate::{config::ExponentialBackoffConfig, NodeClientConfig, SUPPORTED_PROTOCOL_VERSION}; use casper_types::{ - binary_port::{ - BinaryRequest, BinaryRequestHeader, BinaryResponse, BinaryResponseAndRequest, - ConsensusValidatorChanges, ErrorCode as BinaryPortError, GetRequest, GetTrieFullResult, - GlobalStateQueryResult, GlobalStateRequest, InformationRequest, NodeStatus, PayloadEntity, - RecordId, SpeculativeExecutionResult, TransactionWithExecutionInfo, - }, bytesrepr::{self, FromBytes, ToBytes}, AvailableBlockRange, BlockHash, BlockHeader, BlockIdentifier, ChainspecRawBytes, Digest, GlobalStateIdentifier, Key, KeyTag, Peers, ProtocolVersion, SignedBlock, StoredValue, @@ -118,13 +118,7 @@ pub trait NodeClient: Send + Sync { transaction: Transaction, exec_at_block: BlockHeader, ) -> Result { - let request = BinaryRequest::TrySpeculativeExec { - transaction, - state_root_hash, - block_time, - protocol_version, - speculative_exec_at_block: exec_at_block, - }; + let request = BinaryRequest::TrySpeculativeExec { transaction }; let resp = self.send_request(request).await?; parse_response::(&resp.into())?.ok_or(Error::EmptyEnvelope) } @@ -196,14 +190,19 @@ pub trait NodeClient: Send + Sync { } async fn read_latest_switch_block_header(&self) -> Result, Error> { - let resp = self - .read_info(InformationRequest::LatestSwitchBlockHeader) - .await?; - parse_response::(&resp.into()) + Ok(None) + + // TODO[RC]: Align with the recently added `LatestSwitchBlockHeader` + + // let resp = self + // .read_info(InformationRequest::LatestSwitchBlockHeader) + // .await?; + // parse_response::(&resp.into()) } async fn read_node_status(&self) -> Result { let resp = self.read_info(InformationRequest::NodeStatus).await?; + error!("XXXXX - resp - {resp:?}"); parse_response::(&resp.into())?.ok_or(Error::EmptyEnvelope) } } @@ -242,15 +241,14 @@ pub enum Error { impl Error { fn from_error_code(code: u8) -> Self { - match BinaryPortError::try_from(code) { - Ok(BinaryPortError::FunctionDisabled) => Self::FunctionIsDisabled, - Ok(BinaryPortError::InvalidTransaction) => Self::InvalidTransaction, - Ok(BinaryPortError::RootNotFound) => Self::UnknownStateRootHash, - Ok(BinaryPortError::QueryFailedToExecute) => Self::QueryFailedToExecute, - Ok( - err @ (BinaryPortError::WasmPreprocessing - | BinaryPortError::InvalidDeployItemVariant), - ) => Self::SpecExecutionFailed(err.to_string()), + match ErrorCode::try_from(code) { + Ok(ErrorCode::FunctionDisabled) => Self::FunctionIsDisabled, + Ok(ErrorCode::InvalidTransaction) => Self::InvalidTransaction, + Ok(ErrorCode::RootNotFound) => Self::UnknownStateRootHash, + Ok(ErrorCode::FailedQuery) => Self::QueryFailedToExecute, + Ok(err @ (ErrorCode::WasmPreprocessing | ErrorCode::InvalidItemVariant)) => { + Self::SpecExecutionFailed(err.to_string()) + } Ok(err) => Self::UnexpectedNodeError { message: err.to_string(), code, diff --git a/rpc_sidecar/src/rpcs/chain.rs b/rpc_sidecar/src/rpcs/chain.rs index e3c66ae2..bad6f6bc 100644 --- a/rpc_sidecar/src/rpcs/chain.rs +++ b/rpc_sidecar/src/rpcs/chain.rs @@ -37,7 +37,7 @@ static GET_BLOCK_TRANSFERS_RESULT: Lazy = Lazy::new(|| GetBlockTransfersResult { api_version: DOCS_EXAMPLE_API_VERSION, block_hash: Some(*BlockHash::example()), - transfers: Some(vec![Transfer::default()]), + transfers: Some(vec![Transfer::example().clone()]), }); static GET_STATE_ROOT_HASH_PARAMS: Lazy = Lazy::new(|| GetStateRootHashParams { diff --git a/rpc_sidecar/src/rpcs/common.rs b/rpc_sidecar/src/rpcs/common.rs index b32bfbaa..b84c99d0 100644 --- a/rpc_sidecar/src/rpcs/common.rs +++ b/rpc_sidecar/src/rpcs/common.rs @@ -1,13 +1,14 @@ +use casper_binary_port::GlobalStateQueryResult; use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::rpcs::error::Error; use casper_types::{ - account::AccountHash, addressable_entity::EntityKindTag, binary_port::GlobalStateQueryResult, - bytesrepr::ToBytes, global_state::TrieMerkleProof, Account, AddressableEntity, - AddressableEntityHash, AvailableBlockRange, BlockHeader, BlockIdentifier, - GlobalStateIdentifier, Key, SignedBlock, StoredValue, URef, U512, + account::AccountHash, addressable_entity::EntityKindTag, bytesrepr::ToBytes, + global_state::TrieMerkleProof, Account, AddressableEntity, AddressableEntityHash, + AvailableBlockRange, BlockHeader, BlockIdentifier, GlobalStateIdentifier, Key, SignedBlock, + StoredValue, URef, U512, }; use crate::NodeClient; diff --git a/rpc_sidecar/src/rpcs/info.rs b/rpc_sidecar/src/rpcs/info.rs index c238e94c..e98809d5 100644 --- a/rpc_sidecar/src/rpcs/info.rs +++ b/rpc_sidecar/src/rpcs/info.rs @@ -3,12 +3,12 @@ use std::{collections::BTreeMap, str, sync::Arc}; use async_trait::async_trait; +use casper_binary_port::MinimalBlockInfo; use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use casper_types::{ - binary_port::MinimalBlockInfo, execution::{ExecutionResult, ExecutionResultV2}, ActivationPoint, AvailableBlockRange, Block, BlockHash, BlockSynchronizerStatus, ChainspecRawBytes, Deploy, DeployHash, Digest, EraId, ExecutionInfo, NextUpgrade, Peers, @@ -491,7 +491,9 @@ impl RpcWithoutParams for GetStatus { last_progress: status.last_progress, available_block_range: status.available_block_range, block_sync: status.block_sync, - latest_switch_block_hash: status.latest_switch_block_hash, + // TODO[RC]: Check this + //latest_switch_block_hash: status.latest_switch_block_hash, + latest_switch_block_hash: Default::default(), build_version: status.build_version, }) } @@ -537,6 +539,7 @@ mod tests { }; use pretty_assertions::assert_eq; use rand::Rng; + use tracing::error; use super::*; diff --git a/rpc_sidecar/src/rpcs/speculative_exec.rs b/rpc_sidecar/src/rpcs/speculative_exec.rs index a8311539..8a750b2e 100644 --- a/rpc_sidecar/src/rpcs/speculative_exec.rs +++ b/rpc_sidecar/src/rpcs/speculative_exec.rs @@ -3,6 +3,7 @@ use std::{str, sync::Arc}; use async_trait::async_trait; +use casper_binary_port::SpeculativeExecutionResult; use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -27,8 +28,7 @@ static SPECULATIVE_EXEC_TXN_RESULT: Lazy = Lazy::new(|| SpeculativeExecTxnResult { api_version: DOCS_EXAMPLE_API_VERSION, block_hash: *BlockHash::example(), - execution_result: ExecutionResultV2::example().clone(), - messages: Vec::new(), + execution_result: SpeculativeExecutionResult::example().clone(), }); static SPECULATIVE_EXEC_PARAMS: Lazy = Lazy::new(|| SpeculativeExecParams { block_identifier: Some(BlockIdentifier::Hash(*BlockHash::example())), @@ -60,10 +60,8 @@ pub struct SpeculativeExecTxnResult { pub api_version: ApiVersion, /// Hash of the block on top of which the transaction was executed. pub block_hash: BlockHash, - /// Result of the execution. - pub execution_result: ExecutionResultV2, - /// Messages emitted during execution. - pub messages: Messages, + /// Result of the speculative execution. + pub execution_result: SpeculativeExecutionResult, } impl DocExample for SpeculativeExecTxnResult { @@ -133,7 +131,7 @@ async fn handle_request( let block_time = block_header.timestamp(); let protocol_version = block_header.protocol_version(); - let (execution_result, messages) = node_client + let speculative_execution_result = node_client .exec_speculatively( state_root_hash, block_time, @@ -142,15 +140,12 @@ async fn handle_request( block_header, ) .await - .map_err(|err| Error::NodeRequest("speculatively executing a transaction", err))? - .into_inner() - .ok_or(Error::SpecExecReturnedNothing)?; + .map_err(|err| Error::NodeRequest("speculatively executing a transaction", err))?; Ok(SpeculativeExecTxnResult { api_version: CURRENT_API_VERSION, block_hash, - execution_result, - messages, + execution_result: speculative_execution_result, }) } diff --git a/rpc_sidecar/src/testing/mod.rs b/rpc_sidecar/src/testing/mod.rs index e96b747c..d8c35b9f 100644 --- a/rpc_sidecar/src/testing/mod.rs +++ b/rpc_sidecar/src/testing/mod.rs @@ -1,11 +1,8 @@ use std::time::Duration; use bytes::{BufMut, BytesMut}; -use casper_types::{ - binary_port::{BinaryResponse, BinaryResponseAndRequest, GlobalStateQueryResult}, - bytesrepr::ToBytes, - CLValue, ProtocolVersion, StoredValue, -}; +use casper_binary_port::{BinaryResponse, BinaryResponseAndRequest, GlobalStateQueryResult}; +use casper_types::{bytesrepr::ToBytes, CLValue, ProtocolVersion, StoredValue}; use juliet::{ io::IoCoreBuilder, protocol::ProtocolBuilder, diff --git a/types/Cargo.toml b/types/Cargo.toml index 2c508bae..35b3925e 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -11,7 +11,10 @@ repository = "https://github.com/casper-network/casper-sidecar/" [dependencies] base16 = "0.2.1" blake2 = { version = "0.9.0", optional = true } -casper-types = { workspace = true, features = ["std"] } + +#casper-types = { workspace = true, features = ["std"] } +casper-types = { path = "../../casper-node/types" } + hex-buffer-serde = "0.3.0" hex_fmt = "0.3.0" once_cell = { workspace = true } diff --git a/types/src/sse_data.rs b/types/src/sse_data.rs index b378e381..a1f0b11d 100644 --- a/types/src/sse_data.rs +++ b/types/src/sse_data.rs @@ -224,10 +224,8 @@ impl SseData { /// Returns a random `SseData::Step`. pub fn random_step(rng: &mut TestRng) -> Self { - let execution_effects = match ExecutionResultV2::random(rng) { - ExecutionResultV2::Success { effects, .. } - | ExecutionResultV2::Failure { effects, .. } => effects, - }; + let execution_effects = ExecutionResultV2::random(rng); + SseData::Step { era_id: EraId::new(rng.gen()), execution_effects: to_raw_value(&execution_effects).unwrap(), From f7b00f79312724b8861deb2c2e2ca38d505661b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Mon, 25 Mar 2024 16:15:08 +0100 Subject: [PATCH 02/11] Use workspace-wide temporary patch for casper-types --- Cargo.toml | 8 ++++---- event_sidecar/Cargo.toml | 10 ++-------- listener/Cargo.toml | 5 +---- rpc_sidecar/Cargo.toml | 10 ++-------- types/Cargo.toml | 5 +---- 5 files changed, 10 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 46b37053..5a7250e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,10 +14,7 @@ members = [ anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" - -#casper-types = { git = "https://github.com/casper-network/casper-node", branch="feat-2.0" } -casper-types = { path = "../../casper-node/types" } - +casper-types = { git = "https://github.com/casper-network/casper-node", branch="feat-2.0" } casper-event-sidecar = { path = "./event_sidecar", version = "1.0.0" } casper-event-types = { path = "./types", version = "1.0.0" } casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" } @@ -32,3 +29,6 @@ toml = "0.5.8" tracing = { version = "0", default-features = false } tracing-subscriber = "0" serde = { version = "1", default-features = false } + +[patch.'https://github.com/casper-network/casper-node'] +casper-types = { path = "../casper-node/types" } \ No newline at end of file diff --git a/event_sidecar/Cargo.toml b/event_sidecar/Cargo.toml index 3b562cc0..f122706c 100644 --- a/event_sidecar/Cargo.toml +++ b/event_sidecar/Cargo.toml @@ -20,10 +20,7 @@ async-trait = "0.1.56" bytes = "1.2.0" casper-event-listener = { path = "../listener", version = "1.0.0" } casper-event-types.workspace = true - -#casper-types = { workspace = true, features = ["std", "json-schema"] } -casper-types = { path = "../../casper-node/types" } - +casper-types = { workspace = true, features = ["std", "json-schema"] } derive-new = "0.5.9" eventsource-stream = "0.2.3" futures = { workspace = true } @@ -58,10 +55,7 @@ wheelbuf = "0.2.0" [dev-dependencies] async-stream = { workspace = true } casper-event-types = { workspace = true, features = ["sse-data-testing"] } - -#casper-types = { workspace = true, features = ["std", "testing"] } -casper-types = { path = "../../casper-node/types" } - +casper-types = { workspace = true, features = ["std", "testing"] } colored = "2.0.0" futures-util = { workspace = true } once_cell = { workspace = true } diff --git a/listener/Cargo.toml b/listener/Cargo.toml index 2f199036..5dd2dab5 100644 --- a/listener/Cargo.toml +++ b/listener/Cargo.toml @@ -14,10 +14,7 @@ async-stream = { workspace = true } async-trait = { workspace = true } bytes = "1.2.0" casper-event-types.workspace = true - -#casper-types = { workspace = true, features = ["std"] } -casper-types = { path = "../../casper-node/types" } - +casper-types = { workspace = true, features = ["std"] } eventsource-stream = "0.2.3" futures = { workspace = true } futures-util = { workspace = true } diff --git a/rpc_sidecar/Cargo.toml b/rpc_sidecar/Cargo.toml index 7e185c73..30246721 100644 --- a/rpc_sidecar/Cargo.toml +++ b/rpc_sidecar/Cargo.toml @@ -18,11 +18,8 @@ base16 = "0.2.1" bincode = "1" bytes = "1.5.0" casper-json-rpc = { version = "1.0.0", path = "../json_rpc" } - -#casper-types = { workspace = true, features = ["datasize", "json-schema", "std"] } -casper-types = { path = "../../casper-node/types" } +casper-types = { workspace = true, features = ["datasize", "json-schema", "std"] } casper-binary-port = { path = "../../casper-node/binary_port" } - datasize = { workspace = true, features = ["detailed", "fake_clock-types"] } futures = { workspace = true } http = "0.2.1" @@ -46,10 +43,7 @@ warp = { version = "0.3.6", features = ["compression"] } [dev-dependencies] assert-json-diff = "2" - -#casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } -casper-types = { path = "../../casper-node/types" } - +casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } pretty_assertions = "0.7.2" regex = "1" tempfile = "3" diff --git a/types/Cargo.toml b/types/Cargo.toml index 35b3925e..2c508bae 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -11,10 +11,7 @@ repository = "https://github.com/casper-network/casper-sidecar/" [dependencies] base16 = "0.2.1" blake2 = { version = "0.9.0", optional = true } - -#casper-types = { workspace = true, features = ["std"] } -casper-types = { path = "../../casper-node/types" } - +casper-types = { workspace = true, features = ["std"] } hex-buffer-serde = "0.3.0" hex_fmt = "0.3.0" once_cell = { workspace = true } From 12e9ddd52aa8817aab1f125b157f2c3eea5d6291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Wed, 27 Mar 2024 09:36:10 +0100 Subject: [PATCH 03/11] Speculative execution no longer needs 'block_identifier' --- Cargo.lock | 2 +- event_sidecar/src/types/sse_events.rs | 2 +- resources/test/rpc_schema.json | 586 +++++++++++++++-------- rpc_sidecar/Cargo.toml | 3 +- rpc_sidecar/src/node_client.rs | 6 +- rpc_sidecar/src/rpcs/account.rs | 9 +- rpc_sidecar/src/rpcs/chain.rs | 26 +- rpc_sidecar/src/rpcs/info.rs | 9 +- rpc_sidecar/src/rpcs/speculative_exec.rs | 78 +-- rpc_sidecar/src/rpcs/state.rs | 8 +- 10 files changed, 418 insertions(+), 311 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50e1cbd1..19e8f00b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -511,11 +511,11 @@ dependencies = [ "bincode", "casper-types", "once_cell", + "rand", "schemars", "serde", "serde-map-to-array", "thiserror", - "tracing", ] [[package]] diff --git a/event_sidecar/src/types/sse_events.rs b/event_sidecar/src/types/sse_events.rs index 64d17eed..21f79033 100644 --- a/event_sidecar/src/types/sse_events.rs +++ b/event_sidecar/src/types/sse_events.rs @@ -46,7 +46,7 @@ pub fn random_execution_result(rng: &mut TestRng) -> ExecutionResult { ExecutionResult::V1(result_v1) } 1 => { - let result_v2: ExecutionResultV2 = rng.gen(); + let result_v2 = ExecutionResultV2::random(rng); ExecutionResult::V2(result_v2) } _ => panic!("Unexpected value"), diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 7d5d4c63..bb2051d5 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -166,12 +166,12 @@ "name": "transaction", "value": { "Version1": { - "hash": "2576738ea0aac682f434cdee280ccfbc8aa208cfc110460f612a23c297acdce5", + "hash": "52a75f3651e450cc2c3ed534bf130bae2515950707d70bb60067aada30b97ca8", "header": { "chain_name": "casper-example", "timestamp": "2020-11-17T00:39:24.072Z", "ttl": "1h", - "body_hash": "d2433e28993036fbdf7c963cd753893fefe619e7dbb5c0cafa5cb03bcf3ff9db", + "body_hash": "8c36f401d829378219b676ac6cceef90b08171499f5f5726ab5021df46d8b824", "pricing_mode": { "Fixed": { "gas_price_tolerance": 5 @@ -186,8 +186,10 @@ [ "source", { - "cl_type": "URef", - "bytes": "0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", + "cl_type": { + "Option": "URef" + }, + "bytes": "010a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", "parsed": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007" } ], @@ -207,18 +209,6 @@ "parsed": "30000000000" } ], - [ - "to", - { - "cl_type": { - "Option": { - "ByteArray": 32 - } - }, - "bytes": "012828282828282828282828282828282828282828282828282828282828282828", - "parsed": "2828282828282828282828282828282828282828282828282828282828282828" - } - ], [ "id", { @@ -237,7 +227,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "017650934fca4d5f4107058c68b1c4ce66aac965164a3c6f8070753c4bb2623119ea1fb9046b8324dcba20c9fd141bb1364953638ecd65d57c283132845134e50c" + "signature": "012eaaf83b1ed367ed424c859974bc5115a62d6b10d635f4b39d380414c4abcb2d54c01b7b96e0d27e00ed913f05f06d7bee9c25c31bbd8e9215961e61f835250d" } ] } @@ -249,7 +239,7 @@ "value": { "api_version": "2.0.0", "transaction_hash": { - "Version1": "2576738ea0aac682f434cdee280ccfbc8aa208cfc110460f612a23c297acdce5" + "Version1": "52a75f3651e450cc2c3ed534bf130bae2515950707d70bb60067aada30b97ca8" } } } @@ -388,29 +378,52 @@ } ] }, - "block_hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "block_hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "block_height": 10, "execution_result": { "Version2": { - "Success": { - "effects": [ - { - "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", - "kind": { - "AddUInt64": 8 - } - }, - { - "key": "deploy-af684263911154d26fa05be9963171802801a0b6aff8f199b7391eacb8edc9e1", - "kind": "Identity" + "initiator": { + "PublicKey": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c" + }, + "error_message": null, + "limit": "123456", + "consumed": "100000", + "cost": "246912", + "payment": [ + { + "source": "uref-0101010101010101010101010101010101010101010101010101010101010101-001" + } + ], + "transfers": [ + { + "Version2": { + "transaction_hash": { + "Version1": "0101010101010101010101010101010101010101010101010101010101010101" + }, + "from": { + "AccountHash": "account-hash-0202020202020202020202020202020202020202020202020202020202020202" + }, + "to": "account-hash-0303030303030303030303030303030303030303030303030303030303030303", + "source": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007", + "target": "uref-1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b-000", + "amount": "1000000000000", + "gas": "2500000000", + "id": 999 } - ], - "transfers": [ - "transfer-5959595959595959595959595959595959595959595959595959595959595959", - "transfer-8282828282828282828282828282828282828282828282828282828282828282" - ], - "cost": "123456" - } + } + ], + "effects": [ + { + "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", + "kind": { + "AddUInt64": 8 + } + }, + { + "key": "deploy-af684263911154d26fa05be9963171802801a0b6aff8f199b7391eacb8edc9e1", + "kind": "Identity" + } + ] } } } @@ -490,7 +503,7 @@ { "name": "transaction_hash", "value": { - "Version1": "2576738ea0aac682f434cdee280ccfbc8aa208cfc110460f612a23c297acdce5" + "Version1": "52a75f3651e450cc2c3ed534bf130bae2515950707d70bb60067aada30b97ca8" } }, { @@ -504,12 +517,12 @@ "api_version": "2.0.0", "transaction": { "Version1": { - "hash": "2576738ea0aac682f434cdee280ccfbc8aa208cfc110460f612a23c297acdce5", + "hash": "52a75f3651e450cc2c3ed534bf130bae2515950707d70bb60067aada30b97ca8", "header": { "chain_name": "casper-example", "timestamp": "2020-11-17T00:39:24.072Z", "ttl": "1h", - "body_hash": "d2433e28993036fbdf7c963cd753893fefe619e7dbb5c0cafa5cb03bcf3ff9db", + "body_hash": "8c36f401d829378219b676ac6cceef90b08171499f5f5726ab5021df46d8b824", "pricing_mode": { "Fixed": { "gas_price_tolerance": 5 @@ -524,8 +537,10 @@ [ "source", { - "cl_type": "URef", - "bytes": "0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", + "cl_type": { + "Option": "URef" + }, + "bytes": "010a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", "parsed": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007" } ], @@ -545,18 +560,6 @@ "parsed": "30000000000" } ], - [ - "to", - { - "cl_type": { - "Option": { - "ByteArray": 32 - } - }, - "bytes": "012828282828282828282828282828282828282828282828282828282828282828", - "parsed": "2828282828282828282828282828282828282828282828282828282828282828" - } - ], [ "id", { @@ -575,34 +578,57 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "017650934fca4d5f4107058c68b1c4ce66aac965164a3c6f8070753c4bb2623119ea1fb9046b8324dcba20c9fd141bb1364953638ecd65d57c283132845134e50c" + "signature": "012eaaf83b1ed367ed424c859974bc5115a62d6b10d635f4b39d380414c4abcb2d54c01b7b96e0d27e00ed913f05f06d7bee9c25c31bbd8e9215961e61f835250d" } ] } }, - "block_hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "block_hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "block_height": 10, "execution_result": { "Version2": { - "Success": { - "effects": [ - { - "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", - "kind": { - "AddUInt64": 8 - } - }, - { - "key": "deploy-af684263911154d26fa05be9963171802801a0b6aff8f199b7391eacb8edc9e1", - "kind": "Identity" + "initiator": { + "PublicKey": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c" + }, + "error_message": null, + "limit": "123456", + "consumed": "100000", + "cost": "246912", + "payment": [ + { + "source": "uref-0101010101010101010101010101010101010101010101010101010101010101-001" + } + ], + "transfers": [ + { + "Version2": { + "transaction_hash": { + "Version1": "0101010101010101010101010101010101010101010101010101010101010101" + }, + "from": { + "AccountHash": "account-hash-0202020202020202020202020202020202020202020202020202020202020202" + }, + "to": "account-hash-0303030303030303030303030303030303030303030303030303030303030303", + "source": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007", + "target": "uref-1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b-000", + "amount": "1000000000000", + "gas": "2500000000", + "id": 999 } - ], - "transfers": [ - "transfer-5959595959595959595959595959595959595959595959595959595959595959", - "transfer-8282828282828282828282828282828282828282828282828282828282828282" - ], - "cost": "123456" - } + } + ], + "effects": [ + { + "key": "account-hash-2c4a11c062a8a337bfc97e27fd66291caeb2c65865dcb5d3ef3759c4c97efecb", + "kind": { + "AddUInt64": 8 + } + }, + { + "key": "deploy-af684263911154d26fa05be9963171802801a0b6aff8f199b7391eacb8edc9e1", + "kind": "Identity" + } + ] } } } @@ -803,7 +829,7 @@ "args": [], "ret": "Unit", "access": "Public", - "entry_point_type": "Session" + "entry_point_type": "Caller" } } ], @@ -1006,7 +1032,7 @@ { "name": "state_identifier", "value": { - "BlockHash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e" + "BlockHash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd" } }, { @@ -1050,12 +1076,14 @@ "weight": "789" } ], - "rewards": {} + "rewards": {}, + "next_era_gas_price": 1 }, "timestamp": "2020-11-17T00:39:24.072Z", "era_id": 1, "height": 10, - "protocol_version": "1.0.0" + "protocol_version": "1.0.0", + "current_gas_price": 1 } }, "stored_value": { @@ -1346,7 +1374,7 @@ "chainspec_name": "casper-example", "starting_state_root_hash": "0000000000000000000000000000000000000000000000000000000000000000", "last_added_block_info": { - "hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "timestamp": "2020-11-17T00:39:24.072Z", "era_id": 1, "height": 10, @@ -1528,7 +1556,7 @@ { "name": "block_identifier", "value": { - "Hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e" + "Hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd" } } ], @@ -1539,7 +1567,7 @@ "block_with_signatures": { "block": { "Version2": { - "hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "header": { "parent_hash": "0707070707070707070707070707070707070707070707070707070707070707", "state_root_hash": "0808080808080808080808080808080808080808080808080808080808080808", @@ -1567,12 +1595,14 @@ "weight": "789" } ], - "rewards": {} + "rewards": {}, + "next_era_gas_price": 1 }, "timestamp": "2020-11-17T00:39:24.072Z", "era_id": 1, "height": 10, - "protocol_version": "1.0.0" + "protocol_version": "1.0.0", + "current_gas_price": 1 }, "body": { "proposer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", @@ -1603,7 +1633,7 @@ "proofs": [ { "public_key": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "010fff61ef78aa2bc5ba549b287b67c50ce23f828e81633a5c0eb832863c101351738d94ad114a74a33fd5872e9fabe1b6a2042dd2c084a53ec75a5316a87bbf0f" + "signature": "010dae9911fdb2e62b525e13828935b93dcee028670e1479393a0e21f700e868f85fb5d8d90ad7a23e1c3e6aaabbaa3f1fdd0dfa962461c4208d02fd8e398bb90c" } ] } @@ -1681,14 +1711,20 @@ "block_hash": "0707070707070707070707070707070707070707070707070707070707070707", "transfers": [ { - "deploy_hash": "0000000000000000000000000000000000000000000000000000000000000000", - "from": "account-hash-0000000000000000000000000000000000000000000000000000000000000000", - "to": null, - "source": "uref-0000000000000000000000000000000000000000000000000000000000000000-000", - "target": "uref-0000000000000000000000000000000000000000000000000000000000000000-000", - "amount": "0", - "gas": "0", - "id": null + "Version2": { + "transaction_hash": { + "Version1": "0101010101010101010101010101010101010101010101010101010101010101" + }, + "from": { + "AccountHash": "account-hash-0202020202020202020202020202020202020202020202020202020202020202" + }, + "to": "account-hash-0303030303030303030303030303030303030303030303030303030303030303", + "source": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007", + "target": "uref-1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b-000", + "amount": "1000000000000", + "gas": "2500000000", + "id": 999 + } } ] } @@ -1974,7 +2010,7 @@ { "name": "block_identifier", "value": { - "Hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e" + "Hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd" } } ], @@ -1983,7 +2019,7 @@ "value": { "api_version": "2.0.0", "era_summary": { - "block_hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "block_hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "era_id": 42, "stored_value": { "EraInfo": { @@ -2149,7 +2185,7 @@ { "name": "block_identifier", "value": { - "Hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e" + "Hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd" } } ], @@ -2158,7 +2194,7 @@ "value": { "api_version": "2.0.0", "era_summary": { - "block_hash": "9ccc716f5f3c7ac238bf7aaad113c2add3586921a7966faffb3a5a253aa1d75e", + "block_hash": "6a2dad7a71608f78e9b6b5f97eed60a374e75e70cb8cc925e6681c61c84165bd", "era_id": 42, "stored_value": { "EraInfo": { @@ -2992,7 +3028,8 @@ "type": "object", "required": [ "gas_price", - "payment_amount" + "payment_amount", + "standard_payment" ], "properties": { "payment_amount": { @@ -3002,10 +3039,14 @@ "minimum": 0.0 }, "gas_price": { - "description": "User-specified gas_price tolerance (minimum 1).", + "description": "User-specified gas_price (minimum 1).", "type": "integer", - "format": "uint64", + "format": "uint8", "minimum": 0.0 + }, + "standard_payment": { + "description": "Standard payment.", + "type": "boolean" } }, "additionalProperties": false @@ -3029,7 +3070,7 @@ "gas_price_tolerance": { "description": "User-specified gas_price tolerance (minimum 1). This is interpreted to mean \"do not include this transaction in a block if the current gas price is greater than this number\"", "type": "integer", - "format": "uint64", + "format": "uint8", "minimum": 0.0 } }, @@ -3240,10 +3281,10 @@ "description": "Hex-encoded entity address identifying the invocable entity.", "type": "object", "required": [ - "InvocableEntity" + "ByHash" ], "properties": { - "InvocableEntity": { + "ByHash": { "type": "string" } }, @@ -3253,10 +3294,10 @@ "description": "The alias identifying the invocable entity.", "type": "object", "required": [ - "InvocableEntityAlias" + "ByName" ], "properties": { - "InvocableEntityAlias": { + "ByName": { "type": "string" } }, @@ -3266,10 +3307,10 @@ "description": "The address and optional version identifying the package.", "type": "object", "required": [ - "Package" + "ByPackageHash" ], "properties": { - "Package": { + "ByPackageHash": { "type": "object", "required": [ "addr" @@ -3298,16 +3339,16 @@ "description": "The alias and optional version identifying the package.", "type": "object", "required": [ - "PackageAlias" + "ByPackageName" ], "properties": { - "PackageAlias": { + "ByPackageName": { "type": "object", "required": [ - "alias" + "name" ], "properties": { - "alias": { + "name": { "description": "The package alias.", "type": "string" }, @@ -3582,10 +3623,10 @@ ] }, "transfers": { - "description": "A record of Transfers performed while executing the deploy.", + "description": "A record of version 1 Transfers performed while executing the deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferAddr" + "$ref": "#/components/schemas/TransferV1Addr" } }, "cost": { @@ -3633,7 +3674,7 @@ "description": "A record of Transfers performed while executing the deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferAddr" + "$ref": "#/components/schemas/TransferV1Addr" } }, "cost": { @@ -3847,14 +3888,14 @@ "additionalProperties": false }, { - "description": "Writes the given Transfer to global state.", + "description": "Writes the given version 1 Transfer to global state.", "type": "object", "required": [ "WriteTransfer" ], "properties": { "WriteTransfer": { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/TransferV1" } }, "additionalProperties": false @@ -4056,10 +4097,10 @@ ] }, "transfers": { - "description": "Transfers performed by the Deploy.", + "description": "Version 1 transfers performed by the Deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferAddr" + "$ref": "#/components/schemas/TransferV1Addr" } }, "from": { @@ -4089,8 +4130,8 @@ }, "additionalProperties": false }, - "TransferAddr": { - "description": "Hex-encoded transfer address.", + "TransferV1Addr": { + "description": "Hex-encoded version 1 transfer address.", "type": "string" }, "URef": { @@ -4199,8 +4240,8 @@ } ] }, - "Transfer": { - "description": "Represents a transfer from one purse to another", + "TransferV1": { + "description": "Represents a version 1 transfer from one purse to another.", "type": "object", "required": [ "amount", @@ -4700,103 +4741,221 @@ "additionalProperties": false }, "ExecutionResultV2": { - "description": "The result of executing a single deploy.", + "description": "The result of executing a single transaction.", + "type": "object", + "required": [ + "consumed", + "cost", + "effects", + "initiator", + "limit", + "payment", + "transfers" + ], + "properties": { + "initiator": { + "description": "Who initiated this transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/InitiatorAddr" + } + ] + }, + "error_message": { + "description": "If there is no error message, this execution was processed successfully. If there is an error message, this execution failed to fully process for the stated reason.", + "type": [ + "string", + "null" + ] + }, + "limit": { + "description": "What was the maximum allowed gas limit for this transaction?.", + "allOf": [ + { + "$ref": "#/components/schemas/Gas" + } + ] + }, + "consumed": { + "description": "How much gas was consumed executing this transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/Gas" + } + ] + }, + "cost": { + "description": "How much was paid for this transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/U512" + } + ] + }, + "payment": { + "description": "Breakdown of payments made to cover the cost.", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + } + }, + "transfers": { + "description": "A record of transfers performed while executing this transaction.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "effects": { + "description": "The effects of executing this transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/Effects" + } + ] + } + }, + "additionalProperties": false + }, + "Gas": { + "description": "The `Gas` struct represents a `U512` amount of gas.", + "allOf": [ + { + "$ref": "#/components/schemas/U512" + } + ] + }, + "PaymentInfo": { + "description": "Breakdown of payments made to cover the cost.", + "type": "object", + "required": [ + "source" + ], + "properties": { + "source": { + "description": "Source purse used for payment of the transaction.", + "allOf": [ + { + "$ref": "#/components/schemas/URef" + } + ] + } + } + }, + "Transfer": { + "description": "A versioned wrapper for a transfer.", "oneOf": [ { - "description": "The result of a failed execution.", + "description": "A version 1 transfer.", "type": "object", "required": [ - "Failure" + "Version1" ], "properties": { - "Failure": { - "type": "object", - "required": [ - "cost", - "effects", - "error_message", - "transfers" - ], - "properties": { - "effects": { - "description": "The effects of executing the deploy.", - "allOf": [ - { - "$ref": "#/components/schemas/Effects" - } - ] - }, - "transfers": { - "description": "A record of transfers performed while executing the deploy.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferAddr" - } - }, - "cost": { - "description": "The cost in Motes of executing the deploy.", - "allOf": [ - { - "$ref": "#/components/schemas/U512" - } - ] - }, - "error_message": { - "description": "The error message associated with executing the deploy.", - "type": "string" - } - }, - "additionalProperties": false + "Version1": { + "$ref": "#/components/schemas/TransferV1" } }, "additionalProperties": false }, { - "description": "The result of a successful execution.", + "description": "A version 2 transfer.", "type": "object", "required": [ - "Success" + "Version2" ], "properties": { - "Success": { - "type": "object", - "required": [ - "cost", - "effects", - "transfers" - ], - "properties": { - "effects": { - "description": "The effects of executing the deploy.", - "allOf": [ - { - "$ref": "#/components/schemas/Effects" - } - ] - }, - "transfers": { - "description": "A record of transfers performed while executing the deploy.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferAddr" - } - }, - "cost": { - "description": "The cost in Motes of executing the deploy.", - "allOf": [ - { - "$ref": "#/components/schemas/U512" - } - ] - } - }, - "additionalProperties": false + "Version2": { + "$ref": "#/components/schemas/TransferV2" } }, "additionalProperties": false } ] }, + "TransferV2": { + "description": "Represents a version 2 transfer from one purse to another.", + "type": "object", + "required": [ + "amount", + "from", + "gas", + "source", + "target", + "transaction_hash" + ], + "properties": { + "transaction_hash": { + "description": "Transaction that created the transfer.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionHash" + } + ] + }, + "from": { + "description": "Entity from which transfer was executed.", + "allOf": [ + { + "$ref": "#/components/schemas/InitiatorAddr" + } + ] + }, + "to": { + "description": "Account to which funds are transferred.", + "anyOf": [ + { + "$ref": "#/components/schemas/AccountHash" + }, + { + "type": "null" + } + ] + }, + "source": { + "description": "Source purse.", + "allOf": [ + { + "$ref": "#/components/schemas/URef" + } + ] + }, + "target": { + "description": "Target purse.", + "allOf": [ + { + "$ref": "#/components/schemas/URef" + } + ] + }, + "amount": { + "description": "Transfer amount.", + "allOf": [ + { + "$ref": "#/components/schemas/U512" + } + ] + }, + "gas": { + "description": "Gas.", + "allOf": [ + { + "$ref": "#/components/schemas/Gas" + } + ] + }, + "id": { + "description": "User-defined ID.", + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, "Effects": { "description": "A log of all transforms produced during execution.", "type": "array", @@ -4822,7 +4981,7 @@ "additionalProperties": false }, "TransformKindV2": { - "description": "Representation of a single transformation occurring during execution.\n\nNote that all arithmetic variants of [`TransformKind`] are commutative which means that a given collection of them can be executed in any order to produce the same end result.", + "description": "Representation of a single transformation occurring during execution.\n\nNote that all arithmetic variants of `TransformKindV2` are commutative which means that a given collection of them can be executed in any order to produce the same end result.", "oneOf": [ { "description": "An identity transformation that does not modify a value in the global state.\n\nCreated as a result of reading from the global state.", @@ -5022,14 +5181,14 @@ "additionalProperties": false }, { - "description": "A `Transfer`.", + "description": "A version 1 (legacy) transfer.", "type": "object", "required": [ - "Transfer" + "LegacyTransfer" ], "properties": { - "Transfer": { - "$ref": "#/components/schemas/Transfer" + "LegacyTransfer": { + "$ref": "#/components/schemas/TransferV1" } }, "additionalProperties": false @@ -5469,21 +5628,21 @@ "description": "Context of method execution\n\nMost significant bit represents version i.e. - 0b0 -> 0.x/1.x (session & contracts) - 0b1 -> 2.x and later (introduced installer, utility entry points)", "oneOf": [ { - "description": "Runs as session code (caller) Deprecated, retained to allow read back of legacy stored session.", + "description": "Runs using the calling entity's context. In v1.x this was used for both \"session\" code run using the originating Account's context, and also for \"StoredSession\" code that ran in the caller's context. While this made systemic sense due to the way the runtime context nesting works, this dual usage was very confusing to most human beings.\n\nIn v2.x the renamed Caller variant is exclusively used for wasm run using the initiating account entity's context. Previously installed 1.x stored session code should continue to work as the binary value matches but we no longer allow such logic to be upgraded, nor do we allow new stored session to be installed.", "type": "string", "enum": [ - "Session" + "Caller" ] }, { - "description": "Runs within called entity's context (called)", + "description": "Runs using the called entity's context.", "type": "string", "enum": [ - "AddressableEntity" + "Called" ] }, { - "description": "This entry point is intended to extract a subset of bytecode. Runs within called entity's context (called)", + "description": "Extract a subset of bytecode and installs it as a new smart contract. Runs using the called entity's context.", "type": "string", "enum": [ "Factory" @@ -6684,6 +6843,7 @@ "required": [ "accumulated_seed", "body_hash", + "current_gas_price", "era_id", "height", "parent_hash", @@ -6769,6 +6929,12 @@ "$ref": "#/components/schemas/ProtocolVersion" } ] + }, + "current_gas_price": { + "description": "The gas price of the era", + "type": "integer", + "format": "uint8", + "minimum": 0.0 } } }, @@ -6778,6 +6944,7 @@ "required": [ "equivocators", "inactive_validators", + "next_era_gas_price", "next_era_validator_weights", "rewards" ], @@ -6810,6 +6977,11 @@ "additionalProperties": { "$ref": "#/components/schemas/U512" } + }, + "next_era_gas_price": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 } } }, diff --git a/rpc_sidecar/Cargo.toml b/rpc_sidecar/Cargo.toml index 30246721..61458139 100644 --- a/rpc_sidecar/Cargo.toml +++ b/rpc_sidecar/Cargo.toml @@ -44,6 +44,7 @@ warp = { version = "0.3.6", features = ["compression"] } [dev-dependencies] assert-json-diff = "2" casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } +casper-binary-port = { path = "../../casper-node/binary_port", features = ["testing"] } pretty_assertions = "0.7.2" regex = "1" tempfile = "3" @@ -56,7 +57,7 @@ vergen = { version = "8.2.1", default-features = false, features = [ ] } [features] -testing = ["casper-types/testing"] +testing = ["casper-types/testing", "casper-binary-port/testing"] [package.metadata.deb] revision = "0" diff --git a/rpc_sidecar/src/node_client.rs b/rpc_sidecar/src/node_client.rs index 5bec2db3..5f60d112 100644 --- a/rpc_sidecar/src/node_client.rs +++ b/rpc_sidecar/src/node_client.rs @@ -20,7 +20,7 @@ use casper_types::{ bytesrepr::{self, FromBytes, ToBytes}, AvailableBlockRange, BlockHash, BlockHeader, BlockIdentifier, ChainspecRawBytes, Digest, GlobalStateIdentifier, Key, KeyTag, Peers, ProtocolVersion, SignedBlock, StoredValue, - Timestamp, Transaction, TransactionHash, Transfer, + Transaction, TransactionHash, Transfer, }; use juliet::{ io::IoCoreBuilder, @@ -112,11 +112,7 @@ pub trait NodeClient: Send + Sync { async fn exec_speculatively( &self, - state_root_hash: Digest, - block_time: Timestamp, - protocol_version: ProtocolVersion, transaction: Transaction, - exec_at_block: BlockHeader, ) -> Result { let request = BinaryRequest::TrySpeculativeExec { transaction }; let resp = self.send_request(request).await?; diff --git a/rpc_sidecar/src/rpcs/account.rs b/rpc_sidecar/src/rpcs/account.rs index a5ccc7b3..79b851bd 100644 --- a/rpc_sidecar/src/rpcs/account.rs +++ b/rpc_sidecar/src/rpcs/account.rs @@ -151,13 +151,10 @@ impl RpcWithParams for PutTransaction { #[cfg(test)] mod tests { - use casper_types::{ - binary_port::{ - BinaryRequest, BinaryResponse, BinaryResponseAndRequest, - ErrorCode as BinaryPortErrorCode, - }, - testing::TestRng, + use casper_binary_port::{ + BinaryRequest, BinaryResponse, BinaryResponseAndRequest, ErrorCode as BinaryPortErrorCode, }; + use casper_types::testing::TestRng; use pretty_assertions::assert_eq; use crate::{rpcs::ErrorCode, SUPPORTED_PROTOCOL_VERSION}; diff --git a/rpc_sidecar/src/rpcs/chain.rs b/rpc_sidecar/src/rpcs/chain.rs index bad6f6bc..29e79533 100644 --- a/rpc_sidecar/src/rpcs/chain.rs +++ b/rpc_sidecar/src/rpcs/chain.rs @@ -403,15 +403,13 @@ mod tests { use std::convert::TryFrom; use crate::{ClientError, SUPPORTED_PROTOCOL_VERSION}; + use casper_binary_port::{ + BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, + GlobalStateQueryResult, GlobalStateRequest, InformationRequestTag, RecordId, + }; use casper_types::{ - binary_port::{ - BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, - GlobalStateQueryResult, GlobalStateRequest, InformationRequestTag, RecordId, - }, - system::auction::EraInfo, - testing::TestRng, - Block, BlockSignaturesV1, BlockSignaturesV2, ChainNameDigest, DeployHash, SignedBlock, - TestBlockBuilder, TestBlockV1Builder, + system::auction::EraInfo, testing::TestRng, Block, BlockSignaturesV1, BlockSignaturesV2, + ChainNameDigest, SignedBlock, TestBlockBuilder, TestBlockV1Builder, }; use pretty_assertions::assert_eq; use rand::Rng; @@ -481,16 +479,7 @@ mod tests { let mut transfers = vec![]; for _ in 0..rng.gen_range(0..10) { - transfers.push(Transfer::new( - DeployHash::random(rng), - rng.gen(), - Some(rng.gen()), - rng.gen(), - rng.gen(), - rng.gen(), - rng.gen(), - Some(rng.gen()), - )); + transfers.push(Transfer::random(rng)); } let signatures = BlockSignaturesV2::new( *block.hash(), @@ -763,6 +752,7 @@ mod tests { BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) if InformationRequestTag::try_from(info_type_tag) == Ok(expected_tag) => { + dbg!(&1); Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( self.block.clone_header(), diff --git a/rpc_sidecar/src/rpcs/info.rs b/rpc_sidecar/src/rpcs/info.rs index e98809d5..ddf1a673 100644 --- a/rpc_sidecar/src/rpcs/info.rs +++ b/rpc_sidecar/src/rpcs/info.rs @@ -528,18 +528,17 @@ mod tests { use std::convert::TryFrom; use crate::{rpcs::ErrorCode, ClientError, SUPPORTED_PROTOCOL_VERSION}; + use casper_binary_port::{ + BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, InformationRequest, + InformationRequestTag, TransactionWithExecutionInfo, + }; use casper_types::{ - binary_port::{ - BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, - InformationRequest, InformationRequestTag, TransactionWithExecutionInfo, - }, bytesrepr::{FromBytes, ToBytes}, testing::TestRng, BlockHash, TransactionV1, }; use pretty_assertions::assert_eq; use rand::Rng; - use tracing::error; use super::*; diff --git a/rpc_sidecar/src/rpcs/speculative_exec.rs b/rpc_sidecar/src/rpcs/speculative_exec.rs index 8a750b2e..7df8935a 100644 --- a/rpc_sidecar/src/rpcs/speculative_exec.rs +++ b/rpc_sidecar/src/rpcs/speculative_exec.rs @@ -8,30 +8,23 @@ use once_cell::sync::Lazy; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use casper_types::{ - contract_messages::Messages, execution::ExecutionResultV2, BlockHash, BlockIdentifier, Deploy, - Transaction, -}; +use casper_types::{Deploy, Transaction}; use super::{ - common, docs::{DocExample, DOCS_EXAMPLE_API_VERSION}, ApiVersion, Error, NodeClient, RpcError, RpcWithParams, CURRENT_API_VERSION, }; static SPECULATIVE_EXEC_TXN_PARAMS: Lazy = Lazy::new(|| SpeculativeExecTxnParams { - block_identifier: Some(BlockIdentifier::Hash(*BlockHash::example())), transaction: Transaction::doc_example().clone(), }); static SPECULATIVE_EXEC_TXN_RESULT: Lazy = Lazy::new(|| SpeculativeExecTxnResult { api_version: DOCS_EXAMPLE_API_VERSION, - block_hash: *BlockHash::example(), execution_result: SpeculativeExecutionResult::example().clone(), }); static SPECULATIVE_EXEC_PARAMS: Lazy = Lazy::new(|| SpeculativeExecParams { - block_identifier: Some(BlockIdentifier::Hash(*BlockHash::example())), deploy: Deploy::doc_example().clone(), }); @@ -39,8 +32,6 @@ static SPECULATIVE_EXEC_PARAMS: Lazy = Lazy::new(|| Specu #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(deny_unknown_fields)] pub struct SpeculativeExecTxnParams { - /// Block hash on top of which to execute the transaction. - pub block_identifier: Option, /// Transaction to execute. pub transaction: Transaction, } @@ -58,8 +49,6 @@ pub struct SpeculativeExecTxnResult { /// The RPC API version. #[schemars(with = "String")] pub api_version: ApiVersion, - /// Hash of the block on top of which the transaction was executed. - pub block_hash: BlockHash, /// Result of the speculative execution. pub execution_result: SpeculativeExecutionResult, } @@ -83,7 +72,7 @@ impl RpcWithParams for SpeculativeExecTxn { node_client: Arc, params: Self::RequestParams, ) -> Result { - handle_request(node_client, params.block_identifier, params.transaction).await + handle_request(node_client, params.transaction).await } } @@ -91,8 +80,6 @@ impl RpcWithParams for SpeculativeExecTxn { #[derive(Serialize, Deserialize, Debug, JsonSchema)] #[serde(deny_unknown_fields)] pub struct SpeculativeExecParams { - /// Block hash on top of which to execute the deploy. - pub block_identifier: Option, /// Deploy to execute. pub deploy: Deploy, } @@ -116,35 +103,21 @@ impl RpcWithParams for SpeculativeExec { node_client: Arc, params: Self::RequestParams, ) -> Result { - handle_request(node_client, params.block_identifier, params.deploy.into()).await + handle_request(node_client, params.deploy.into()).await } } async fn handle_request( node_client: Arc, - identifier: Option, transaction: Transaction, ) -> Result { - let block_header = common::get_block_header(&*node_client, identifier).await?; - let block_hash = block_header.block_hash(); - let state_root_hash = *block_header.state_root_hash(); - let block_time = block_header.timestamp(); - let protocol_version = block_header.protocol_version(); - let speculative_execution_result = node_client - .exec_speculatively( - state_root_hash, - block_time, - protocol_version, - transaction, - block_header, - ) + .exec_speculatively(transaction) .await .map_err(|err| Error::NodeRequest("speculatively executing a transaction", err))?; Ok(SpeculativeExecTxnResult { api_version: CURRENT_API_VERSION, - block_hash, execution_result: speculative_execution_result, }) } @@ -153,14 +126,11 @@ async fn handle_request( mod tests { use std::convert::TryFrom; - use casper_types::{ - binary_port::{ - BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, - InformationRequestTag, SpeculativeExecutionResult, - }, - testing::TestRng, - Block, TestBlockBuilder, + use casper_binary_port::{ + BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, InformationRequestTag, + SpeculativeExecutionResult, }; + use casper_types::testing::TestRng; use pretty_assertions::assert_eq; use crate::{ClientError, SUPPORTED_PROTOCOL_VERSION}; @@ -171,27 +141,20 @@ mod tests { async fn should_spec_exec() { let rng = &mut TestRng::new(); let deploy = Deploy::random(rng); - let block = Block::V2(TestBlockBuilder::new().build(rng)); - let execution_result = ExecutionResultV2::random(rng); + let execution_result = SpeculativeExecutionResult::random(rng); let res = SpeculativeExec::do_handle_request( Arc::new(ValidSpecExecMock { - block: block.clone(), execution_result: execution_result.clone(), }), - SpeculativeExecParams { - block_identifier: Some(BlockIdentifier::Hash(*block.hash())), - deploy, - }, + SpeculativeExecParams { deploy }, ) .await .expect("should handle request"); assert_eq!( res, SpeculativeExecTxnResult { - block_hash: *block.hash(), execution_result, - messages: Messages::new(), api_version: CURRENT_API_VERSION, } ) @@ -201,35 +164,27 @@ mod tests { async fn should_spec_exec_txn() { let rng = &mut TestRng::new(); let transaction = Transaction::random(rng); - let block = Block::V2(TestBlockBuilder::new().build(rng)); - let execution_result = ExecutionResultV2::random(rng); + let execution_result = SpeculativeExecutionResult::random(rng); let res = SpeculativeExecTxn::do_handle_request( Arc::new(ValidSpecExecMock { - block: block.clone(), execution_result: execution_result.clone(), }), - SpeculativeExecTxnParams { - block_identifier: Some(BlockIdentifier::Hash(*block.hash())), - transaction, - }, + SpeculativeExecTxnParams { transaction }, ) .await .expect("should handle request"); assert_eq!( res, SpeculativeExecTxnResult { - block_hash: *block.hash(), execution_result, - messages: Messages::new(), api_version: CURRENT_API_VERSION, } ) } struct ValidSpecExecMock { - block: Block, - execution_result: ExecutionResultV2, + execution_result: SpeculativeExecutionResult, } #[async_trait] @@ -245,7 +200,7 @@ mod tests { { Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( - self.block.clone_header(), + self.execution_result.clone(), SUPPORTED_PROTOCOL_VERSION, ), &[], @@ -253,10 +208,7 @@ mod tests { } BinaryRequest::TrySpeculativeExec { .. } => Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( - SpeculativeExecutionResult::new(Some(( - self.execution_result.clone(), - Messages::new(), - ))), + self.execution_result.clone(), SUPPORTED_PROTOCOL_VERSION, ), &[], diff --git a/rpc_sidecar/src/rpcs/state.rs b/rpc_sidecar/src/rpcs/state.rs index fa6ce598..e908a5be 100644 --- a/rpc_sidecar/src/rpcs/state.rs +++ b/rpc_sidecar/src/rpcs/state.rs @@ -1003,14 +1003,14 @@ mod tests { }; use crate::{rpcs::ErrorCode, ClientError, SUPPORTED_PROTOCOL_VERSION}; + use casper_binary_port::{ + BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, + GlobalStateQueryResult, GlobalStateRequest, InformationRequestTag, + }; use casper_types::{ addressable_entity::{ ActionThresholds, AssociatedKeys, EntityKindTag, MessageTopics, NamedKeys, }, - binary_port::{ - BinaryRequest, BinaryResponse, BinaryResponseAndRequest, GetRequest, - GlobalStateQueryResult, GlobalStateRequest, InformationRequestTag, - }, global_state::{TrieMerkleProof, TrieMerkleProofStep}, system::auction::{Bid, BidKind, ValidatorBid}, testing::TestRng, From 67b9b023b2c1cc0f08f6761410b97249e6e8b280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Wed, 27 Mar 2024 12:18:32 +0100 Subject: [PATCH 04/11] Re-add temporarily commented code --- rpc_sidecar/src/node_client.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/rpc_sidecar/src/node_client.rs b/rpc_sidecar/src/node_client.rs index 5f60d112..7a88e41e 100644 --- a/rpc_sidecar/src/node_client.rs +++ b/rpc_sidecar/src/node_client.rs @@ -186,14 +186,10 @@ pub trait NodeClient: Send + Sync { } async fn read_latest_switch_block_header(&self) -> Result, Error> { - Ok(None) - - // TODO[RC]: Align with the recently added `LatestSwitchBlockHeader` - - // let resp = self - // .read_info(InformationRequest::LatestSwitchBlockHeader) - // .await?; - // parse_response::(&resp.into()) + let resp = self + .read_info(InformationRequest::LatestSwitchBlockHeader) + .await?; + parse_response::(&resp.into()) } async fn read_node_status(&self) -> Result { From 45bfc5e8ed2fcd6ff21ddf04ab76330f3d14b4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Wed, 27 Mar 2024 12:18:53 +0100 Subject: [PATCH 05/11] Remove stray debug artifact --- rpc_sidecar/src/rpcs/chain.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rpc_sidecar/src/rpcs/chain.rs b/rpc_sidecar/src/rpcs/chain.rs index 29e79533..43aaa1f9 100644 --- a/rpc_sidecar/src/rpcs/chain.rs +++ b/rpc_sidecar/src/rpcs/chain.rs @@ -752,7 +752,6 @@ mod tests { BinaryRequest::Get(GetRequest::Information { info_type_tag, .. }) if InformationRequestTag::try_from(info_type_tag) == Ok(expected_tag) => { - dbg!(&1); Ok(BinaryResponseAndRequest::new( BinaryResponse::from_value( self.block.clone_header(), From 2cd7a9c3824c77732ccf72e8880670c824c8e886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 28 Mar 2024 10:22:39 +0100 Subject: [PATCH 06/11] Update RPC schema --- resources/test/rpc_schema.json | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index bb2051d5..4088cf6a 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -3090,7 +3090,8 @@ "type": "object", "required": [ "paid_amount", - "receipt" + "receipt", + "strike_price" ], "properties": { "receipt": { @@ -3108,6 +3109,12 @@ "$ref": "#/components/schemas/U512" } ] + }, + "strike_price": { + "description": "The gas price at the time of reservation.", + "type": "integer", + "format": "uint8", + "minimum": 0.0 } }, "additionalProperties": false @@ -3626,7 +3633,7 @@ "description": "A record of version 1 Transfers performed while executing the deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferV1Addr" + "$ref": "#/components/schemas/TransferAddr" } }, "cost": { @@ -3674,7 +3681,7 @@ "description": "A record of Transfers performed while executing the deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferV1Addr" + "$ref": "#/components/schemas/TransferAddr" } }, "cost": { @@ -4100,7 +4107,7 @@ "description": "Version 1 transfers performed by the Deploy.", "type": "array", "items": { - "$ref": "#/components/schemas/TransferV1Addr" + "$ref": "#/components/schemas/TransferAddr" } }, "from": { @@ -4130,7 +4137,7 @@ }, "additionalProperties": false }, - "TransferV1Addr": { + "TransferAddr": { "description": "Hex-encoded version 1 transfer address.", "type": "string" }, From 2f54517fecd60d391df5bf70a806acb8e15f9a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Fri, 29 Mar 2024 09:13:14 +0100 Subject: [PATCH 07/11] Update JSON schema --- resources/test/rpc_schema.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 4088cf6a..14d93b86 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -3104,11 +3104,9 @@ }, "paid_amount": { "description": "Price paid in the past to reserve space in a future block.", - "allOf": [ - { - "$ref": "#/components/schemas/U512" - } - ] + "type": "integer", + "format": "uint64", + "minimum": 0.0 }, "strike_price": { "description": "The gas price at the time of reservation.", @@ -3124,10 +3122,6 @@ } ] }, - "U512": { - "description": "Decimal representation of a 512-bit integer.", - "type": "string" - }, "InitiatorAddr": { "description": "The address of the initiator of a TransactionV1.", "oneOf": [ @@ -3356,7 +3350,7 @@ ], "properties": { "name": { - "description": "The package alias.", + "description": "The package name.", "type": "string" }, "version": { @@ -4145,6 +4139,10 @@ "description": "Hex-encoded, formatted URef.", "type": "string" }, + "U512": { + "description": "Decimal representation of a 512-bit integer.", + "type": "string" + }, "EraInfo": { "description": "Auction metadata. Intended to be recorded at each era.", "type": "object", From 55f474e4dd9068be8b13650cd2b75aa62f645170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Wed, 3 Apr 2024 10:45:30 +0200 Subject: [PATCH 08/11] Update RPC schema to cover `gas_price_tolerance` --- resources/test/rpc_schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 14d93b86..189d208a 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -3027,7 +3027,7 @@ "Classic": { "type": "object", "required": [ - "gas_price", + "gas_price_tolerance", "payment_amount", "standard_payment" ], @@ -3038,8 +3038,8 @@ "format": "uint64", "minimum": 0.0 }, - "gas_price": { - "description": "User-specified gas_price (minimum 1).", + "gas_price_tolerance": { + "description": "User-specified gas_price tolerance (minimum 1). This is interpreted to mean \"do not include this transaction in a block if the current gas price is greater than this number\"", "type": "integer", "format": "uint8", "minimum": 0.0 From a22f521a6ffe8ef64d4d3f61070c65ab9c6c5ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Wed, 3 Apr 2024 15:43:18 +0200 Subject: [PATCH 09/11] Remove stray debug print --- rpc_sidecar/src/node_client.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rpc_sidecar/src/node_client.rs b/rpc_sidecar/src/node_client.rs index b47cc16a..679a5d5d 100644 --- a/rpc_sidecar/src/node_client.rs +++ b/rpc_sidecar/src/node_client.rs @@ -199,7 +199,6 @@ pub trait NodeClient: Send + Sync { async fn read_node_status(&self) -> Result { let resp = self.read_info(InformationRequest::NodeStatus).await?; - error!("XXXXX - resp - {resp:?}"); parse_response::(&resp.into())?.ok_or(Error::EmptyEnvelope) } } From 47ee5fb2d9e4a945ba670ca8653ca87e304f36fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Fri, 5 Apr 2024 14:09:26 +0200 Subject: [PATCH 10/11] Re-enable support for `latest_switch_block_hash` in status --- rpc_sidecar/src/rpcs/info.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rpc_sidecar/src/rpcs/info.rs b/rpc_sidecar/src/rpcs/info.rs index ddf1a673..69cd95bd 100644 --- a/rpc_sidecar/src/rpcs/info.rs +++ b/rpc_sidecar/src/rpcs/info.rs @@ -491,9 +491,7 @@ impl RpcWithoutParams for GetStatus { last_progress: status.last_progress, available_block_range: status.available_block_range, block_sync: status.block_sync, - // TODO[RC]: Check this - //latest_switch_block_hash: status.latest_switch_block_hash, - latest_switch_block_hash: Default::default(), + latest_switch_block_hash: status.latest_switch_block_hash, build_version: status.build_version, }) } From ae07fbc8c155bc7a9056a41a0b3088c6514598e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Mon, 8 Apr 2024 11:52:24 +0200 Subject: [PATCH 11/11] Update dependencies --- Cargo.lock | 182 ++++++++++++++++++++++------------------- Cargo.toml | 5 +- rpc_sidecar/Cargo.toml | 4 +- 3 files changed, 99 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58f12df8..4fd17895 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.15" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "07dbbf24db18d609b1462965249abdf49129ccad073ec257da372adc83259c60" dependencies = [ "brotli", "flate2", @@ -239,7 +239,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -250,7 +250,7 @@ checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.5.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +checksum = "125740193d7fee5cc63ab9e16c2fdc4e07c74ba755cc53b327d6ea029e9fc569" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -411,9 +411,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.5.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "65622a320492e09b5e0ac436b14c54ff68199bac392d0e89a6832c4518eea525" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -468,7 +468,7 @@ checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -507,6 +507,7 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" +source = "git+https://github.com/casper-network/casper-node?branch=feat-2.0#288f0be84226806a70d5818a25480c3c2d346fab" dependencies = [ "bincode", "casper-types", @@ -565,7 +566,7 @@ dependencies = [ "futures-util", "hex", "hex_fmt", - "http", + "http 0.2.12", "hyper", "indexmap 2.2.6", "itertools 0.10.5", @@ -623,7 +624,7 @@ dependencies = [ "bytes", "env_logger", "futures", - "http", + "http 0.2.12", "hyper", "itertools 0.10.5", "metrics", @@ -650,7 +651,7 @@ dependencies = [ "casper-types", "datasize", "futures", - "http", + "http 0.2.12", "hyper", "juliet", "metrics", @@ -702,6 +703,7 @@ dependencies = [ [[package]] name = "casper-types" version = "3.0.0" +source = "git+https://github.com/casper-network/casper-node?branch=feat-2.0#288f0be84226806a70d5818a25480c3c2d346fab" dependencies = [ "base16", "base64 0.13.1", @@ -744,9 +746,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" dependencies = [ "jobserver", "libc", @@ -802,7 +804,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", ] [[package]] @@ -814,7 +816,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -890,9 +892,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "c2b432c56615136f8dba245fed7ec3d5518c500a31108661067e61e72fe7e6bc" dependencies = [ "crc-catalog", ] @@ -1000,7 +1002,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1033,9 +1035,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -1070,7 +1072,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1512,7 +1514,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -1558,9 +1560,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6" dependencies = [ "cfg-if", "js-sys", @@ -1841,7 +1843,7 @@ checksum = "1dff438f14e67e7713ab9332f5fd18c8f20eb7eb249494f6c2bf170522224032" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2088,16 +2090,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap 2.2.6", "slab", "tokio", @@ -2139,7 +2141,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http", + "http 0.2.12", "httpdate", "mime", "sha1", @@ -2151,7 +2153,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.12", ] [[package]] @@ -2253,6 +2255,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -2260,7 +2273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -2293,7 +2306,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -2359,7 +2372,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2531,13 +2544,12 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[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.5.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -2611,9 +2623,9 @@ 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 = "memmap2" @@ -2702,7 +2714,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 0.2.12", "httparse", "log", "memchr", @@ -2929,7 +2941,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -2940,9 +2952,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -3123,14 +3135,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -3421,9 +3433,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", @@ -3486,7 +3498,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-tls", @@ -3596,7 +3608,7 @@ dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", "rust-embed-utils", - "syn 2.0.55", + "syn 2.0.58", "walkdir", ] @@ -3675,9 +3687,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "rusty-fork" @@ -3781,7 +3793,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", "thiserror", ] @@ -3800,9 +3812,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3813,9 +3825,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -3863,7 +3875,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -3969,9 +3981,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640" [[package]] name = "slab" @@ -4347,9 +4359,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "structopt" @@ -4416,7 +4428,7 @@ dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", "rustversion", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -4449,9 +4461,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.55" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", @@ -4568,7 +4580,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -4651,9 +4663,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -4676,7 +4688,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -4714,9 +4726,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", @@ -4795,7 +4807,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -4858,14 +4870,14 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.1.0", "httparse", "log", "rand", @@ -5021,7 +5033,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5133,16 +5145,16 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" dependencies = [ "async-compression", "bytes", "futures-channel", "futures-util", "headers", - "http", + "http 0.2.12", "hyper", "log", "mime", @@ -5150,13 +5162,11 @@ dependencies = [ "multer", "percent-encoding", "pin-project", - "rustls-pemfile", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-stream", "tokio-tungstenite", "tokio-util", "tower-service", @@ -5196,7 +5206,7 @@ dependencies = [ "once_cell", "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", "wasm-bindgen-shared", ] @@ -5230,7 +5240,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5591,7 +5601,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2 1.0.79", "quote 1.0.35", - "syn 2.0.55", + "syn 2.0.58", ] [[package]] @@ -5641,9 +5651,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 5a7250e3..7c2a0bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ members = [ anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" -casper-types = { git = "https://github.com/casper-network/casper-node", branch="feat-2.0" } +casper-types = { git = "https://github.com/casper-network/casper-node", branch = "feat-2.0" } casper-event-sidecar = { path = "./event_sidecar", version = "1.0.0" } casper-event-types = { path = "./types", version = "1.0.0" } casper-rpc-sidecar = { path = "./rpc_sidecar", version = "1.0.0" } @@ -29,6 +29,3 @@ toml = "0.5.8" tracing = { version = "0", default-features = false } tracing-subscriber = "0" serde = { version = "1", default-features = false } - -[patch.'https://github.com/casper-network/casper-node'] -casper-types = { path = "../casper-node/types" } \ No newline at end of file diff --git a/rpc_sidecar/Cargo.toml b/rpc_sidecar/Cargo.toml index 1901fabc..ffd1e3ad 100644 --- a/rpc_sidecar/Cargo.toml +++ b/rpc_sidecar/Cargo.toml @@ -19,7 +19,7 @@ bincode = "1" bytes = "1.5.0" casper-json-rpc = { version = "1.0.0", path = "../json_rpc" } casper-types = { workspace = true, features = ["datasize", "json-schema", "std"] } -casper-binary-port = { path = "../../casper-node/binary_port" } +casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } datasize = { workspace = true, features = ["detailed", "fake_clock-types"] } futures = { workspace = true } http = "0.2.1" @@ -45,7 +45,7 @@ warp = { version = "0.3.6", features = ["compression"] } [dev-dependencies] assert-json-diff = "2" casper-types = { workspace = true, features = ["datasize", "json-schema", "std", "testing"] } -casper-binary-port = { path = "../../casper-node/binary_port", features = ["testing"] } +casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0", features = ["testing"] } pretty_assertions = "0.7.2" regex = "1" tempfile = "3"