From 3d435efb63b78285d52d585f49b802a46fb84dcf Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Wed, 1 Nov 2023 20:43:58 -0400 Subject: [PATCH] Move fuzz inside soroban-env-host --- .cargo/config.toml | 2 +- Cargo.lock | 4 - Cargo.toml | 1 - .../common/cost_types/compute_sha256_hash.rs | 2 +- .../fuzz/.gitignore | 0 .../fuzz/Cargo.lock | 30 +- .../fuzz/Cargo.toml | 6 +- .../fuzz/fuzz_targets/fuzz_target_1.rs | 4 +- .../fuzz/src/debug_log.rs | 1 - soroban-env-host/fuzz/src/lib.rs | 2 + soroban-env-host/src/host.rs | 2 +- soroban-env-host/src/testutils.rs | 21 +- soroban-fuzz-host/.gitignore | 2 - soroban-fuzz-host/Cargo.lock | 1075 ----------------- soroban-fuzz-host/Cargo.toml | 21 - soroban-fuzz-host/debug_logging/Cargo.toml | 17 - soroban-fuzz-host/src/lib.rs | 0 17 files changed, 30 insertions(+), 1160 deletions(-) rename {soroban-fuzz-host => soroban-env-host}/fuzz/.gitignore (100%) rename {soroban-fuzz-host => soroban-env-host}/fuzz/Cargo.lock (99%) rename {soroban-fuzz-host => soroban-env-host}/fuzz/Cargo.toml (71%) rename {soroban-fuzz-host => soroban-env-host}/fuzz/fuzz_targets/fuzz_target_1.rs (89%) rename soroban-fuzz-host/debug_logging/src/lib.rs => soroban-env-host/fuzz/src/debug_log.rs (90%) create mode 100644 soroban-env-host/fuzz/src/lib.rs delete mode 100644 soroban-fuzz-host/.gitignore delete mode 100644 soroban-fuzz-host/Cargo.lock delete mode 100644 soroban-fuzz-host/Cargo.toml delete mode 100644 soroban-fuzz-host/debug_logging/Cargo.toml delete mode 100644 soroban-fuzz-host/src/lib.rs diff --git a/.cargo/config.toml b/.cargo/config.toml index 4bb3ce9d0..49143201a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -18,7 +18,7 @@ # target = "triple" # build for the target triple (ignored by `cargo install`) # target-dir = "target" # path of where to place all generated artifacts rustflags = [ - # "-Dwarnings", + "-Dwarnings", "-Aclippy::style", # "-Dclippy::pedantic", # "-Aclippy::module_name_repetitions", diff --git a/Cargo.lock b/Cargo.lock index d00b8cc74..f4106c8ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1431,10 +1431,6 @@ dependencies = [ "syn 2.0.16", ] -[[package]] -name = "soroban-fuzz-host" -version = "20.0.0-rc2" - [[package]] name = "soroban-synth-wasm" version = "20.0.0-rc2" diff --git a/Cargo.toml b/Cargo.toml index 58573fb67..6c46bc8aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ members = [ "soroban-test-wasms", "soroban-synth-wasm", "soroban-bench-utils", - "soroban-fuzz-host" ] exclude = ["soroban-test-wasms/wasm-workspace"] diff --git a/soroban-env-host/benches/common/cost_types/compute_sha256_hash.rs b/soroban-env-host/benches/common/cost_types/compute_sha256_hash.rs index 7ed374671..f8d8cd492 100644 --- a/soroban-env-host/benches/common/cost_types/compute_sha256_hash.rs +++ b/soroban-env-host/benches/common/cost_types/compute_sha256_hash.rs @@ -10,7 +10,7 @@ pub(crate) struct ComputeSha256HashMeasure; impl HostCostMeasurement for ComputeSha256HashMeasure { type Runner = ComputeSha256HashRun; - fn new_random_case(host: &Host, _rng: &mut StdRng, input: u64) -> Vec { + fn new_random_case(_host: &Host, _rng: &mut StdRng, input: u64) -> Vec { let size = 1 + input * Self::STEP_SIZE; (0..size).map(|n| n as u8).collect() } diff --git a/soroban-fuzz-host/fuzz/.gitignore b/soroban-env-host/fuzz/.gitignore similarity index 100% rename from soroban-fuzz-host/fuzz/.gitignore rename to soroban-env-host/fuzz/.gitignore diff --git a/soroban-fuzz-host/fuzz/Cargo.lock b/soroban-env-host/fuzz/Cargo.lock similarity index 99% rename from soroban-fuzz-host/fuzz/Cargo.lock rename to soroban-env-host/fuzz/Cargo.lock index 83eca79fe..f0d697ddc 100644 --- a/soroban-fuzz-host/fuzz/Cargo.lock +++ b/soroban-env-host/fuzz/Cargo.lock @@ -178,16 +178,6 @@ dependencies = [ "syn", ] -[[package]] -name = "debug_logging" -version = "0.0.0" -dependencies = [ - "arbitrary", - "soroban-env-common", - "soroban-env-host", - "soroban-synth-wasm", -] - [[package]] name = "der" version = "0.7.8" @@ -809,6 +799,16 @@ dependencies = [ "stellar-strkey", ] +[[package]] +name = "soroban-env-host-fuzz" +version = "0.0.0" +dependencies = [ + "arbitrary", + "libfuzzer-sys", + "soroban-env-host", + "soroban-synth-wasm", +] + [[package]] name = "soroban-env-macros" version = "20.0.0-rc2" @@ -822,16 +822,6 @@ dependencies = [ "syn", ] -[[package]] -name = "soroban-fuzz-host-fuzz" -version = "0.0.0" -dependencies = [ - "arbitrary", - "debug_logging", - "libfuzzer-sys", - "soroban-env-host", -] - [[package]] name = "soroban-synth-wasm" version = "20.0.0-rc2" diff --git a/soroban-fuzz-host/fuzz/Cargo.toml b/soroban-env-host/fuzz/Cargo.toml similarity index 71% rename from soroban-fuzz-host/fuzz/Cargo.toml rename to soroban-env-host/fuzz/Cargo.toml index 37345ab98..69b227ce7 100644 --- a/soroban-fuzz-host/fuzz/Cargo.toml +++ b/soroban-env-host/fuzz/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "soroban-fuzz-host-fuzz" +name = "soroban-env-host-fuzz" version = "0.0.0" publish = false edition = "2021" @@ -9,9 +9,9 @@ cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" -debug_logging = { path = "../debug_logging"} -soroban-env-host = { path = "../../soroban-env-host", features = ["testutils"]} arbitrary = { version = "1.3.0", features = ["derive"] } +soroban-env-host = { path = "..", features = ["testutils"]} +soroban-synth-wasm = { path = "../../soroban-synth-wasm"} # Prevent this from interfering with workspaces [workspace] diff --git a/soroban-fuzz-host/fuzz/fuzz_targets/fuzz_target_1.rs b/soroban-env-host/fuzz/fuzz_targets/fuzz_target_1.rs similarity index 89% rename from soroban-fuzz-host/fuzz/fuzz_targets/fuzz_target_1.rs rename to soroban-env-host/fuzz/fuzz_targets/fuzz_target_1.rs index 8fbc60b33..85075e911 100644 --- a/soroban-fuzz-host/fuzz/fuzz_targets/fuzz_target_1.rs +++ b/soroban-env-host/fuzz/fuzz_targets/fuzz_target_1.rs @@ -1,9 +1,9 @@ #![no_main] use libfuzzer_sys::fuzz_target; -use debug_logging::wasm_module_with_linear_memory_logging; use arbitrary::Arbitrary; use soroban_env_host::{Host, Symbol, budget::AsBudget, Env}; +use soroban_env_host_fuzz::wasm_module_with_linear_memory_logging; #[derive(Arbitrary, Debug)] struct Input { @@ -32,5 +32,5 @@ fuzz_target!(|input: Input| { let cpu = host.as_budget().get_cpu_insns_consumed().unwrap(); let mem = host.as_budget().get_mem_bytes_consumed().unwrap(); - assert_eq!((cpu,mem), (1075678, 203437) ); + assert_eq!((cpu,mem), (1073488, 203274) ); }); diff --git a/soroban-fuzz-host/debug_logging/src/lib.rs b/soroban-env-host/fuzz/src/debug_log.rs similarity index 90% rename from soroban-fuzz-host/debug_logging/src/lib.rs rename to soroban-env-host/fuzz/src/debug_log.rs index 0de554048..53b5155cf 100644 --- a/soroban-fuzz-host/debug_logging/src/lib.rs +++ b/soroban-env-host/fuzz/src/debug_log.rs @@ -1,4 +1,3 @@ -use soroban_env_host::{Host, Symbol, SymbolSmall, budget::AsBudget, Env}; use soroban_synth_wasm::{Arity, LocalRef, ModEmitter, Operand}; pub fn wasm_module_with_linear_memory_logging() -> Vec { diff --git a/soroban-env-host/fuzz/src/lib.rs b/soroban-env-host/fuzz/src/lib.rs new file mode 100644 index 000000000..7c0143476 --- /dev/null +++ b/soroban-env-host/fuzz/src/lib.rs @@ -0,0 +1,2 @@ +pub mod debug_log; +pub use debug_log::*; \ No newline at end of file diff --git a/soroban-env-host/src/host.rs b/soroban-env-host/src/host.rs index 0d6ddfc36..f07c0dc7f 100644 --- a/soroban-env-host/src/host.rs +++ b/soroban-env-host/src/host.rs @@ -328,7 +328,7 @@ impl Host { #[cfg(any(test, feature = "testutils"))] pub(crate) fn source_account_id(&self) -> Result, HostError> { - Ok(self.try_borrow_source_account()?.metered_clone(self)?) + self.try_borrow_source_account()?.metered_clone(self) } #[cfg(any(test, feature = "testutils"))] diff --git a/soroban-env-host/src/testutils.rs b/soroban-env-host/src/testutils.rs index f61521373..522600538 100644 --- a/soroban-env-host/src/testutils.rs +++ b/soroban-env-host/src/testutils.rs @@ -1,22 +1,20 @@ -use std::{cell::RefCell, collections::BTreeMap, rc::Rc}; +use std::{collections::BTreeMap, rc::Rc}; use rand::RngCore; use soroban_env_common::{ xdr::{ - AccountEntry, AccountId, ContractCostType, LedgerEntry, LedgerEntryData, LedgerKey, - PublicKey, ScAddress, ScErrorCode, ScErrorType, ScVal, ScVec, Uint256, + AccountEntry, AccountId, LedgerEntry, LedgerEntryData, LedgerKey, PublicKey, ScAddress, + ScErrorCode, ScErrorType, ScVal, ScVec, Uint256, }, - AddressObject, BytesObject, Env, EnvBase, Symbol, Val, VecObject, + AddressObject, BytesObject, Env, EnvBase, Val, VecObject, }; use crate::{ - budget::{AsBudget, Budget}, - host::HostLifecycleEvent, + budget::Budget, storage::{SnapshotSource, Storage}, xdr, Error, Host, HostError, LedgerInfo, }; - // Test utilities for the host, used in various tests in sub-modules. pub trait AsScVal { fn as_scval(&self) -> ScVal; @@ -48,13 +46,14 @@ pub fn generate_account_id(host: &Host) -> AccountId { pub fn generate_bytes_array(host: &Host) -> [u8; 32] { let mut bytes: [u8; 32] = Default::default(); - host.with_test_prng(|chacha| Ok(chacha.fill_bytes(&mut bytes))) - .unwrap(); + host.with_test_prng(|chacha| { + chacha.fill_bytes(&mut bytes); + Ok(()) + }) + .unwrap(); bytes } - - pub struct MockSnapshotSource(BTreeMap, (Rc, Option)>); impl MockSnapshotSource { diff --git a/soroban-fuzz-host/.gitignore b/soroban-fuzz-host/.gitignore deleted file mode 100644 index d913617bc..000000000 --- a/soroban-fuzz-host/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target - diff --git a/soroban-fuzz-host/Cargo.lock b/soroban-fuzz-host/Cargo.lock deleted file mode 100644 index 8f74115fe..000000000 --- a/soroban-fuzz-host/Cargo.lock +++ /dev/null @@ -1,1075 +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 = "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 = "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 = "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 = "const-oid" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" - -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" -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 = "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 = "debug_logging" -version = "0.0.0" -dependencies = [ - "arbitrary", - "soroban-env-common", - "soroban-env-host", - "soroban-synth-wasm", -] - -[[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 = "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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" -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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" - -[[package]] -name = "form_urlencoded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -dependencies = [ - "percent-encoding", -] - -[[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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" - -[[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 = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[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.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "js-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" -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 = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" - -[[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.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[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-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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[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.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[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.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" - -[[package]] -name = "serde" -version = "1.0.190" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.190" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" -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 = "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.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "smallvec" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" - -[[package]] -name = "soroban-builtin-sdk-macros" -version = "20.0.0-rc2" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "soroban-env-common" -version = "20.0.0-rc2" -dependencies = [ - "arbitrary", - "crate-git-revision", - "ethnum", - "num-derive", - "num-traits", - "soroban-env-macros", - "soroban-wasmi", - "static_assertions", - "stellar-xdr", -] - -[[package]] -name = "soroban-env-host" -version = "20.0.0-rc2" -dependencies = [ - "backtrace", - "curve25519-dalek", - "ed25519-dalek", - "getrandom", - "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.0-rc2" -dependencies = [ - "itertools", - "proc-macro2", - "quote", - "serde", - "serde_json", - "stellar-xdr", - "syn", -] - -[[package]] -name = "soroban-fuzz-host" -version = "0.0.0" - -[[package]] -name = "soroban-synth-wasm" -version = "20.0.0-rc2" -dependencies = [ - "soroban-env-common", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "soroban-wasmi" -version = "0.31.0-soroban1" -source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" -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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" -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.7" -source = "git+https://github.com/stellar/rs-stellar-strkey?rev=e6ba45c60c16de28c7522586b80ed0150157df73#e6ba45c60c16de28c7522586b80ed0150157df73" -dependencies = [ - "base32", - "thiserror", -] - -[[package]] -name = "stellar-xdr" -version = "20.0.0-rc1" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=9c97e4fa909a0b6455547a4f4a95800696b2a69a#9c97e4fa909a0b6455547a4f4a95800696b2a69a" -dependencies = [ - "arbitrary", - "base64", - "crate-git-revision", - "hex", -] - -[[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.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[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.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" - -[[package]] -name = "wasm-encoder" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64ac98d5d61192cc45c701b7e4bd0b9aff91e2edfc7a088406cfe2288581e2c" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasmi_arena" -version = "0.4.0" -source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" - -[[package]] -name = "wasmi_core" -version = "0.13.0" -source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" -dependencies = [ - "downcast-rs", - "libm", - "num-traits", - "paste", -] - -[[package]] -name = "wasmparser" -version = "0.106.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d014e33793cab91655fa6349b0bc974984de106b2e0f6b0dfe6f6594b260624d" -dependencies = [ - "indexmap", - "url", -] - -[[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 = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/soroban-fuzz-host/Cargo.toml b/soroban-fuzz-host/Cargo.toml deleted file mode 100644 index b1bb7b79a..000000000 --- a/soroban-fuzz-host/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "soroban-fuzz-host" -version = "0.0.0" -description = "Collection of fuzzing targets for soroban host, do not publish" -edition = "2021" -publish = false -rust-version = "1.71" - -[workspace] -members = [ - "debug_logging", -] - -[profile.release] -debug = 1 - -[workspace.dependencies] -soroban-env-common ={ path = "../soroban-env-common"} -soroban-env-host ={ path = "../soroban-env-host"} -soroban-synth-wasm ={ path = "../soroban-synth-wasm"} -arbitrary = { version = "1.3.0", features = ["derive"] } diff --git a/soroban-fuzz-host/debug_logging/Cargo.toml b/soroban-fuzz-host/debug_logging/Cargo.toml deleted file mode 100644 index aae0ee0a6..000000000 --- a/soroban-fuzz-host/debug_logging/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "debug_logging" -version = "0.0.0" -authors = ["Stellar Development Foundation "] -license = "Apache-2.0" -edition = "2021" -publish = false - -[lib] -crate-type = ["cdylib", "rlib"] -doctest = false - -[dependencies] -soroban-env-common = { workspace = true } -soroban-env-host = { workspace = true, features = ["testutils"] } -soroban-synth-wasm = { workspace = true } -arbitrary ={ workspace = true } diff --git a/soroban-fuzz-host/src/lib.rs b/soroban-fuzz-host/src/lib.rs deleted file mode 100644 index e69de29bb..000000000