diff --git a/Cargo.lock b/Cargo.lock index dfb7fd5f..3fa77171 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "casper-binary-port" version = "1.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#7bc6e437185fd2d9d68ee41210c268a0b9608c56" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#73b32058133b445e0a2a2485880ba07b9f0582b9" dependencies = [ "bincode", "bytes", @@ -511,7 +511,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tokio-stream", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tracing", "url", "warp", @@ -559,7 +559,7 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tokio-stream", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tower", "tracing", "tracing-subscriber", @@ -678,7 +678,7 @@ dependencies = [ [[package]] name = "casper-types" version = "5.0.0" -source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#7bc6e437185fd2d9d68ee41210c268a0b9608c56" +source = "git+https://github.com/casper-network/casper-node.git?branch=feat-2.0#73b32058133b445e0a2a2485880ba07b9f0582b9" dependencies = [ "base16", "base64 0.13.1", @@ -721,9 +721,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" dependencies = [ "jobserver", "libc", @@ -748,9 +748,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -758,9 +758,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -782,9 +782,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clru" @@ -1328,9 +1328,9 @@ checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -1619,7 +1619,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53" dependencies = [ - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -1628,7 +1628,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7" dependencies = [ - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -1676,7 +1676,7 @@ dependencies = [ "bstr", "gix-path", "libc", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -1899,7 +1899,7 @@ dependencies = [ "gix-trace", "home", "once_cell", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -1910,7 +1910,7 @@ checksum = "64a1e282216ec2ab2816cd57e6ed88f8009e634aec47562883c05ac8a7009a63" dependencies = [ "bstr", "gix-utils", - "thiserror 2.0.4", + "thiserror 2.0.6", ] [[package]] @@ -2090,7 +2090,7 @@ dependencies = [ "indexmap 2.7.0", "slab", "tokio", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tracing", ] @@ -2109,7 +2109,7 @@ dependencies = [ "indexmap 2.7.0", "slab", "tokio", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tracing", ] @@ -2656,9 +2656,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -2735,9 +2735,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.167" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libm" @@ -3772,7 +3772,7 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tower-service", "url", "wasm-bindgen", @@ -3878,15 +3878,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4783,11 +4783,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl 2.0.6", ] [[package]] @@ -4803,9 +4803,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", @@ -4941,25 +4941,24 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls 0.23.19", - "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util 0.7.12", + "tokio-util 0.7.13", ] [[package]] @@ -4990,9 +4989,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -5020,7 +5019,7 @@ dependencies = [ "futures-util", "pin-project-lite", "tokio", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tower-layer", "tower-service", "tracing", @@ -5428,7 +5427,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-tungstenite", - "tokio-util 0.7.12", + "tokio-util 0.7.13", "tower-service", "tracing", ] @@ -5447,9 +5446,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -5458,13 +5457,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2 1.0.92", "quote 1.0.37", "syn 2.0.90", @@ -5473,9 +5471,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", @@ -5486,9 +5484,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote 1.0.37", "wasm-bindgen-macro-support", @@ -5496,9 +5494,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", @@ -5509,9 +5507,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-streams" @@ -5528,9 +5526,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/resources/test/rpc_schema.json b/resources/test/rpc_schema.json index 92cdbe5d..7a542f19 100644 --- a/resources/test/rpc_schema.json +++ b/resources/test/rpc_schema.json @@ -166,7 +166,7 @@ "name": "transaction", "value": { "Version1": { - "hash": "c4e359a70070d31d50d9d59782f76bb244ca8c24fef78fffa40577a98f004982", + "hash": "e6bc93a30584fefced99be08c1861164b357c74e4904b5d2e7146896aaaaf843", "payload": { "initiator_addr": { "PublicKey": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c" @@ -186,10 +186,8 @@ [ "source", { - "cl_type": { - "Option": "URef" - }, - "bytes": "010a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", + "cl_type": "URef", + "bytes": "0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", "parsed": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007" } ], @@ -229,7 +227,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0156559645f690954c8b4f870e362fa5af1f25d2ca109c4c13b02b25a6d7cef413b077dbccf0bedeabdf318aef777c387dc706c10f99a78de754dc2aad9f8ac107" + "signature": "0124fd45fa4ad49f048d116ba86fa84cecc8e4a1c49cbae824db97472a9f5de6c63e6e77723e55d00b78605ee9a69a27ea23a73e47d29d0778534e053f18ca4101" } ] } @@ -241,7 +239,7 @@ "value": { "api_version": "2.0.0", "transaction_hash": { - "Version1": "c4e359a70070d31d50d9d59782f76bb244ca8c24fef78fffa40577a98f004982" + "Version1": "e6bc93a30584fefced99be08c1861164b357c74e4904b5d2e7146896aaaaf843" } } } @@ -483,7 +481,7 @@ { "name": "transaction_hash", "value": { - "Version1": "c4e359a70070d31d50d9d59782f76bb244ca8c24fef78fffa40577a98f004982" + "Version1": "e6bc93a30584fefced99be08c1861164b357c74e4904b5d2e7146896aaaaf843" } }, { @@ -497,7 +495,7 @@ "api_version": "2.0.0", "transaction": { "Version1": { - "hash": "c4e359a70070d31d50d9d59782f76bb244ca8c24fef78fffa40577a98f004982", + "hash": "e6bc93a30584fefced99be08c1861164b357c74e4904b5d2e7146896aaaaf843", "payload": { "initiator_addr": { "PublicKey": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c" @@ -517,10 +515,8 @@ [ "source", { - "cl_type": { - "Option": "URef" - }, - "bytes": "010a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", + "cl_type": "URef", + "bytes": "0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", "parsed": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007" } ], @@ -560,7 +556,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0156559645f690954c8b4f870e362fa5af1f25d2ca109c4c13b02b25a6d7cef413b077dbccf0bedeabdf318aef777c387dc706c10f99a78de754dc2aad9f8ac107" + "signature": "0124fd45fa4ad49f048d116ba86fa84cecc8e4a1c49cbae824db97472a9f5de6c63e6e77723e55d00b78605ee9a69a27ea23a73e47d29d0778534e053f18ca4101" } ] } @@ -6234,7 +6230,7 @@ ], "properties": { "SmartContract": { - "$ref": "#/components/schemas/TransactionRuntime" + "$ref": "#/components/schemas/ContractRuntimeTag" } }, "additionalProperties": false @@ -6274,23 +6270,12 @@ } ] }, - "TransactionRuntime": { + "ContractRuntimeTag": { "description": "Runtime used to execute a Transaction.", - "oneOf": [ - { - "description": "The Casper Version 1 Virtual Machine.", - "type": "string", - "enum": [ - "VmCasperV1" - ] - }, - { - "description": "The Casper Version 2 Virtual Machine.", - "type": "string", - "enum": [ - "VmCasperV2" - ] - } + "type": "string", + "enum": [ + "VmCasperV1", + "VmCasperV2" ] }, "PackageHash": { diff --git a/resources/test/speculative_rpc_schema.json b/resources/test/speculative_rpc_schema.json index b6bb11af..9928521c 100644 --- a/resources/test/speculative_rpc_schema.json +++ b/resources/test/speculative_rpc_schema.json @@ -174,7 +174,7 @@ "name": "transaction", "value": { "Version1": { - "hash": "c4e359a70070d31d50d9d59782f76bb244ca8c24fef78fffa40577a98f004982", + "hash": "e6bc93a30584fefced99be08c1861164b357c74e4904b5d2e7146896aaaaf843", "payload": { "initiator_addr": { "PublicKey": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c" @@ -194,10 +194,8 @@ [ "source", { - "cl_type": { - "Option": "URef" - }, - "bytes": "010a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", + "cl_type": "URef", + "bytes": "0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a07", "parsed": "uref-0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a-007" } ], @@ -237,7 +235,7 @@ "approvals": [ { "signer": "01d9bf2148748a85c89da5aad8ee0b0fc2d105fd39d41a4c796536354f0ae2900c", - "signature": "0156559645f690954c8b4f870e362fa5af1f25d2ca109c4c13b02b25a6d7cef413b077dbccf0bedeabdf318aef777c387dc706c10f99a78de754dc2aad9f8ac107" + "signature": "0124fd45fa4ad49f048d116ba86fa84cecc8e4a1c49cbae824db97472a9f5de6c63e6e77723e55d00b78605ee9a69a27ea23a73e47d29d0778534e053f18ca4101" } ] } @@ -2762,7 +2760,7 @@ ], "properties": { "SmartContract": { - "$ref": "#/components/schemas/TransactionRuntime" + "$ref": "#/components/schemas/ContractRuntimeTag" } }, "additionalProperties": false @@ -2802,23 +2800,12 @@ } ] }, - "TransactionRuntime": { + "ContractRuntimeTag": { "description": "Runtime used to execute a Transaction.", - "oneOf": [ - { - "description": "The Casper Version 1 Virtual Machine.", - "type": "string", - "enum": [ - "VmCasperV1" - ] - }, - { - "description": "The Casper Version 2 Virtual Machine.", - "type": "string", - "enum": [ - "VmCasperV2" - ] - } + "type": "string", + "enum": [ + "VmCasperV1", + "VmCasperV2" ] }, "PackageHash": { diff --git a/rpc_sidecar/src/rpcs/state.rs b/rpc_sidecar/src/rpcs/state.rs index cec1da9e..9641972d 100644 --- a/rpc_sidecar/src/rpcs/state.rs +++ b/rpc_sidecar/src/rpcs/state.rs @@ -1420,8 +1420,8 @@ mod tests { }, testing::TestRng, AccessRights, AddressableEntity, AvailableBlockRange, Block, ByteCode, ByteCodeHash, - ByteCodeKind, Contract, ContractWasm, ContractWasmHash, EntityKind, NamedKeys, PackageHash, - ProtocolVersion, TestBlockBuilder, TransactionRuntime, + ByteCodeKind, Contract, ContractRuntimeTag, ContractWasm, ContractWasmHash, EntityKind, + NamedKeys, PackageHash, ProtocolVersion, TestBlockBuilder, }; use pretty_assertions::assert_eq; use rand::Rng; @@ -2027,7 +2027,7 @@ mod tests { rng.gen(), AssociatedKeys::default(), ActionThresholds::default(), - EntityKind::SmartContract(TransactionRuntime::VmCasperV2), + EntityKind::SmartContract(ContractRuntimeTag::VmCasperV2), ); let addr: EntityAddr = rng.gen();