diff --git a/Cargo.lock b/Cargo.lock index 83057ffd..f765d371 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -142,9 +142,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arc-swap" @@ -220,7 +220,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -231,7 +231,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -386,6 +386,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borrow-or-share" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eeab4423108c5d7c744f4d234de88d18d636100093ae04caf4825134b9c3a32" + [[package]] name = "brotli" version = "7.0.0" @@ -432,22 +438,22 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -486,16 +492,14 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#069bdaf5ce8477d2eb827edabdb3c90bacc1e466" +source = "git+https://github.com/casper-network/casper-node.git?branch=dev#18955ae981abaf0a87e4e9928829b97595419245" dependencies = [ "bincode", "bytes", "casper-types", "once_cell", "rand", - "schemars", "serde", - "serde-map-to-array", "strum 0.26.3", "strum_macros 0.26.4", "thiserror 1.0.69", @@ -554,7 +558,7 @@ dependencies = [ "hyper 0.14.32", "indexmap 2.7.0", "itertools", - "jsonschema", + "jsonschema 0.17.1", "metrics", "once_cell", "pg-embed", @@ -641,6 +645,7 @@ dependencies = [ "futures", "http 0.2.12", "hyper 0.14.32", + "jsonschema 0.26.2", "juliet", "metrics", "num-traits", @@ -693,7 +698,7 @@ dependencies = [ [[package]] name = "casper-types" version = "5.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#069bdaf5ce8477d2eb827edabdb3c90bacc1e466" +source = "git+https://github.com/casper-network/casper-node.git?branch=dev#18955ae981abaf0a87e4e9928829b97595419245" dependencies = [ "base16", "base64 0.13.1", @@ -736,9 +741,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "jobserver", "libc", @@ -792,7 +797,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -967,7 +972,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -990,7 +995,7 @@ dependencies = [ "ident_case", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1001,7 +1006,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1071,7 +1076,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1084,7 +1089,7 @@ dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", "rustc_version", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1152,7 +1157,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1243,6 +1248,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "email_address" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" +dependencies = [ + "serde", +] + [[package]] name = "encoding_rs" version = "0.8.35" @@ -1254,9 +1268,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -1264,9 +1278,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -1335,6 +1349,17 @@ dependencies = [ "regex", ] +[[package]] +name = "fancy-regex" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298" +dependencies = [ + "bit-set 0.8.0", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + [[package]] name = "faster-hex" version = "0.9.0" @@ -1385,6 +1410,17 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1918b65d96df47d3591bed19c5cca17e3fa5d0707318e4b5ef2eae01764df7e5" +dependencies = [ + "borrow-or-share", + "ref-cast", + "serde", +] + [[package]] name = "flume" version = "0.11.1" @@ -1436,6 +1472,16 @@ dependencies = [ "num", ] +[[package]] +name = "fraction" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f158e3ff0a1b334408dc9fb811cd99b446986f4d8b741bb08f9df1604085ae7" +dependencies = [ + "lazy_static", + "num", +] + [[package]] name = "fragile" version = "2.0.0" @@ -1509,7 +1555,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1634,7 +1680,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53" dependencies = [ - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -1643,7 +1689,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7" dependencies = [ - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -1691,7 +1737,7 @@ dependencies = [ "bstr", "gix-path", "libc", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -1844,7 +1890,7 @@ checksum = "999ce923619f88194171a67fb3e6d613653b8d4d6078b529b15a765da0edcc17" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1914,7 +1960,7 @@ dependencies = [ "gix-trace", "home", "once_cell", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -1925,7 +1971,7 @@ checksum = "64a1e282216ec2ab2816cd57e6ed88f8009e634aec47562883c05ac8a7009a63" dependencies = [ "bstr", "gix-utils", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -2374,9 +2420,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", @@ -2552,7 +2598,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2612,7 +2658,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2690,8 +2736,8 @@ dependencies = [ "base64 0.21.7", "bytecount", "clap", - "fancy-regex", - "fraction", + "fancy-regex 0.11.0", + "fraction 0.13.1", "getrandom", "iso8601", "itoa", @@ -2709,6 +2755,31 @@ dependencies = [ "uuid", ] +[[package]] +name = "jsonschema" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26a960f0c34d5423581d858ce94815cc11f0171b09939409097969ed269ede1b" +dependencies = [ + "ahash", + "base64 0.22.1", + "bytecount", + "email_address", + "fancy-regex 0.14.0", + "fraction 0.15.3", + "idna", + "itoa", + "num-cmp", + "once_cell", + "percent-encoding", + "referencing", + "regex-syntax 0.8.5", + "reqwest 0.12.9", + "serde", + "serde_json", + "uuid-simd", +] + [[package]] name = "juliet" version = "0.3.0" @@ -2750,9 +2821,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" @@ -2929,7 +3000,7 @@ dependencies = [ "cfg-if", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3081,7 +3152,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3147,9 +3218,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -3189,7 +3260,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3216,6 +3287,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "overload" version = "0.1.1" @@ -3349,7 +3426,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3417,9 +3494,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "predicates-core", @@ -3427,15 +3504,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -3668,6 +3745,39 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2 1.0.92", + "quote 1.0.37", + "syn 2.0.91", +] + +[[package]] +name = "referencing" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e15af8558cb157432dd3d88c1d1e982d0a5755cf80ce593b6499260aebc49" +dependencies = [ + "ahash", + "fluent-uri", + "once_cell", + "percent-encoding", + "serde_json", +] + [[package]] name = "regex" version = "1.11.1" @@ -3761,6 +3871,7 @@ dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", "h2 0.4.7", @@ -3862,7 +3973,7 @@ dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", "rust-embed-utils", - "syn 2.0.90", + "syn 2.0.91", "walkdir", ] @@ -4037,7 +4148,7 @@ dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4082,7 +4193,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", "thiserror 1.0.69", ] @@ -4114,9 +4225,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" dependencies = [ "core-foundation-sys", "libc", @@ -4164,7 +4275,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4175,14 +4286,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "indexmap 2.7.0", "itoa", @@ -4609,7 +4720,7 @@ dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", "rustversion", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4622,7 +4733,7 @@ dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", "rustversion", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4655,9 +4766,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", @@ -4687,7 +4798,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4783,9 +4894,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" @@ -4798,11 +4909,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.7", + "thiserror-impl 2.0.9", ] [[package]] @@ -4813,18 +4924,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "thiserror-impl" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4902,9 +5013,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -4941,7 +5052,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5072,7 +5183,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5313,7 +5424,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5337,6 +5448,17 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +[[package]] +name = "uuid-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8" +dependencies = [ + "outref", + "uuid", + "vsimd", +] + [[package]] name = "valuable" version = "0.1.0" @@ -5368,6 +5490,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "vte" version = "0.10.1" @@ -5480,7 +5608,7 @@ dependencies = [ "log", "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-shared", ] @@ -5515,7 +5643,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5857,7 +5985,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", "synstructure", ] @@ -5879,7 +6007,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5899,7 +6027,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", "synstructure", ] @@ -5928,7 +6056,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2888a3e1..a42dbc70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ members = [ anyhow = "1" async-stream = "0.3.4" async-trait = "0.1.77" -casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0", features = ["json-schema"]} -casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "feat-2.0" } +casper-types = { git = "https://github.com/casper-network/casper-node.git", branch = "dev", features = ["json-schema"]} +casper-binary-port = { git = "https://github.com/casper-network/casper-node.git", branch = "dev" } 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" } @@ -31,3 +31,4 @@ toml = "0.5.8" tracing = { version = "0", default-features = false } tracing-subscriber = "0" serde = { version = "1", default-features = false } +jsonschema = "0.26.2" \ No newline at end of file diff --git a/rpc_sidecar/Cargo.toml b/rpc_sidecar/Cargo.toml index 8df779b0..e2b1ab7d 100644 --- a/rpc_sidecar/Cargo.toml +++ b/rpc_sidecar/Cargo.toml @@ -53,6 +53,7 @@ pretty_assertions = "1" regex = "1" tempfile = "3" tokio = { workspace = true, features = ["test-util"] } +jsonschema = { workspace = true } [build-dependencies] vergen = { version = "8.3.2", default-features = false, features = [ diff --git a/rpc_sidecar/src/rpcs.rs b/rpc_sidecar/src/rpcs.rs index f4ab4143..30d0885b 100644 --- a/rpc_sidecar/src/rpcs.rs +++ b/rpc_sidecar/src/rpcs.rs @@ -12,6 +12,7 @@ pub mod info; pub mod speculative_exec; pub mod speculative_open_rpc_schema; pub mod state; +mod types; use std::{fmt, str, sync::Arc, time::Duration}; diff --git a/rpc_sidecar/src/rpcs/info.rs b/rpc_sidecar/src/rpcs/info.rs index 632e2d68..bd623070 100644 --- a/rpc_sidecar/src/rpcs/info.rs +++ b/rpc_sidecar/src/rpcs/info.rs @@ -448,6 +448,7 @@ pub struct GetStatusResult { /// The state root hash of the lowest block in the available block range. pub starting_state_root_hash: Digest, /// The minimal info of the last block from the linear chain. + #[schemars(with = "Option")] pub last_added_block_info: Option, /// Our public signing key. pub our_public_signing_key: Option, diff --git a/rpc_sidecar/src/rpcs/speculative_exec.rs b/rpc_sidecar/src/rpcs/speculative_exec.rs index 83884a1b..919637ae 100644 --- a/rpc_sidecar/src/rpcs/speculative_exec.rs +++ b/rpc_sidecar/src/rpcs/speculative_exec.rs @@ -51,6 +51,7 @@ pub struct SpeculativeExecTxnResult { #[schemars(with = "String")] pub api_version: ApiVersion, /// Result of the speculative execution. + #[schemars(with = "crate::rpcs::types::SpeculativeExecutionResultSchema")] pub execution_result: SpeculativeExecutionResult, } diff --git a/rpc_sidecar/src/rpcs/types.rs b/rpc_sidecar/src/rpcs/types.rs new file mode 100644 index 00000000..1f451d10 --- /dev/null +++ b/rpc_sidecar/src/rpcs/types.rs @@ -0,0 +1,60 @@ +use casper_types::{ + contract_messages::Messages, execution::Effects, BlockHash, Digest, EraId, Gas, PublicKey, + Timestamp, Transfer, +}; +use schemars::JsonSchema; + +#[allow(dead_code)] +#[derive(JsonSchema)] +#[schemars(deny_unknown_fields, rename = "MinimalBlockInfo")] +/// Minimal info about a `Block` needed to satisfy the node status request. +pub(crate) struct MinimalBlockInfoSchema { + hash: BlockHash, + timestamp: Timestamp, + era_id: EraId, + height: u64, + state_root_hash: Digest, + creator: PublicKey, +} + +#[allow(dead_code)] +#[derive(JsonSchema)] +#[schemars(rename = "SpeculativeExecutionResult")] +pub(crate) struct SpeculativeExecutionResultSchema { + /// Block hash against which the execution was performed. + block_hash: BlockHash, + /// List of transfers that happened during execution. + transfers: Vec, + /// Gas limit. + limit: Gas, + /// Gas consumed. + consumed: Gas, + /// Execution effects. + effects: Effects, + /// Messages emitted during execution. + messages: Messages, + /// Did the wasm execute successfully? + error: Option, +} + +#[cfg(test)] +mod tests { + use casper_binary_port::SpeculativeExecutionResult; + use casper_types::testing::TestRng; + use schemars::schema_for; + use serde_json::json; + + use crate::rpcs::types::SpeculativeExecutionResultSchema; + + #[test] + pub fn speculative_execution_result_should_validate_against_schema() { + let mut test_rng = TestRng::new(); + let ser = SpeculativeExecutionResult::random(&mut test_rng); + let schema_struct = schema_for!(SpeculativeExecutionResultSchema); + + let schema = json!(schema_struct); + let instance = serde_json::to_value(&ser).expect("should json-serialize result"); + + assert!(jsonschema::is_valid(&schema, &instance)); + } +}