diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3932f6a1a..771a22245 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -60,7 +60,7 @@ jobs: SYSTEM_TEST_VERBOSE_OUTPUT: "true" # the soroban test cases will compile various contracts from the examples repo - SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH: "782458d31395b0191ac40c9572ac53f13f573aa3" + SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_HASH: "main" SYSTEM_TEST_SOROBAN_EXAMPLES_GIT_REPO: "https://github.com/stellar/soroban-examples.git" steps: diff --git a/.gitignore b/.gitignore index 74abdb3f1..b59c63720 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ target/ captive-core/ .soroban/ +snapshot.json !test.toml *.sqlite test_snapshots diff --git a/Cargo.lock b/Cargo.lock index 7a54f07a3..f058f7f55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,11 +194,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener-strategy", + "event-listener-strategy 0.5.2", "futures-core", "pin-project-lite", ] +[[package]] +name = "async-compression" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +dependencies = [ + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + [[package]] name = "async-executor" version = "1.12.0" @@ -221,7 +234,7 @@ dependencies = [ "async-channel 2.3.1", "async-executor", "async-io 2.3.3", - "async-lock 3.4.0", + "async-lock 3.3.0", "blocking", "futures-lite 2.3.0", "once_cell", @@ -253,13 +266,13 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "async-lock 3.4.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.2", + "polling 3.7.0", "rustix 0.38.34", "slab", "tracing", @@ -277,12 +290,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 5.3.1", - "event-listener-strategy", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", "pin-project-lite", ] @@ -319,7 +332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" dependencies = [ "async-io 2.3.3", - "async-lock 3.4.0", + "async-lock 3.3.0", "atomic-waker", "cfg-if", "futures-core", @@ -530,7 +543,7 @@ dependencies = [ "hex", "http 1.1.0", "http-body-util", - "hyper 1.4.0", + "hyper 1.3.1", "hyper-named-pipe", "hyper-util", "hyperlocal-next", @@ -567,7 +580,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.6", "serde", ] @@ -594,9 +607,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bytes-lit" @@ -610,6 +623,12 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" + [[package]] name = "camino" version = "1.1.7" @@ -671,7 +690,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -707,9 +726,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.7" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d598e88f6874d4b888ed40c71efbcbf4076f1dfbae128a08a8c9e45f710605d" +checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" dependencies = [ "clap", ] @@ -728,9 +747,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clru" @@ -943,15 +962,16 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", + "platforms", "rustc_version", "subtle", "zeroize", @@ -1253,7 +1273,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.3", + "curve25519-dalek 4.1.2", "ed25519 2.2.3", "rand_core 0.6.4", "serde", @@ -1264,9 +1284,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "elliptic-curve" @@ -1374,22 +1394,43 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.3.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.1", + "event-listener 5.3.0", "pin-project-lite", ] @@ -1833,9 +1874,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eed6931f21491ee0aeb922751bd7ec97b4b2fe8fbfedcb678e2a2dce5f3b8c0" +checksum = "367ee9093b0c2b04fd04c5c7c8b6a1082713534eab537597ae343663a518fa99" dependencies = [ "bstr", "itoa", @@ -1924,9 +1965,9 @@ dependencies = [ [[package]] name = "gix-glob" -version = "0.16.3" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a29ad0990cf02c48a7aac76ed0dbddeb5a0d070034b83675cc3bbf937eace4" +checksum = "682bdc43cb3c00dbedfcc366de2a849b582efd8d886215dbad2ea662ec156bb5" dependencies = [ "bitflags 2.6.0", "bstr", @@ -2116,9 +2157,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.10.8" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca987128ffb056d732bd545db5db3d8b103d252fbf083c2567bb0796876619a4" +checksum = "23623cf0f475691a6d943f898c4d0b89f5c1a2a64d0f92bce0e0322ee6528783" dependencies = [ "bstr", "gix-trace", @@ -2170,7 +2211,7 @@ dependencies = [ "gix-utils", "maybe-async", "thiserror", - "winnow 0.6.13", + "winnow 0.6.8", ] [[package]] @@ -2419,8 +2460,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -2515,12 +2556,6 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hex" version = "0.4.3" @@ -2621,12 +2656,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", - "futures-util", + "futures-core", "http 1.1.0", "http-body 1.0.0", "pin-project-lite", @@ -2634,9 +2669,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -2659,7 +2694,7 @@ dependencies = [ "crossbeam-utils", "form_urlencoded", "futures-util", - "hyper 0.14.29", + "hyper 0.14.28", "lazy_static", "levenshtein", "log", @@ -2680,9 +2715,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -2704,9 +2739,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", @@ -2728,7 +2763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" dependencies = [ "hex", - "hyper 1.4.0", + "hyper 1.3.1", "hyper-util", "pin-project-lite", "tokio", @@ -2744,7 +2779,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.29", + "hyper 0.14.28", "log", "rustls 0.21.12", "rustls-native-certs", @@ -2759,7 +2794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.29", + "hyper 0.14.28", "native-tls", "tokio", "tokio-native-tls", @@ -2767,16 +2802,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "3d8d52be92d09acc2e01dddb7fde3ad983fc6489c7db4837e605bc3fca4cb63e" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.4.0", + "hyper 1.3.1", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -2793,7 +2828,7 @@ checksum = "acf569d43fa9848e510358c07b80f4adf34084ddc28c6a4a651ee8474c070dcc" dependencies = [ "hex", "http-body-util", - "hyper 1.4.0", + "hyper 1.3.1", "hyper-util", "pin-project-lite", "tokio", @@ -2849,7 +2884,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.6", "same-file", "walkdir", "winapi-util", @@ -2857,9 +2892,9 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" dependencies = [ "glob", "include_dir_macros", @@ -2867,9 +2902,9 @@ dependencies = [ [[package]] name = "include_dir_macros" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" dependencies = [ "proc-macro2", "quote", @@ -2928,7 +2963,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -2997,7 +3032,7 @@ dependencies = [ "async-trait", "beef", "futures-util", - "hyper 0.14.29", + "hyper 0.14.28", "jsonrpsee-types", "serde", "serde_json", @@ -3013,7 +3048,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" dependencies = [ "async-trait", - "hyper 0.14.29", + "hyper 0.14.28", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", @@ -3093,7 +3128,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.3", "string_cache", "term", "tiny-keccak", @@ -3107,14 +3142,14 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.7", + "regex-automata 0.4.6", ] [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "ledger-apdu" @@ -3214,9 +3249,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "value-bag", ] @@ -3243,9 +3278,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memmap2" @@ -3264,9 +3299,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] @@ -3284,10 +3319,11 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ + "lazy_static", "libc", "log", "openssl", @@ -3380,7 +3416,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -3448,9 +3484,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.3.0+3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "eba8804a1c5765b18c4b3f907e6897ebabeedebc9830e1a0046c4a4cf44663e1" dependencies = [ "cc", ] @@ -3516,9 +3552,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -3649,9 +3685,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" dependencies = [ "atomic-waker", "fastrand 2.1.0", @@ -3674,6 +3710,12 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + [[package]] name = "polling" version = "2.8.0" @@ -3692,13 +3734,13 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi", "pin-project-lite", "rustix 0.38.34", "tracing", @@ -3864,9 +3906,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ "bitflags 2.6.0", ] @@ -3884,14 +3926,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -3905,13 +3947,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.3", ] [[package]] @@ -3922,9 +3964,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" @@ -3940,7 +3982,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", + "hyper 0.14.28", "hyper-rustls", "hyper-tls", "ipnet", @@ -4119,7 +4161,7 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki 0.102.4", "subtle", "zeroize", ] @@ -4163,9 +4205,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" dependencies = [ "ring", "rustls-pki-types", @@ -4417,9 +4459,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" dependencies = [ "base64 0.22.1", "chrono", @@ -4435,9 +4477,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" dependencies = [ "darling", "proc-macro2", @@ -4661,13 +4703,15 @@ dependencies = [ [[package]] name = "soroban-cli" -version = "21.2.0" +version = "21.3.0" dependencies = [ "assert_cmd", "assert_fs", + "async-compression", "async-trait", "base64 0.21.7", "bollard", + "bytesize", "cargo_metadata", "chrono", "clap", @@ -4680,13 +4724,16 @@ dependencies = [ "dotenvy", "ed25519-dalek 2.1.1", "ethnum", + "flate2", + "futures", "futures-util", "gix", "heck 0.5.0", "hex", "home", "http 0.2.12", - "hyper 0.14.29", + "humantime", + "hyper 0.14.28", "hyper-tls", "itertools 0.10.5", "jsonrpsee-core", @@ -4725,6 +4772,7 @@ dependencies = [ "termcolor_output", "thiserror", "tokio", + "tokio-util", "toml 0.5.11", "toml_edit 0.21.1", "tracing", @@ -4774,7 +4822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e25aaffe0c62eb65e0e349f725b4b8b13ad0764d78a15aab5bbccb5c4797726" dependencies = [ "backtrace", - "curve25519-dalek 4.1.3", + "curve25519-dalek 4.1.2", "ecdsa", "ed25519-dalek 2.1.1", "elliptic-curve", @@ -4817,7 +4865,7 @@ dependencies = [ [[package]] name = "soroban-hello" -version = "21.2.0" +version = "21.3.0" [[package]] name = "soroban-ledger-snapshot" @@ -4887,7 +4935,7 @@ dependencies = [ [[package]] name = "soroban-spec-json" -version = "21.2.0" +version = "21.3.0" dependencies = [ "pretty_assertions", "serde", @@ -4917,7 +4965,7 @@ dependencies = [ [[package]] name = "soroban-spec-tools" -version = "21.2.0" +version = "21.3.0" dependencies = [ "base64 0.21.7", "ethnum", @@ -4936,7 +4984,7 @@ dependencies = [ [[package]] name = "soroban-spec-typescript" -version = "21.2.0" +version = "21.3.0" dependencies = [ "base64 0.21.7", "heck 0.4.1", @@ -4957,7 +5005,7 @@ dependencies = [ [[package]] name = "soroban-test" -version = "21.2.0" +version = "21.3.0" dependencies = [ "assert_cmd", "assert_fs", @@ -4977,7 +5025,7 @@ dependencies = [ "stellar-strkey", "thiserror", "tokio", - "toml 0.8.14", + "toml 0.8.13", "ulid", "walkdir", "which", @@ -5029,14 +5077,14 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stellar-cli" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-cli", ] [[package]] name = "stellar-ledger" -version = "21.2.0" +version = "21.3.0" dependencies = [ "async-trait", "bollard", @@ -5193,9 +5241,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.6.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -5341,35 +5389,35 @@ dependencies = [ [[package]] name = "test_custom_account" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", ] [[package]] name = "test_custom_types" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", ] [[package]] name = "test_hello_world" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", ] [[package]] name = "test_swap" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", ] [[package]] name = "test_token" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", "soroban-token-sdk", @@ -5377,7 +5425,7 @@ dependencies = [ [[package]] name = "test_udt" -version = "21.2.0" +version = "21.3.0" dependencies = [ "soroban-sdk", ] @@ -5491,9 +5539,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -5506,9 +5554,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -5525,9 +5573,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -5562,6 +5610,7 @@ checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -5578,14 +5627,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "toml_edit 0.22.13", ] [[package]] @@ -5610,15 +5659,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.6.8", ] [[package]] @@ -5782,9 +5831,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" @@ -5810,18 +5859,18 @@ dependencies = [ "once_cell", "rustls 0.22.4", "rustls-pki-types", - "rustls-webpki 0.102.5", + "rustls-webpki 0.102.4", "serde", "serde_json", "url", - "webpki-roots 0.26.3", + "webpki-roots 0.26.1", ] [[package]] name = "url" -version = "2.5.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -5830,9 +5879,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "valuable" @@ -6078,9 +6127,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" dependencies = [ "rustls-pki-types", ] @@ -6135,7 +6184,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -6153,7 +6202,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets 0.52.5", ] [[package]] @@ -6173,18 +6222,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -6195,9 +6244,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -6207,9 +6256,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -6219,15 +6268,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] name = "windows_i686_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -6237,9 +6286,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -6249,9 +6298,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -6261,9 +6310,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -6273,9 +6322,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -6288,9 +6337,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 1976a0581..ccdb447e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ default-members = ["cmd/soroban-cli", "cmd/crates/soroban-spec-tools", "cmd/crat exclude = ["cmd/crates/soroban-test/tests/fixtures/hello"] [workspace.package] -version = "21.2.0" +version = "21.3.0" rust-version = "1.79.0" [workspace.dependencies.soroban-env-host] @@ -27,15 +27,15 @@ version = "=21.2.0" version = "=21.2.0" [workspace.dependencies.soroban-spec-json] -version = "=21.2.0" +version = "=21.3.0" path = "./cmd/crates/soroban-spec-json" [workspace.dependencies.soroban-spec-typescript] -version = "21.2.0" +version = "21.3.0" path = "./cmd/crates/soroban-spec-typescript" [workspace.dependencies.soroban-spec-tools] -version = "21.2.0" +version = "21.3.0" path = "./cmd/crates/soroban-spec-tools" [workspace.dependencies.soroban-sdk] @@ -48,7 +48,7 @@ version = "=21.2.0" version = "=21.2.0" [workspace.dependencies.soroban-cli] -version = "=21.2.0" +version = "=21.3.0" path = "cmd/soroban-cli" [workspace.dependencies.soroban-rpc] diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index 6c694bce8..b3782ec02 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -47,6 +47,7 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c * `events` — Watch the network for contract events * `keys` — Create and manage identities including keys and addresses * `network` — Start and configure networks +* `snapshot` — Download a snapshot of a ledger from an archive * `tx` — Sign, Simulate, and Send transactions * `xdr` — Decode and encode XDR * `completion` — Print shell completion code for the specified shell @@ -998,6 +999,53 @@ Stop a network container started with `network container start` +## `stellar snapshot` + +Download a snapshot of a ledger from an archive + +**Usage:** `stellar snapshot ` + +###### **Subcommands:** + +* `create` — Create a ledger snapshot using a history archive + + + +## `stellar snapshot create` + +Create a ledger snapshot using a history archive. + +Filters (address, wasm-hash) specify what ledger entries to include. + +Account addresses include the account, and trust lines. + +Contract addresses include the related wasm, contract data. + +If a contract is a Stellar asset contract, it includes the asset issuer's account and trust lines, but does not include all the trust lines of other accounts holding the asset. To include them specify the addresses of relevant accounts. + +**Usage:** `stellar snapshot create [OPTIONS] --output ` + +###### **Options:** + +* `--ledger ` — The ledger sequence number to snapshot. Defaults to latest history archived ledger +* `--address
` — Account or contract address to include in the snapshot +* `--wasm-hash ` — WASM hashes to include in the snapshot +* `--output ` — Format of the out file + + Possible values: `json` + +* `--out ` — Out path that the snapshot is written to + + Default value: `snapshot.json` +* `--global` — Use global config +* `--config-dir ` — Location of config directory, default is "." +* `--rpc-url ` — RPC server endpoint +* `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server +* `--network ` — Name of network to use from config +* `--archive-url ` — Archive URL + + + ## `stellar tx` Sign, Simulate, and Send transactions diff --git a/cmd/crates/soroban-test/Cargo.toml b/cmd/crates/soroban-test/Cargo.toml index add2aa90b..48f94ddca 100644 --- a/cmd/crates/soroban-test/Cargo.toml +++ b/cmd/crates/soroban-test/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/soroban-test" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "21.2.0" +version = "21.3.0" edition = "2021" rust-version.workspace = true autobins = false diff --git a/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml index 68c5667c5..0b28f4ef1 100644 --- a/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/hello/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "soroban-hello" -version = "21.2.0" +version = "21.3.0" edition = "2021" publish = false diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml index ead561d8b..bfb870d35 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_account/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test_custom_account" -version = "21.2.0" +version = "21.3.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml index 5f58afe17..8eb1875c6 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/custom_type/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test_custom_types" -version = "21.2.0" +version = "21.3.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml index f4e35da4f..dcdae0280 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test_hello_world" -version = "21.2.0" +version = "21.3.0" authors = ["Stellar Development Foundation "] license = "Apache-2.0" edition = "2021" diff --git a/cmd/crates/soroban-test/tests/it/init.rs b/cmd/crates/soroban-test/tests/it/init.rs new file mode 100644 index 000000000..6eada4ce6 --- /dev/null +++ b/cmd/crates/soroban-test/tests/it/init.rs @@ -0,0 +1,26 @@ +use assert_fs::prelude::*; +use predicates::prelude::predicate; +use soroban_test::TestEnv; + +#[test] +fn init() { + let sandbox = TestEnv::default(); + let major = soroban_cli::commands::version::pkg() + .split('.') + .next() + .unwrap(); + sandbox + .new_assert_cmd("contract") + .arg("init") + .arg(".") + .assert() + .success(); + sandbox + .dir() + .child("Cargo.toml") + .assert(predicate::function(|c: &str| { + let table = toml::from_str::(c).unwrap(); + table["workspace"]["dependencies"]["soroban-sdk"].as_str() + == Some(&format!("{major}.0.0")) + })); +} diff --git a/cmd/crates/soroban-test/tests/it/integration.rs b/cmd/crates/soroban-test/tests/it/integration.rs index b25d47313..8e2bb89a4 100644 --- a/cmd/crates/soroban-test/tests/it/integration.rs +++ b/cmd/crates/soroban-test/tests/it/integration.rs @@ -3,6 +3,7 @@ mod custom_types; mod dotenv; mod fund; mod hello_world; +mod snapshot; mod tx; mod util; mod wrap; diff --git a/cmd/crates/soroban-test/tests/it/integration/snapshot.rs b/cmd/crates/soroban-test/tests/it/integration/snapshot.rs new file mode 100644 index 000000000..ceb52985f --- /dev/null +++ b/cmd/crates/soroban-test/tests/it/integration/snapshot.rs @@ -0,0 +1,83 @@ +use assert_fs::prelude::*; +use predicates::prelude::*; +use soroban_test::{AssertExt, TestEnv}; + +#[test] +#[allow(clippy::too_many_lines)] +fn snapshot() { + let sandbox = &TestEnv::new(); + // Create a couple accounts and a couple contracts, which we'll filter on to + // make sure we only get the account and contract requested. + sandbox + .new_assert_cmd("keys") + .arg("generate") + .arg("a") + .assert() + .success(); + let account_a = sandbox + .new_assert_cmd("keys") + .arg("address") + .arg("a") + .assert() + .success() + .stdout_as_str(); + sandbox + .new_assert_cmd("keys") + .arg("generate") + .arg("b") + .assert() + .success(); + let account_b = sandbox + .new_assert_cmd("keys") + .arg("address") + .arg("b") + .assert() + .success() + .stdout_as_str(); + let contract_a = sandbox + .new_assert_cmd("contract") + .arg("asset") + .arg("deploy") + .arg(format!("--asset=A1:{account_a}")) + .assert() + .success() + .stdout_as_str(); + let contract_b = sandbox + .new_assert_cmd("contract") + .arg("asset") + .arg("deploy") + .arg(format!("--asset=A2:{account_a}")) + .assert() + .success() + .stdout_as_str(); + // Wait 8 ledgers for a checkpoint by submitting one tx per ledger, in this + // case a funding transaction. + for i in 1..=8 { + sandbox + .new_assert_cmd("keys") + .arg("generate") + .arg(format!("k{i}")) + .assert() + .success(); + } + // Create the snapshot. + sandbox + .new_assert_cmd("snapshot") + .arg("create") + .arg("--output=json") + .arg("--address") + .arg(&account_a) + .arg("--address") + .arg(&contract_b) + .assert() + .success(); + // Assert that the snapshot includes account a and contract b, but not + // account b and contract a. + sandbox + .dir() + .child("snapshot.json") + .assert(predicates::str::contains(&account_a)) + .assert(predicates::str::contains(&account_b).not()) + .assert(predicates::str::contains(&contract_b)) + .assert(predicates::str::contains(&contract_a).not()); +} diff --git a/cmd/crates/soroban-test/tests/it/integration/wrap.rs b/cmd/crates/soroban-test/tests/it/integration/wrap.rs index aa356ce99..c43f5b007 100644 --- a/cmd/crates/soroban-test/tests/it/integration/wrap.rs +++ b/cmd/crates/soroban-test/tests/it/integration/wrap.rs @@ -24,7 +24,7 @@ async fn burn() { .success(); // wrap_cmd(&asset).run().await.unwrap(); let asset = soroban_cli::utils::parsing::parse_asset(&asset).unwrap(); - let hash = contract_id_hash_from_asset(&asset, &network_passphrase).unwrap(); + let hash = contract_id_hash_from_asset(&asset, &network_passphrase); let id = stellar_strkey::Contract(hash.0).to_string(); println!("{id}, {address}"); sandbox diff --git a/cmd/crates/soroban-test/tests/it/main.rs b/cmd/crates/soroban-test/tests/it/main.rs index 8948a5f44..5a0b2a07f 100644 --- a/cmd/crates/soroban-test/tests/it/main.rs +++ b/cmd/crates/soroban-test/tests/it/main.rs @@ -2,6 +2,7 @@ mod arg_parsing; mod build; mod config; mod help; +mod init; #[cfg(feature = "it")] mod integration; mod plugin; diff --git a/cmd/soroban-cli/Cargo.toml b/cmd/soroban-cli/Cargo.toml index a1c5712dc..05d60bec5 100644 --- a/cmd/soroban-cli/Cargo.toml +++ b/cmd/soroban-cli/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/stellar-cli" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "21.2.0" +version = "21.3.0" edition = "2021" rust-version.workspace = true autobins = false @@ -66,6 +66,7 @@ serde-aux = { workspace = true } hex = { workspace = true } num-bigint = "0.4" tokio = { version = "1", features = ["full"] } +tokio-util = { version = "0.7.11", features = ["io", "io-util", "compat"] } termcolor = { workspace = true } termcolor_output = { workspace = true } rand = "0.8.5" @@ -107,14 +108,20 @@ gix = { version = "0.58.0", default-features = false, features = [ "worktree-mutation", ] } ureq = { version = "2.9.1", features = ["json"] } +async-compression = { version = "0.4.12", features = [ "tokio", "gzip" ] } tempfile = "3.8.1" toml_edit = "0.21.0" rust-embed = { version = "8.2.0", features = ["debug-embed"] } bollard = { workspace=true } futures-util = "0.3.30" +futures = "0.3.30" home = "0.5.9" +flate2 = "1.0.30" +bytesize = "1.3.0" +humantime = "2.1.0" phf = { version = "0.11.2", features = ["macros"] } + # For hyper-tls [target.'cfg(unix)'.dependencies] openssl = { version = "=0.10.55", features = ["vendored"] } diff --git a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs index 98276a86d..51baa55e9 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs @@ -106,7 +106,7 @@ impl NetworkRunnable for Cmd { let account_details = client.get_account(&public_strkey).await?; let sequence: i64 = account_details.seq_num.into(); let network_passphrase = &network.network_passphrase; - let contract_id = contract_id_hash_from_asset(&asset, network_passphrase)?; + let contract_id = contract_id_hash_from_asset(&asset, network_passphrase); let tx = build_wrap_token_tx( &asset, &contract_id, diff --git a/cmd/soroban-cli/src/commands/contract/id/asset.rs b/cmd/soroban-cli/src/commands/contract/id/asset.rs index 31b55f8d1..e57385859 100644 --- a/cmd/soroban-cli/src/commands/contract/id/asset.rs +++ b/cmd/soroban-cli/src/commands/contract/id/asset.rs @@ -33,7 +33,7 @@ impl Cmd { pub fn contract_address(&self) -> Result { let asset = parse_asset(&self.asset)?; let network = self.config.get_network()?; - let contract_id = contract_id_hash_from_asset(&asset, &network.network_passphrase)?; + let contract_id = contract_id_hash_from_asset(&asset, &network.network_passphrase); Ok(stellar_strkey::Contract(contract_id.0)) } } diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index 081439254..bab7ff391 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -13,6 +13,7 @@ pub mod global; pub mod keys; pub mod network; pub mod plugin; +pub mod snapshot; pub mod tx; pub mod version; @@ -110,6 +111,7 @@ impl Root { Cmd::Events(events) => events.run().await?, Cmd::Xdr(xdr) => xdr.run()?, Cmd::Network(network) => network.run().await?, + Cmd::Snapshot(snapshot) => snapshot.run().await?, Cmd::Version(version) => version.run(), Cmd::Keys(id) => id.run().await?, Cmd::Tx(tx) => tx.run(&self.global_args).await?, @@ -143,6 +145,10 @@ pub enum Cmd { #[command(subcommand)] Network(network::Cmd), + /// Download a snapshot of a ledger from an archive. + #[command(subcommand)] + Snapshot(snapshot::Cmd), + /// Sign, Simulate, and Send transactions #[command(subcommand)] Tx(tx::Cmd), @@ -178,6 +184,8 @@ pub enum Error { #[error(transparent)] Network(#[from] network::Error), #[error(transparent)] + Snapshot(#[from] snapshot::Error), + #[error(transparent)] Tx(#[from] tx::Error), #[error(transparent)] Cache(#[from] cache::Error), diff --git a/cmd/soroban-cli/src/commands/snapshot/create.rs b/cmd/soroban-cli/src/commands/snapshot/create.rs new file mode 100644 index 000000000..ea17785ae --- /dev/null +++ b/cmd/soroban-cli/src/commands/snapshot/create.rs @@ -0,0 +1,568 @@ +use async_compression::tokio::bufread::GzipDecoder; +use bytesize::ByteSize; +use clap::{arg, Parser, ValueEnum}; +use futures::{StreamExt, TryStreamExt}; +use http::Uri; +use humantime::format_duration; +use itertools::{Either, Itertools}; +use sha2::{Digest, Sha256}; +use soroban_ledger_snapshot::LedgerSnapshot; +use std::{ + collections::HashSet, + fs::{self}, + io::{self}, + path::PathBuf, + str::FromStr, + time::{Duration, Instant}, +}; +use stellar_xdr::curr::{ + self as xdr, AccountId, Asset, BucketEntry, ConfigSettingEntry, ConfigSettingId, + ContractExecutable, Frame, Hash, LedgerEntry, LedgerEntryData, LedgerKey, LedgerKeyAccount, + LedgerKeyClaimableBalance, LedgerKeyConfigSetting, LedgerKeyContractCode, + LedgerKeyContractData, LedgerKeyData, LedgerKeyLiquidityPool, LedgerKeyOffer, + LedgerKeyTrustLine, LedgerKeyTtl, Limited, Limits, ReadXdr, ScAddress, ScContractInstance, + ScVal, +}; +use tokio::fs::OpenOptions; + +use crate::{ + commands::{config::data, HEADING_RPC}, + config::{self, locator, network::passphrase}, + utils::{get_name_from_stellar_asset_contract_storage, parsing::parse_asset}, +}; + +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, ValueEnum)] +pub enum Output { + Json, +} + +impl Default for Output { + fn default() -> Self { + Self::Json + } +} + +fn default_out_path() -> PathBuf { + PathBuf::new().join("snapshot.json") +} + +/// Create a ledger snapshot using a history archive. +/// +/// Filters (address, wasm-hash) specify what ledger entries to include. +/// +/// Account addresses include the account, and trust lines. +/// +/// Contract addresses include the related wasm, contract data. +/// +/// If a contract is a Stellar asset contract, it includes the asset issuer's +/// account and trust lines, but does not include all the trust lines of other +/// accounts holding the asset. To include them specify the addresses of +/// relevant accounts. +#[derive(Parser, Debug, Clone)] +#[group(skip)] +#[command(arg_required_else_help = true)] +pub struct Cmd { + /// The ledger sequence number to snapshot. Defaults to latest history archived ledger. + #[arg(long)] + ledger: Option, + /// Account or contract address to include in the snapshot. + #[arg(long = "address", help_heading = "Filter Options")] + address: Vec, + /// WASM hashes to include in the snapshot. + #[arg(long = "wasm-hash", help_heading = "Filter Options")] + wasm_hashes: Vec, + /// Format of the out file. + #[arg(long)] + output: Output, + /// Out path that the snapshot is written to. + #[arg(long, default_value=default_out_path().into_os_string())] + out: PathBuf, + #[command(flatten)] + locator: locator::Args, + #[command(flatten)] + network: config::network::Args, + /// Archive URL + #[arg(long, help_heading = HEADING_RPC, env = "STELLAR_ARCHIVE_URL")] + archive_url: Option, +} + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("wasm hash invalid: {0}")] + WasmHashInvalid(String), + #[error("downloading history: {0}")] + DownloadingHistory(hyper::Error), + #[error("downloading history: got status code {0}")] + DownloadingHistoryGotStatusCode(hyper::StatusCode), + #[error("json decoding history: {0}")] + JsonDecodingHistory(serde_json::Error), + #[error("opening cached bucket to read: {0}")] + ReadOpeningCachedBucket(io::Error), + #[error("parsing bucket url: {0}")] + ParsingBucketUrl(http::uri::InvalidUri), + #[error("getting bucket: {0}")] + GettingBucket(hyper::Error), + #[error("getting bucket: got status code {0}")] + GettingBucketGotStatusCode(hyper::StatusCode), + #[error("opening cached bucket to write: {0}")] + WriteOpeningCachedBucket(io::Error), + #[error("streaming bucket: {0}")] + StreamingBucket(io::Error), + #[error("read XDR frame bucket entry: {0}")] + ReadXdrFrameBucketEntry(xdr::Error), + #[error("renaming temporary downloaded file to final destination: {0}")] + RenameDownloadFile(io::Error), + #[error("getting bucket directory: {0}")] + GetBucketDir(data::Error), + #[error("reading history http stream: {0}")] + ReadHistoryHttpStream(hyper::Error), + #[error("writing ledger snapshot: {0}")] + WriteLedgerSnapshot(soroban_ledger_snapshot::Error), + #[error(transparent)] + Join(#[from] tokio::task::JoinError), + #[error(transparent)] + Network(#[from] config::network::Error), + #[error(transparent)] + Locator(#[from] locator::Error), + #[error(transparent)] + Config(#[from] config::Error), + #[error("archive url not configured")] + ArchiveUrlNotConfigured, + #[error("parsing asset name: {0}")] + ParseAssetName(String), +} + +/// Checkpoint frequency is usually 64 ledgers, but in local test nets it'll +/// often by 8. There's no way to simply detect what frequency to expect ledgers +/// at, so it is hardcoded at 64, and this value is used only to help the user +/// select good ledger numbers when they select one that doesn't exist. +const CHECKPOINT_FREQUENCY: u32 = 64; + +impl Cmd { + #[allow(clippy::too_many_lines)] + pub async fn run(&self) -> Result<(), Error> { + let start = Instant::now(); + + let archive_url = self.archive_url()?; + let history = get_history(&archive_url, self.ledger).await?; + + let ledger = history.current_ledger; + let network_passphrase = &history.network_passphrase; + let network_id = Sha256::digest(network_passphrase); + println!("ℹ️ Ledger: {ledger}"); + println!("ℹ️ Network Passphrase: {network_passphrase}"); + println!("ℹ️ Network ID: {}", hex::encode(network_id)); + + // Prepare a flat list of buckets to read. They'll be ordered by their + // level so that they can iterated higher level to lower level. + let buckets = history + .current_buckets + .iter() + .flat_map(|h| [h.curr.clone(), h.snap.clone()]) + .filter(|b| b != "0000000000000000000000000000000000000000000000000000000000000000") + .collect::>(); + + // Pre-cache the buckets. + for (i, bucket) in buckets.iter().enumerate() { + cache_bucket(&archive_url, i, bucket).await?; + } + + // The snapshot is what will be written to file at the end. Fields will + // be updated while parsing the history archive. + let mut snapshot = LedgerSnapshot { + // TODO: Update more of the fields. + protocol_version: 0, + sequence_number: ledger, + timestamp: 0, + network_id: network_id.into(), + base_reserve: 1, + min_persistent_entry_ttl: 0, + min_temp_entry_ttl: 0, + max_entry_ttl: 0, + ledger_entries: Vec::new(), + }; + + // Track ledger keys seen, so that we can ignore old versions of + // entries. Entries can appear in both higher level and lower level + // buckets, and to get the latest version of the entry the version in + // the higher level bucket should be used. + let mut seen = HashSet::new(); + + #[allow(clippy::items_after_statements)] + #[derive(Default)] + struct SearchInputs { + account_ids: HashSet, + contract_ids: HashSet, + wasm_hashes: HashSet, + } + impl SearchInputs { + pub fn is_empty(&self) -> bool { + self.account_ids.is_empty() + && self.contract_ids.is_empty() + && self.wasm_hashes.is_empty() + } + } + + // Search the buckets using the user inputs as the starting inputs. + let (account_ids, contract_ids): (HashSet, HashSet) = + self.address.iter().cloned().partition_map(|a| match a { + ScAddress::Account(account_id) => Either::Left(account_id), + ScAddress::Contract(_) => Either::Right(a), + }); + let mut current = SearchInputs { + account_ids, + contract_ids, + wasm_hashes: self.wasm_hashes.iter().cloned().collect(), + }; + let mut next = SearchInputs::default(); + loop { + if current.is_empty() { + break; + } + println!( + "ℹ️ Searching for {} accounts, {} contracts, {} wasms", + current.account_ids.len(), + current.contract_ids.len(), + current.wasm_hashes.len(), + ); + for (i, bucket) in buckets.iter().enumerate() { + // Defined where the bucket will be read from, either from cache on + // disk, or streamed from the archive. + let cache_path = cache_bucket(&archive_url, i, bucket).await?; + let file = std::fs::OpenOptions::new() + .read(true) + .open(&cache_path) + .map_err(Error::ReadOpeningCachedBucket)?; + print!("🔎 Searching bucket {i} {bucket}"); + if let Ok(metadata) = file.metadata() { + print!(" ({})", ByteSize(metadata.len())); + } + println!(); + + // Stream the bucket entries from the bucket, identifying + // entries that match the filters, and including only the + // entries that match in the snapshot. + let limited = &mut Limited::new(file, Limits::none()); + let entries = Frame::::read_xdr_iter(limited); + let mut count_saved = 0; + for entry in entries { + let Frame(entry) = entry.map_err(Error::ReadXdrFrameBucketEntry)?; + let (key, val) = match entry { + BucketEntry::Liveentry(l) | BucketEntry::Initentry(l) => { + let k = data_into_key(&l); + (k, Some(l)) + } + BucketEntry::Deadentry(k) => (k, None), + BucketEntry::Metaentry(m) => { + snapshot.protocol_version = m.ledger_version; + continue; + } + }; + if seen.contains(&key) { + continue; + } + let keep = match &key { + LedgerKey::Account(k) => current.account_ids.contains(&k.account_id), + LedgerKey::Trustline(k) => current.account_ids.contains(&k.account_id), + LedgerKey::ContractData(k) => current.contract_ids.contains(&k.contract), + LedgerKey::ContractCode(e) => current.wasm_hashes.contains(&e.hash), + _ => false, + }; + if !keep { + continue; + } + seen.insert(key.clone()); + let Some(val) = val else { continue }; + match &val.data { + LedgerEntryData::ContractData(e) => { + // If a contract instance references contract + // executable stored in another ledger entry, add + // that ledger entry to the filter so that Wasm for + // any filtered contract is collected too in the + // second pass. + if keep && e.key == ScVal::LedgerKeyContractInstance { + match &e.val { + ScVal::ContractInstance(ScContractInstance { + executable: ContractExecutable::Wasm(hash), + .. + }) => { + if !current.wasm_hashes.contains(hash) { + next.wasm_hashes.insert(hash.clone()); + println!( + "ℹ️ Adding wasm {} to search", + hex::encode(hash) + ); + } + } + ScVal::ContractInstance(ScContractInstance { + executable: ContractExecutable::StellarAsset, + storage: Some(storage), + }) => { + if let Some(name) = + get_name_from_stellar_asset_contract_storage(storage) + { + let asset = parse_asset(&name) + .map_err(|_| Error::ParseAssetName(name))?; + if let Some(issuer) = match &asset { + Asset::Native => None, + Asset::CreditAlphanum4(a4) => { + Some(a4.issuer.clone()) + } + Asset::CreditAlphanum12(a12) => { + Some(a12.issuer.clone()) + } + } { + println!( + "ℹ️ Adding asset issuer {issuer} to search" + ); + next.account_ids.insert(issuer); + } + } + } + _ => {} + } + } + keep + } + _ => false, + }; + snapshot + .ledger_entries + .push((Box::new(key), (Box::new(val), Some(u32::MAX)))); + count_saved += 1; + } + if count_saved > 0 { + println!("ℹ️ Found {count_saved} entries"); + } + } + current = next; + next = SearchInputs::default(); + } + + // Write the snapshot to file. + snapshot + .write_file(&self.out) + .map_err(Error::WriteLedgerSnapshot)?; + println!( + "💾 Saved {} entries to {:?}", + snapshot.ledger_entries.len(), + self.out + ); + + let duration = Duration::from_secs(start.elapsed().as_secs()); + println!("✅ Completed in {}", format_duration(duration)); + + Ok(()) + } + + fn archive_url(&self) -> Result { + // Return the configured archive URL, or if one is not configured, guess + // at an appropriate archive URL given the network passphrase. + self.archive_url + .clone() + .or_else(|| { + self.network.get(&self.locator).ok().and_then(|network| { + match network.network_passphrase.as_str() { + passphrase::MAINNET => { + Some("https://history.stellar.org/prd/core-live/core_live_001") + } + passphrase::TESTNET => { + Some("https://history.stellar.org/prd/core-testnet/core_testnet_001") + } + passphrase::FUTURENET => Some("https://history-futurenet.stellar.org"), + passphrase::LOCAL => Some("http://localhost:8000/archive"), + _ => None, + } + .map(|s| Uri::from_str(s).expect("archive url valid")) + }) + }) + .ok_or(Error::ArchiveUrlNotConfigured) + } +} + +async fn get_history(archive_url: &Uri, ledger: Option) -> Result { + let archive_url = archive_url.to_string(); + let archive_url = archive_url.strip_suffix('/').unwrap_or(&archive_url); + let history_url = if let Some(ledger) = ledger { + let ledger_hex = format!("{ledger:08x}"); + let ledger_hex_0 = &ledger_hex[0..=1]; + let ledger_hex_1 = &ledger_hex[2..=3]; + let ledger_hex_2 = &ledger_hex[4..=5]; + format!("{archive_url}/history/{ledger_hex_0}/{ledger_hex_1}/{ledger_hex_2}/history-{ledger_hex}.json") + } else { + format!("{archive_url}/.well-known/stellar-history.json") + }; + let history_url = Uri::from_str(&history_url).unwrap(); + + println!("🌎 Downloading history {history_url}"); + let https = hyper_tls::HttpsConnector::new(); + let response = hyper::Client::builder() + .build::<_, hyper::Body>(https) + .get(history_url) + .await + .map_err(Error::DownloadingHistory)?; + if !response.status().is_success() { + // Check ledger is a checkpoint ledger and available in archives. + if let Some(ledger) = ledger { + let ledger_offset = (ledger + 1) % CHECKPOINT_FREQUENCY; + if ledger_offset != 0 { + println!( + "ℹ️ Ledger {ledger} may not be a checkpoint ledger, try {} or {}", + ledger - ledger_offset, + ledger + (CHECKPOINT_FREQUENCY - ledger_offset), + ); + } + } + return Err(Error::DownloadingHistoryGotStatusCode(response.status())); + } + let body = hyper::body::to_bytes(response.into_body()) + .await + .map_err(Error::ReadHistoryHttpStream)?; + serde_json::from_slice::(&body).map_err(Error::JsonDecodingHistory) +} + +async fn cache_bucket( + archive_url: &Uri, + bucket_index: usize, + bucket: &str, +) -> Result { + let bucket_dir = data::bucket_dir().map_err(Error::GetBucketDir)?; + let cache_path = bucket_dir.join(format!("bucket-{bucket}.xdr")); + if !cache_path.exists() { + let bucket_0 = &bucket[0..=1]; + let bucket_1 = &bucket[2..=3]; + let bucket_2 = &bucket[4..=5]; + let bucket_url = + format!("{archive_url}/bucket/{bucket_0}/{bucket_1}/{bucket_2}/bucket-{bucket}.xdr.gz"); + print!("🪣 Downloading bucket {bucket_index} {bucket}"); + let bucket_url = Uri::from_str(&bucket_url).map_err(Error::ParsingBucketUrl)?; + let https = hyper_tls::HttpsConnector::new(); + let response = hyper::Client::builder() + .build::<_, hyper::Body>(https) + .get(bucket_url) + .await + .map_err(Error::GettingBucket)?; + if !response.status().is_success() { + println!(); + return Err(Error::GettingBucketGotStatusCode(response.status())); + } + if let Some(val) = response.headers().get("Content-Length") { + if let Ok(str) = val.to_str() { + if let Ok(len) = str.parse::() { + print!(" ({})", ByteSize(len)); + } + } + } + println!(); + let read = response + .into_body() + .map(|result| result.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))) + .into_async_read(); + let read = tokio_util::compat::FuturesAsyncReadCompatExt::compat(read); + let mut read = GzipDecoder::new(read); + let dl_path = cache_path.with_extension("dl"); + let mut file = OpenOptions::new() + .create(true) + .truncate(true) + .write(true) + .open(&dl_path) + .await + .map_err(Error::WriteOpeningCachedBucket)?; + tokio::io::copy(&mut read, &mut file) + .await + .map_err(Error::StreamingBucket)?; + fs::rename(&dl_path, &cache_path).map_err(Error::RenameDownloadFile)?; + } + Ok(cache_path) +} + +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +struct History { + current_ledger: u32, + current_buckets: Vec, + network_passphrase: String, +} + +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Deserialize)] +#[serde(rename_all = "camelCase")] +struct HistoryBucket { + curr: String, + snap: String, +} + +fn data_into_key(d: &LedgerEntry) -> LedgerKey { + // TODO: Move this function into stellar-xdr. + match &d.data { + LedgerEntryData::Account(e) => LedgerKey::Account(LedgerKeyAccount { + account_id: e.account_id.clone(), + }), + LedgerEntryData::Trustline(e) => LedgerKey::Trustline(LedgerKeyTrustLine { + account_id: e.account_id.clone(), + asset: e.asset.clone(), + }), + LedgerEntryData::Offer(e) => LedgerKey::Offer(LedgerKeyOffer { + seller_id: e.seller_id.clone(), + offer_id: e.offer_id, + }), + LedgerEntryData::Data(e) => LedgerKey::Data(LedgerKeyData { + account_id: e.account_id.clone(), + data_name: e.data_name.clone(), + }), + LedgerEntryData::ClaimableBalance(e) => { + LedgerKey::ClaimableBalance(LedgerKeyClaimableBalance { + balance_id: e.balance_id.clone(), + }) + } + LedgerEntryData::LiquidityPool(e) => LedgerKey::LiquidityPool(LedgerKeyLiquidityPool { + liquidity_pool_id: e.liquidity_pool_id.clone(), + }), + LedgerEntryData::ContractData(e) => LedgerKey::ContractData(LedgerKeyContractData { + contract: e.contract.clone(), + key: e.key.clone(), + durability: e.durability, + }), + LedgerEntryData::ContractCode(e) => LedgerKey::ContractCode(LedgerKeyContractCode { + hash: e.hash.clone(), + }), + LedgerEntryData::ConfigSetting(e) => LedgerKey::ConfigSetting(LedgerKeyConfigSetting { + config_setting_id: match e { + ConfigSettingEntry::ContractMaxSizeBytes(_) => { + ConfigSettingId::ContractMaxSizeBytes + } + ConfigSettingEntry::ContractComputeV0(_) => ConfigSettingId::ContractComputeV0, + ConfigSettingEntry::ContractLedgerCostV0(_) => { + ConfigSettingId::ContractLedgerCostV0 + } + ConfigSettingEntry::ContractHistoricalDataV0(_) => { + ConfigSettingId::ContractHistoricalDataV0 + } + ConfigSettingEntry::ContractEventsV0(_) => ConfigSettingId::ContractEventsV0, + ConfigSettingEntry::ContractBandwidthV0(_) => ConfigSettingId::ContractBandwidthV0, + ConfigSettingEntry::ContractCostParamsCpuInstructions(_) => { + ConfigSettingId::ContractCostParamsCpuInstructions + } + ConfigSettingEntry::ContractCostParamsMemoryBytes(_) => { + ConfigSettingId::ContractCostParamsMemoryBytes + } + ConfigSettingEntry::ContractDataKeySizeBytes(_) => { + ConfigSettingId::ContractDataKeySizeBytes + } + ConfigSettingEntry::ContractDataEntrySizeBytes(_) => { + ConfigSettingId::ContractDataEntrySizeBytes + } + ConfigSettingEntry::StateArchival(_) => ConfigSettingId::StateArchival, + ConfigSettingEntry::ContractExecutionLanes(_) => { + ConfigSettingId::ContractExecutionLanes + } + ConfigSettingEntry::BucketlistSizeWindow(_) => { + ConfigSettingId::BucketlistSizeWindow + } + ConfigSettingEntry::EvictionIterator(_) => ConfigSettingId::EvictionIterator, + }, + }), + LedgerEntryData::Ttl(e) => LedgerKey::Ttl(LedgerKeyTtl { + key_hash: e.key_hash.clone(), + }), + } +} diff --git a/cmd/soroban-cli/src/commands/snapshot/mod.rs b/cmd/soroban-cli/src/commands/snapshot/mod.rs new file mode 100644 index 000000000..344b320d2 --- /dev/null +++ b/cmd/soroban-cli/src/commands/snapshot/mod.rs @@ -0,0 +1,24 @@ +use clap::Parser; + +pub mod create; + +/// Create and operate on ledger snapshots. +#[derive(Debug, Parser)] +pub enum Cmd { + Create(create::Cmd), +} + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Create(#[from] create::Error), +} + +impl Cmd { + pub async fn run(&self) -> Result<(), Error> { + match self { + Cmd::Create(cmd) => cmd.run().await?, + }; + Ok(()) + } +} diff --git a/cmd/soroban-cli/src/commands/version.rs b/cmd/soroban-cli/src/commands/version.rs index 95aae8c60..5e6d0e4dd 100644 --- a/cmd/soroban-cli/src/commands/version.rs +++ b/cmd/soroban-cli/src/commands/version.rs @@ -2,8 +2,6 @@ use clap::Parser; use soroban_env_host::meta; use std::fmt::Debug; -const GIT_REVISION: &str = env!("GIT_REVISION"); - #[derive(Parser, Debug, Clone)] #[group(skip)] pub struct Cmd; @@ -15,11 +13,19 @@ impl Cmd { } } +pub fn pkg() -> &'static str { + env!("CARGO_PKG_VERSION") +} + +pub fn git() -> &'static str { + env!("GIT_REVISION") +} + pub fn long() -> String { let env = soroban_env_host::VERSION; let xdr = soroban_env_host::VERSION.xdr; [ - format!("{} ({GIT_REVISION})", env!("CARGO_PKG_VERSION")), + format!("{} ({})", pkg(), git()), format!("soroban-env {} ({})", env.pkg, env.rev), format!("soroban-env interface version {}", meta::INTERFACE_VERSION), format!( diff --git a/cmd/soroban-cli/src/config/data.rs b/cmd/soroban-cli/src/config/data.rs index 409ef2227..23dedc619 100644 --- a/cmd/soroban-cli/src/config/data.rs +++ b/cmd/soroban-cli/src/config/data.rs @@ -50,6 +50,12 @@ pub fn spec_dir() -> Result { Ok(dir) } +pub fn bucket_dir() -> Result { + let dir = data_local_dir()?.join("bucket"); + std::fs::create_dir_all(&dir)?; + Ok(dir) +} + pub fn write(action: Action, rpc_url: &Uri) -> Result { let data = Data { action, diff --git a/cmd/soroban-cli/src/utils.rs b/cmd/soroban-cli/src/utils.rs index 88daa9a80..24b76b24f 100644 --- a/cmd/soroban-cli/src/utils.rs +++ b/cmd/soroban-cli/src/utils.rs @@ -4,9 +4,9 @@ use stellar_strkey::ed25519::PrivateKey; use soroban_env_host::xdr::{ Asset, ContractIdPreimage, DecoratedSignature, Error as XdrError, Hash, HashIdPreimage, - HashIdPreimageContractId, Limits, Signature, SignatureHint, Transaction, TransactionEnvelope, - TransactionSignaturePayload, TransactionSignaturePayloadTaggedTransaction, - TransactionV1Envelope, WriteXdr, + HashIdPreimageContractId, Limits, ScMap, ScMapEntry, ScVal, Signature, SignatureHint, + Transaction, TransactionEnvelope, TransactionSignaturePayload, + TransactionSignaturePayloadTaggedTransaction, TransactionV1Envelope, WriteXdr, }; pub use soroban_spec_tools::contract as contract_spec; @@ -116,17 +116,40 @@ pub fn is_hex_string(s: &str) -> bool { s.chars().all(|s| s.is_ascii_hexdigit()) } -pub fn contract_id_hash_from_asset( - asset: &Asset, - network_passphrase: &str, -) -> Result { +pub fn contract_id_hash_from_asset(asset: &Asset, network_passphrase: &str) -> Hash { let network_id = Hash(Sha256::digest(network_passphrase.as_bytes()).into()); let preimage = HashIdPreimage::ContractId(HashIdPreimageContractId { network_id, contract_id_preimage: ContractIdPreimage::Asset(asset.clone()), }); - let preimage_xdr = preimage.to_xdr(Limits::none())?; - Ok(Hash(Sha256::digest(preimage_xdr).into())) + let preimage_xdr = preimage + .to_xdr(Limits::none()) + .expect("HashIdPreimage should not fail encoding to xdr"); + Hash(Sha256::digest(preimage_xdr).into()) +} + +pub fn get_name_from_stellar_asset_contract_storage(storage: &ScMap) -> Option { + if let Some(ScMapEntry { + val: ScVal::Map(Some(map)), + .. + }) = storage + .iter() + .find(|ScMapEntry { key, .. }| key == &ScVal::Symbol("METADATA".try_into().unwrap())) + { + if let Some(ScMapEntry { + val: ScVal::String(name), + .. + }) = map + .iter() + .find(|ScMapEntry { key, .. }| key == &ScVal::Symbol("name".try_into().unwrap())) + { + Some(name.to_string()) + } else { + None + } + } else { + None + } } pub mod rpc { diff --git a/cmd/soroban-cli/src/utils/contract-init-template/Cargo.lock b/cmd/soroban-cli/src/utils/contract-init-template/Cargo.lock deleted file mode 100644 index 7c6ec69aa..000000000 --- a/cmd/soroban-cli/src/utils/contract-init-template/Cargo.lock +++ /dev/null @@ -1,1485 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bytes-lit" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adabf37211a5276e46335feabcbb1530c95eb3fdf85f324c7db942770aa025d" -dependencies = [ - "num-bigint", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets 0.48.5", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - -[[package]] -name = "crate-git-revision" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c521bf1f43d31ed2f73441775ed31935d77901cb3451e44b38a1c1612fcbaf98" -dependencies = [ - "serde", - "serde_derive", - "serde_json", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctor" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core", - "serde", - "sha2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "escape-bytes" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfcf67fea2815c2fc3b90873fae90957be12ff417335dfadc7f52927feb03b2" - -[[package]] -name = "ethnum" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hello-soroban" -version = "0.1.0" -dependencies = [ - "soroban-sdk", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", - "serde", -] - -[[package]] -name = "indexmap-nostd" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "libc" -version = "0.2.151" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "semver" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" - -[[package]] -name = "serde" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.192" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" -dependencies = [ - "base64 0.21.5", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.1.0", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "soroban-builtin-sdk-macros" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10c4f54b2f546429395dc76b7cca7d89f49a920bfa39834998fc89ad2ac0c8d" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "soroban-env-common" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803553ca3023ed9fe53b4cdac9f0603da4ef967823bd58b52ea24d73639e1996" -dependencies = [ - "arbitrary", - "crate-git-revision", - "ethnum", - "num-derive", - "num-traits", - "serde", - "soroban-env-macros", - "soroban-wasmi", - "static_assertions", - "stellar-xdr", -] - -[[package]] -name = "soroban-env-guest" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06b756e50b27df7ed8722f8709833fe88a8ced5e1499e81cfc379d74c8330a93" -dependencies = [ - "soroban-env-common", - "static_assertions", -] - -[[package]] -name = "soroban-env-host" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edcbfca555940b538349bdf4c19b96c1845b7a160d22e528e9096a33c4eb7e" -dependencies = [ - "backtrace", - "curve25519-dalek", - "ed25519-dalek", - "getrandom", - "hex-literal", - "hmac", - "k256", - "num-derive", - "num-integer", - "num-traits", - "rand", - "rand_chacha", - "sha2", - "sha3", - "soroban-builtin-sdk-macros", - "soroban-env-common", - "soroban-wasmi", - "static_assertions", - "stellar-strkey", -] - -[[package]] -name = "soroban-env-macros" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a4be3a2737115035b062be921a86ba78374937e4b0918071c7ea4c531240bb" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "serde", - "serde_json", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-ledger-snapshot" -version = "20.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900b090cdcd3e81bdb8b6a1712e3b53ae682ca0653c27e1cbddff585e13f0a52" -dependencies = [ - "serde", - "serde_json", - "serde_with", - "soroban-env-common", - "soroban-env-host", - "thiserror", -] - -[[package]] -name = "soroban-sdk" -version = "20.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b20b89f388b28eedce486b81edf9b5c4f852bc09a592ebe6ebceda6e2a82a2b" -dependencies = [ - "arbitrary", - "bytes-lit", - "ctor", - "ed25519-dalek", - "rand", - "serde", - "serde_json", - "soroban-env-guest", - "soroban-env-host", - "soroban-ledger-snapshot", - "soroban-sdk-macros", - "stellar-strkey", -] - -[[package]] -name = "soroban-sdk-macros" -version = "20.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b36fa6f88360bb9092378056cd860d9a8702027306fbfde701a8040f440531" -dependencies = [ - "crate-git-revision", - "darling", - "itertools", - "proc-macro2", - "quote", - "rustc_version", - "sha2", - "soroban-env-common", - "soroban-spec", - "soroban-spec-rust", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-spec" -version = "20.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315e7d51ff27ff8044f251c55ed3b21f62c13b220f95382584822637d026f7bd" -dependencies = [ - "base64 0.13.1", - "stellar-xdr", - "thiserror", - "wasmparser", -] - -[[package]] -name = "soroban-spec-rust" -version = "20.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744c5b6011bfc5f933e26662ff874e75b8d8453c5d54c52d1ffe70db7a01788" -dependencies = [ - "prettyplease", - "proc-macro2", - "quote", - "sha2", - "soroban-spec", - "stellar-xdr", - "syn", - "thiserror", -] - -[[package]] -name = "soroban-wasmi" -version = "0.31.1-soroban.20.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1aaa682a67cbd2173f1d60cb1e7b951d490d7c4e0b7b6f5387cbb952e963c46" -dependencies = [ - "smallvec", - "spin", - "wasmi_arena", - "wasmi_core", - "wasmparser-nostd", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stellar-strkey" -version = "0.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12d2bf45e114117ea91d820a846fd1afbe3ba7d717988fee094ce8227a3bf8bd" -dependencies = [ - "base32", - "crate-git-revision", - "thiserror", -] - -[[package]] -name = "stellar-xdr" -version = "20.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f00a85bd9b1617d4cb7e741733889c9940e6bdeca360db81752b0ef04fe3a5" -dependencies = [ - "arbitrary", - "base64 0.13.1", - "crate-git-revision", - "escape-bytes", - "hex", - "serde", - "serde_with", - "stellar-strkey", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" -dependencies = [ - "time-core", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" - -[[package]] -name = "wasmi_arena" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" - -[[package]] -name = "wasmi_core" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" -dependencies = [ - "downcast-rs", - "libm", - "num-traits", - "paste", -] - -[[package]] -name = "wasmparser" -version = "0.88.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" -dependencies = [ - "indexmap 1.9.3", -] - -[[package]] -name = "wasmparser-nostd" -version = "0.100.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" -dependencies = [ - "indexmap-nostd", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/cmd/soroban-cli/src/utils/contract-init-template/Cargo.toml.removeextension b/cmd/soroban-cli/src/utils/contract-init-template/Cargo.toml.removeextension index 0c3a32980..c0d6366e0 100644 --- a/cmd/soroban-cli/src/utils/contract-init-template/Cargo.toml.removeextension +++ b/cmd/soroban-cli/src/utils/contract-init-template/Cargo.toml.removeextension @@ -5,7 +5,7 @@ members = [ ] [workspace.dependencies] -soroban-sdk = "20.3.2" +soroban-sdk = "21.0.0" [profile.release] opt-level = "z" diff --git a/cmd/stellar-cli/Cargo.toml b/cmd/stellar-cli/Cargo.toml index 1440ce094..ab8754199 100644 --- a/cmd/stellar-cli/Cargo.toml +++ b/cmd/stellar-cli/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/stellar/stellar-cli" authors = ["Stellar Development Foundation "] license = "Apache-2.0" readme = "README.md" -version = "21.2.0" +version = "21.3.0" edition = "2021" rust-version.workspace = true autobins = false