From ee0421c2971a18b905cc12f352a3ea7cee6ed10e Mon Sep 17 00:00:00 2001 From: Emma Turner Date: Mon, 1 Jul 2024 14:13:39 +0100 Subject: [PATCH] feat(deps): bump to tezedge 0.6.0 pre-release --- Cargo.lock | 195 +++++++++++++--------- Cargo.toml | 22 ++- crates/jstz_crypto/src/error.rs | 7 +- crates/jstz_crypto/src/hash.rs | 2 +- crates/jstz_crypto/src/lib.rs | 2 +- crates/jstz_crypto/src/public_key_hash.rs | 4 +- crates/jstz_crypto/src/secret_key.rs | 17 +- crates/jstz_crypto/src/signature.rs | 2 +- crates/jstz_kernel/src/inbox.rs | 2 +- crates/jstz_kernel/src/lib.rs | 5 +- 10 files changed, 143 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1de23317..99dfc8064 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,7 +80,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -193,7 +193,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -242,7 +242,7 @@ checksum = "9aa0b287c8de4a76b691f29dbb5451e8dd5b79d777eaf87350c9b0cbfdb5e968" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -410,7 +410,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -454,12 +454,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base58" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" - [[package]] name = "base64" version = "0.13.1" @@ -548,7 +542,7 @@ dependencies = [ "boa_interner", "boa_macros", "indexmap 2.1.0", - "num-bigint 0.4.4", + "num-bigint", "rustc-hash", ] @@ -570,7 +564,7 @@ dependencies = [ "icu_normalizer", "indexmap 2.1.0", "itertools", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", "num_enum", @@ -624,7 +618,7 @@ source = "git+https://github.com/trilitech/boa.git?branch=ryutamago/fix-undefine dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "synstructure 0.13.0", ] @@ -640,7 +634,7 @@ dependencies = [ "boa_profiler", "fast-float", "icu_properties", - "num-bigint 0.4.4", + "num-bigint", "num-traits", "regress", "rustc-hash", @@ -821,7 +815,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1044,7 +1038,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1077,7 +1071,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1088,7 +1082,7 @@ checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1128,7 +1122,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1183,7 +1177,16 @@ version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", ] [[package]] @@ -1207,6 +1210,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1226,7 +1241,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -1603,7 +1618,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2043,7 +2058,7 @@ checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2224,7 +2239,7 @@ dependencies = [ "daemonize", "derive_more", "dialoguer", - "dirs", + "dirs 3.0.2", "env_logger", "fs_extra", "futures", @@ -2333,7 +2348,7 @@ dependencies = [ "base64 0.13.1", "bincode", "clap 4.4.18", - "dirs", + "dirs 3.0.2", "env_logger", "futures-util", "hex", @@ -2387,7 +2402,7 @@ dependencies = [ "bincode", "clap 4.4.18", "derive_more", - "dirs", + "dirs 3.0.2", "figment", "fs_extra", "hex", @@ -2699,18 +2714,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", - "serde", -] - [[package]] name = "num-bigint" version = "0.4.4" @@ -2772,7 +2775,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2861,7 +2864,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -2882,6 +2885,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "os_str_bytes" version = "6.6.1" @@ -2982,7 +2991,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -3021,7 +3030,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -3145,9 +3154,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3160,7 +3169,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "version_check", "yansi", ] @@ -3202,9 +3211,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -3697,7 +3706,7 @@ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -3763,7 +3772,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -3820,6 +3829,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs 5.0.1", +] + [[package]] name = "signal-hook" version = "0.3.17" @@ -4024,9 +4042,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -4059,7 +4077,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "unicode-xid", ] @@ -4177,14 +4195,16 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "tezos-smart-rollup" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "hermit", + "hex", "tezos-smart-rollup-core", "tezos-smart-rollup-debug", "tezos-smart-rollup-encoding", "tezos-smart-rollup-entrypoint", "tezos-smart-rollup-host", + "tezos-smart-rollup-macros", "tezos-smart-rollup-mock", "tezos-smart-rollup-storage", "tezos_crypto_rs", @@ -4194,12 +4214,12 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-constants" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" [[package]] name = "tezos-smart-rollup-core" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "tezos-smart-rollup-constants", ] @@ -4207,7 +4227,7 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-debug" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "tezos-smart-rollup-core", "tezos-smart-rollup-host", @@ -4216,11 +4236,11 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-encoding" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "hex", "nom", - "num-bigint 0.3.3", + "num-bigint", "num-traits", "regex", "tezos-smart-rollup-core", @@ -4235,7 +4255,7 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-entrypoint" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "dlmalloc", "tezos-smart-rollup-core", @@ -4247,7 +4267,7 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-host" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "tezos-smart-rollup-core", "tezos_crypto_rs", @@ -4290,10 +4310,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "tezos-smart-rollup-macros" +version = "0.2.2" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" +dependencies = [ + "proc-macro-error", + "quote", + "shellexpand", + "syn 2.0.68", +] + [[package]] name = "tezos-smart-rollup-mock" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "hex", "tezos-smart-rollup-core", @@ -4306,7 +4337,7 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-panic-hook" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "tezos-smart-rollup-core", ] @@ -4314,7 +4345,7 @@ dependencies = [ [[package]] name = "tezos-smart-rollup-storage" version = "0.2.2" -source = "git+https://gitlab.com/tezos/tezos.git#391c1f573b989ff8988d313b49b75310ea4f33ce" +source = "git+https://gitlab.com/tezos/tezos.git?rev=4fd8e9a794226a44914611a07213063068ef0c96#4fd8e9a794226a44914611a07213063068ef0c96" dependencies = [ "tezos-smart-rollup-core", "tezos-smart-rollup-debug", @@ -4326,23 +4357,24 @@ dependencies = [ [[package]] name = "tezos_crypto_rs" version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284fa6f4be10eff67ca5b2f9e8ec9544be81a07223f6a4c8d3a49a13aecce768" +source = "git+https://github.com/trilitech/tezedge.git?rev=0468da39f3133dbe6355fa8d443d3aeee10e3c0b#0468da39f3133dbe6355fa8d443d3aeee10e3c0b" dependencies = [ "anyhow", - "base58", + "bs58", "byteorder 1.5.0", "cryptoxide", "ed25519-dalek", "hex", "libsecp256k1", - "num-bigint 0.3.3", + "nom", + "num-bigint", "num-traits", "p256", "rand 0.7.3", "serde", "strum 0.20.0", "strum_macros 0.20.1", + "tezos_data_encoding", "thiserror", "zeroize", ] @@ -4350,18 +4382,16 @@ dependencies = [ [[package]] name = "tezos_data_encoding" version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c34be797025fcab7a9e417a4cc374925ee796af21f8d7df5e2330cdc2595af" +source = "git+https://github.com/trilitech/tezedge.git?rev=0468da39f3133dbe6355fa8d443d3aeee10e3c0b#0468da39f3133dbe6355fa8d443d3aeee10e3c0b" dependencies = [ "bit-vec", "bitvec", "hex", "lazy_static", "nom", - "num-bigint 0.3.3", + "num-bigint", "num-traits", "serde", - "tezos_crypto_rs", "tezos_data_encoding_derive", "thiserror", ] @@ -4369,8 +4399,7 @@ dependencies = [ [[package]] name = "tezos_data_encoding_derive" version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e0c104555ce4d8c790567d725dc49f519d721e114202e38e851c1ac5769f08" +source = "git+https://github.com/trilitech/tezedge.git?rev=0468da39f3133dbe6355fa8d443d3aeee10e3c0b#0468da39f3133dbe6355fa8d443d3aeee10e3c0b" dependencies = [ "lazy_static", "once_cell", @@ -4403,7 +4432,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4512,7 +4541,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4593,7 +4622,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -4859,7 +4888,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "wasm-bindgen-shared", ] @@ -4893,7 +4922,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5228,7 +5257,7 @@ checksum = "9e6936f0cce458098a201c245a11bef556c6a0181129c7034d10d76d1ec3a2b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "synstructure 0.13.0", ] @@ -5249,7 +5278,7 @@ checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -5269,7 +5298,7 @@ checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", "synstructure 0.13.0", ] @@ -5290,7 +5319,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] @@ -5312,7 +5341,7 @@ checksum = "7b4e5997cbf58990550ef1f0e5124a05e47e1ebd33a84af25739be6031a62c20" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.68", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b0f74ec3f..c03100a64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,15 +82,15 @@ version = "0.5.2" default-features = false [patch.crates-io] -tezos-smart-rollup = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-host = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-core = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-mock = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-encoding = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-entrypoint = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-debug = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-panic-hook = { git = "https://gitlab.com/tezos/tezos.git" } -tezos-smart-rollup-storage = { git = "https://gitlab.com/tezos/tezos.git" } +tezos-smart-rollup = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-host = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-core = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-mock = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-encoding = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-entrypoint = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-debug = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-panic-hook = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } +tezos-smart-rollup-storage = { git = "https://gitlab.com/tezos/tezos.git", rev = "4fd8e9a794226a44914611a07213063068ef0c96" } boa_ast = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } boa_engine = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } boa_gc = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } @@ -98,3 +98,7 @@ boa_interner = { git = "https://github.com/trilitech/boa.git", branch = "ryutama boa_macros = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } boa_parser = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } boa_profiler = { git = "https://github.com/trilitech/boa.git", branch = "ryutamago/fix-undefined-to-json" } + +tezos_crypto_rs = { git = "https://github.com/trilitech/tezedge.git", rev = "0468da39f3133dbe6355fa8d443d3aeee10e3c0b" } +tezos_data_encoding = { git = "https://github.com/trilitech/tezedge.git", rev = "0468da39f3133dbe6355fa8d443d3aeee10e3c0b" } +tezos_data_encoding_derive = { git = "https://github.com/trilitech/tezedge.git", rev = "0468da39f3133dbe6355fa8d443d3aeee10e3c0b" } \ No newline at end of file diff --git a/crates/jstz_crypto/src/error.rs b/crates/jstz_crypto/src/error.rs index ced34e53a..6f9e0bc13 100644 --- a/crates/jstz_crypto/src/error.rs +++ b/crates/jstz_crypto/src/error.rs @@ -1,16 +1,11 @@ use derive_more::{Display, Error, From}; -use tezos_crypto_rs::{ - base58::FromBase58CheckError, - hash::{FromBytesError, TryFromPKError}, - CryptoError, -}; +use tezos_crypto_rs::{base58::FromBase58CheckError, hash::FromBytesError, CryptoError}; #[derive(Display, Debug, Error, From)] pub enum Error { TezosFromBase58Error { source: FromBase58CheckError }, TezosFromBytesError { source: FromBytesError }, - TezosTryFromPKError { source: TryFromPKError }, TezosCryptoError { source: CryptoError }, InvalidSignature, } diff --git a/crates/jstz_crypto/src/hash.rs b/crates/jstz_crypto/src/hash.rs index c0d0c499a..c25475544 100644 --- a/crates/jstz_crypto/src/hash.rs +++ b/crates/jstz_crypto/src/hash.rs @@ -27,7 +27,7 @@ impl ToString for Blake2b { impl<'a> From<&'a [u8]> for Blake2b { fn from(data: &'a [u8]) -> Self { - let digest = tezos_crypto_rs::blake2b::digest_256(data).unwrap(); + let digest = tezos_crypto_rs::blake2b::digest_256(data); Self(digest.try_into().unwrap()) } } diff --git a/crates/jstz_crypto/src/lib.rs b/crates/jstz_crypto/src/lib.rs index 541d1bce5..252cd66a3 100644 --- a/crates/jstz_crypto/src/lib.rs +++ b/crates/jstz_crypto/src/lib.rs @@ -13,7 +13,7 @@ use crate::{hash::Blake2b, public_key::PublicKey, secret_key::SecretKey}; pub fn keypair_from_passphrase(passphrase: &str) -> Result<(SecretKey, PublicKey)> { let ikm = Blake2b::from(passphrase.as_bytes()).as_array().to_vec(); - let seed = SeedEd25519(ikm); + let seed = SeedEd25519::try_from(ikm)?; let (pk, sk) = seed.keypair()?; Ok((SecretKey::Ed25519(sk), PublicKey::Ed25519(pk))) } diff --git a/crates/jstz_crypto/src/public_key_hash.rs b/crates/jstz_crypto/src/public_key_hash.rs index 27a8a0fff..f7f468f3c 100644 --- a/crates/jstz_crypto/src/public_key_hash.rs +++ b/crates/jstz_crypto/src/public_key_hash.rs @@ -50,7 +50,7 @@ impl PublicKeyHash { pub fn as_bytes(&self) -> &[u8] { let PublicKeyHash::Tz1(tz1) = self; - &tz1.0 + tz1.as_ref() } pub fn digest(data: &[u8]) -> Result { let out_len = ContractTz1Hash::hash_size(); @@ -70,7 +70,7 @@ impl TryFrom<&PublicKey> for PublicKeyHash { fn try_from(pk: &PublicKey) -> Result { let PublicKey::Ed25519(key) = pk; - let tz1 = key.pk_hash()?; + let tz1 = key.pk_hash(); Ok(PublicKeyHash::Tz1(tz1)) } } diff --git a/crates/jstz_crypto/src/secret_key.rs b/crates/jstz_crypto/src/secret_key.rs index b475c98a1..8e85057e1 100644 --- a/crates/jstz_crypto/src/secret_key.rs +++ b/crates/jstz_crypto/src/secret_key.rs @@ -23,15 +23,14 @@ impl Debug for SecretKey { impl SecretKey { pub fn to_base58(&self) -> String { - let SecretKey::Ed25519(SecretKeyEd25519(sk)) = self; - let sk = SeedEd25519(sk.clone()); + let Self::Ed25519(sk) = self; sk.to_base58_check() } pub fn from_base58(data: &str) -> Result { - let SeedEd25519(sk) = SeedEd25519::from_base58_check(data)?; + let sk = SecretKeyEd25519::from_base58_check(data)?; - Ok(SecretKey::Ed25519(SecretKeyEd25519(sk))) + Ok(SecretKey::Ed25519(sk)) } pub fn sign(&self, message: impl AsRef<[u8]>) -> Result { @@ -53,14 +52,16 @@ enum SecretKeySerde { impl From for SecretKeySerde { fn from(s: SecretKey) -> Self { - let SecretKey::Ed25519(SecretKeyEd25519(sk)) = s; - Self::Ed25519(SeedEd25519(sk)) + let SecretKey::Ed25519(sk) = s; + let sk: Vec = sk.into(); + Self::Ed25519(SeedEd25519::try_from(sk).unwrap()) } } impl From for SecretKey { fn from(s: SecretKeySerde) -> Self { - let SecretKeySerde::Ed25519(SeedEd25519(sk)) = s; - Self::Ed25519(SecretKeyEd25519(sk)) + let SecretKeySerde::Ed25519(sk) = s; + let sk: Vec = sk.into(); + Self::Ed25519(SecretKeyEd25519::try_from(sk).unwrap()) } } diff --git a/crates/jstz_crypto/src/signature.rs b/crates/jstz_crypto/src/signature.rs index 6e2580906..55fc9d45a 100644 --- a/crates/jstz_crypto/src/signature.rs +++ b/crates/jstz_crypto/src/signature.rs @@ -5,7 +5,7 @@ use crate::{public_key::PublicKey, Error, Result}; #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] pub enum Signature { - Ed25519(tezos_crypto_rs::hash::Signature), + Ed25519(tezos_crypto_rs::hash::Ed25519Signature), } impl Signature { diff --git a/crates/jstz_kernel/src/inbox.rs b/crates/jstz_kernel/src/inbox.rs index 53adf52ec..fae5f4c98 100644 --- a/crates/jstz_kernel/src/inbox.rs +++ b/crates/jstz_kernel/src/inbox.rs @@ -41,7 +41,7 @@ fn read_transfer( } }; - if transfer.destination.hash().0 != &rt.reveal_metadata().raw_rollup_address { + if transfer.destination.hash().as_ref() != &rt.reveal_metadata().raw_rollup_address { debug_msg!( rt, "Deposit ignored because of different smart rollup address" diff --git a/crates/jstz_kernel/src/lib.rs b/crates/jstz_kernel/src/lib.rs index 5d51719e6..ce43777d8 100644 --- a/crates/jstz_kernel/src/lib.rs +++ b/crates/jstz_kernel/src/lib.rs @@ -2,7 +2,7 @@ use jstz_core::kv::{Storage, Transaction}; use jstz_proto::{executor, Result}; use tezos_crypto_rs::hash::ContractKt1Hash; use tezos_smart_rollup::{ - kernel_entry, + entrypoint, prelude::{debug_msg, Runtime}, storage::path::RefPath, }; @@ -38,6 +38,7 @@ fn handle_message(hrt: &mut impl Runtime, message: Message) -> Result<()> { } // kernel entry +#[entrypoint::main] pub fn entry(rt: &mut impl Runtime) { let ticketer = read_ticketer(rt); @@ -46,5 +47,3 @@ pub fn entry(rt: &mut impl Runtime) { .unwrap_or_else(|err| debug_msg!(rt, "[🔴] {err:?}\n")); } } - -kernel_entry!(entry);