From 1332ee186a0675a22497d682e535b9eed68e4d8e Mon Sep 17 00:00:00 2001 From: lukacan Date: Fri, 13 Sep 2024 21:23:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Add=20program=20id=20tied=20to?= =?UTF-8?q?=20each=20generated=20instruction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 + .../fuzz_instructions_generator.rs | 4 +- .../test_fuzz_generator.rs | 17 +- .../expected_fuzz_instructions.rs | 3 + .../expected_test_fuzz.rs | 2 +- .../fuzz/derive/fuzz_test_executor/src/lib.rs | 3 +- crates/fuzz/src/fuzz_data.rs | 4 +- crates/fuzz/src/fuzz_test_executor.rs | 3 - crates/fuzz/src/ix_ops.rs | 4 + .../arbitrary-custom-types-4/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 6 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- .../arbitrary-limit-inputs-5/Trident.toml | 2 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 6 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 4 +- examples/fuzz-tests/cpi-metaplex-7/Cargo.lock | 265 +----------------- .../trident-tests/fuzz_tests/Cargo.toml | 2 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 3 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- examples/fuzz-tests/hello_world/Cargo.lock | 259 +---------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 3 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- .../incorrect-integer-arithmetic-3/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 6 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- .../incorrect-ix-sequence-1/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 12 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- examples/fuzz-tests/simple-cpi-6/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 3 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- .../unauthorized-access-2/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 6 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- .../unchecked-arithmetic-0/Cargo.lock | 265 +----------------- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 6 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 2 +- 37 files changed, 114 insertions(+), 2119 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4823163c0..8c7c66522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ incremented upon a breaking change and the patch version will be incremented for ## [dev] - Unreleased +**Added** + +- impr/ added get_program_id function to the IxOps and FuzzTestExecutor ([199](https://github.com/Ackee-Blockchain/trident/pull/199)) + **Changed** - feat/ option to add account into Fuzz Test environment with base64 data ([197](https://github.com/Ackee-Blockchain/trident/pull/197)) diff --git a/crates/client/src/source_code_generators/fuzz_instructions_generator.rs b/crates/client/src/source_code_generators/fuzz_instructions_generator.rs index 9321adf6c..758a48305 100644 --- a/crates/client/src/source_code_generators/fuzz_instructions_generator.rs +++ b/crates/client/src/source_code_generators/fuzz_instructions_generator.rs @@ -208,7 +208,9 @@ fn get_instruction_ixops( type IxData = #module_name::instruction::#instruction_ident_name; type IxAccounts = FuzzAccounts; type IxSnapshot = #ix_snapshot<'info>; - + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + #module_name::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/crates/client/src/source_code_generators/test_fuzz_generator.rs b/crates/client/src/source_code_generators/test_fuzz_generator.rs index 99b0b8cd9..f67604e52 100644 --- a/crates/client/src/source_code_generators/test_fuzz_generator.rs +++ b/crates/client/src/source_code_generators/test_fuzz_generator.rs @@ -23,20 +23,6 @@ pub fn generate_source_code(idl_instructions: &[Idl]) -> String { ), }; - let run_with_runtime: syn::Stmt = match fuzz_instructions.len() { - 1 => { - let program_name_upper = idl_instructions[0].metadata.name.to_case(Case::UpperSnake); - let program_id_name_ident = format_ident!("PROGRAM_ID_{}", program_name_upper); - - parse_quote!( - let _ = fuzz_data.run_with_runtime(#program_id_name_ident, &mut client); - ) - } - _ => parse_quote!( - let _ = fuzz_data.run_with_runtime(todo!(), &mut client); - ), - }; - let test_fuzz_definition: syn::File = parse_quote! { use trident_client::fuzzing::*; mod fuzz_instructions; @@ -60,8 +46,7 @@ pub fn generate_source_code(idl_instructions: &[Idl]) -> String { let mut client = ProgramTestClientBlocking::new(&#programs_array,&[]).unwrap(); - #run_with_runtime - + let _ = fuzz_data.run_with_runtime(&mut client); } diff --git a/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs b/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs index 36cc9beb7..f4f1b4926 100644 --- a/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs +++ b/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs @@ -54,6 +54,9 @@ pub mod dummy_example_fuzz_instructions { type IxData = dummy_example::instruction::InitializeIx; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeIxSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + dummy_example::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/crates/client/tests/expected_source_codes/expected_test_fuzz.rs b/crates/client/tests/expected_source_codes/expected_test_fuzz.rs index 3b60c9442..bf69ebc93 100644 --- a/crates/client/tests/expected_source_codes/expected_test_fuzz.rs +++ b/crates/client/tests/expected_source_codes/expected_test_fuzz.rs @@ -25,7 +25,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_dummy_example], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_DUMMY_EXAMPLE, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/crates/fuzz/derive/fuzz_test_executor/src/lib.rs b/crates/fuzz/derive/fuzz_test_executor/src/lib.rs index 20f466d48..4f72998b0 100644 --- a/crates/fuzz/derive/fuzz_test_executor/src/lib.rs +++ b/crates/fuzz/derive/fuzz_test_executor/src/lib.rs @@ -13,6 +13,8 @@ pub fn fuzz_test_executor(input: TokenStream) -> TokenStream { let variant_name = &variant.ident; quote! { #enum_name::#variant_name (ix) => { + let program_id = ix.get_program_id(); + let (mut signers, metas) = ix.get_accounts(client, &mut accounts.borrow_mut()) .map_err(|e| e.with_origin(Origin::Instruction(self.to_context_string()))) .expect("Accounts calculation expect"); @@ -99,7 +101,6 @@ pub fn fuzz_test_executor(input: TokenStream) -> TokenStream { impl FuzzTestExecutor for FuzzInstruction { fn run_fuzzer( &self, - program_id: Pubkey, accounts: &RefCell, client: &mut impl FuzzClient, sent_txs: &mut HashMap, diff --git a/crates/fuzz/src/fuzz_data.rs b/crates/fuzz/src/fuzz_data.rs index 4d67161ed..87eb422a2 100644 --- a/crates/fuzz/src/fuzz_data.rs +++ b/crates/fuzz/src/fuzz_data.rs @@ -6,7 +6,6 @@ use arbitrary::Arbitrary; use arbitrary::Unstructured; use solana_sdk::account::Account; use solana_sdk::instruction::AccountMeta; -use solana_sdk::pubkey::Pubkey; use std::cell::RefCell; use std::collections::HashMap; use std::error::Error; @@ -56,7 +55,6 @@ where { pub fn run_with_runtime( &self, - program_id: Pubkey, client: &mut impl FuzzClient, ) -> core::result::Result<(), Box> { // solana_logger::setup_with_default("off"); @@ -85,7 +83,7 @@ where eprintln!("\x1b[34mCurrently processing\x1b[0m: {}", fuzz_ix); if fuzz_ix - .run_fuzzer(program_id, &self.accounts, client, &mut sent_txs) + .run_fuzzer(&self.accounts, client, &mut sent_txs) .is_err() { // for now skip following instructions in case of error and move to the next fuzz iteration diff --git a/crates/fuzz/src/fuzz_test_executor.rs b/crates/fuzz/src/fuzz_test_executor.rs index 41eca4af7..727ffab15 100644 --- a/crates/fuzz/src/fuzz_test_executor.rs +++ b/crates/fuzz/src/fuzz_test_executor.rs @@ -2,8 +2,6 @@ use anchor_lang::solana_program::hash::Hash; -use solana_sdk::pubkey::Pubkey; - use std::cell::RefCell; use std::collections::HashMap; @@ -13,7 +11,6 @@ use crate::fuzz_client::FuzzClient; pub trait FuzzTestExecutor { fn run_fuzzer( &self, - program_id: Pubkey, accounts: &RefCell, client: &mut impl FuzzClient, sent_txs: &mut HashMap, diff --git a/crates/fuzz/src/ix_ops.rs b/crates/fuzz/src/ix_ops.rs index a50813683..2b3680e1a 100644 --- a/crates/fuzz/src/ix_ops.rs +++ b/crates/fuzz/src/ix_ops.rs @@ -16,6 +16,10 @@ pub trait IxOps<'info> { /// The structure to which the instruction accounts will be deserialized type IxSnapshot; + /// Specify Program ID to which the Instruction corresponds. This is particularly helpful when using multiple + /// programs in the workspace, to differentiate between possible program calls. + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey; + /// Provides instruction data for the fuzzed instruction. /// It is assumed that the instruction data will be based on the fuzzer input stored in the `self.data` variable. /// However it is on the developer to decide and it can be also for example a hardcoded constant. diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock index 061b22294..1968a626f 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock +++ b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock @@ -199,25 +199,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1319,38 +1300,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1367,24 +1324,13 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.76", ] @@ -1516,15 +1462,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1535,18 +1472,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1901,12 +1826,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1989,12 +1908,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2959,12 +2872,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3189,12 +3096,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3509,12 +3410,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3599,35 +3494,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.76", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3909,45 +3775,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.76", @@ -4025,15 +3853,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4305,49 +4124,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.22" @@ -6095,7 +5871,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6105,10 +5880,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6117,18 +5890,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6138,7 +5903,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6184,13 +5948,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6199,20 +5958,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6304,12 +6053,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 6558ef612..2bdc01249 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -45,6 +45,9 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { type IxData = arbitrary_custom_types_4::instruction::Initialize; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + arbitrary_custom_types_4::ID + } fn get_data( &self, _client: &mut impl FuzzClient, @@ -82,6 +85,9 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { type IxData = arbitrary_custom_types_4::instruction::Update; type IxAccounts = FuzzAccounts; type IxSnapshot = UpdateSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + arbitrary_custom_types_4::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index bf6792c56..a020ee579 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -33,7 +33,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_arbitrary_custom_types_4], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/Trident.toml b/examples/fuzz-tests/arbitrary-limit-inputs-5/Trident.toml index f2f2b3a17..d0247eb7c 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/Trident.toml +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/Trident.toml @@ -6,7 +6,7 @@ validator_startup_timeout = 15000 # Timeout in seconds (default: 10) timeout = 10 # Number of fuzzing iterations (default: 0 [no limit]) -iterations = 1000 +iterations = 100 # Number of concurrent fuzzing threads (default: 0 [number of CPUs / 2]) threads = 0 # Don't close children's stdin, stdout, stderr; can be noisy (default: false) diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 170c2e64c..066dc1f20 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -114,6 +114,9 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { type IxData = arbitrary_limit_inputs_5::instruction::InitVesting; type IxAccounts = FuzzAccounts; type IxSnapshot = InitVestingSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + arbitrary_limit_inputs_5::ID + } fn get_data( &self, client: &mut impl FuzzClient, @@ -212,6 +215,9 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { type IxData = arbitrary_limit_inputs_5::instruction::WithdrawUnlocked; type IxAccounts = FuzzAccounts; type IxSnapshot = WithdrawUnlockedSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + arbitrary_limit_inputs_5::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index f292da0f0..2951707da 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -25,7 +25,7 @@ impl FuzzDataBuilder for MyFuzzData { let withdraw_ix = FuzzInstruction::WithdrawUnlocked(WithdrawUnlocked::arbitrary(u)?); Ok(vec![withdraw_ix]) } - fn post_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + fn post_ixs(_u: &mut arbitrary::Unstructured) -> arbitrary::Result> { Ok(vec![]) } } @@ -40,7 +40,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_arbitrary_limit_inputs_5], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock b/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock index 4f35493e2..f080a5278 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock +++ b/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock @@ -193,25 +193,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1329,38 +1310,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1377,24 +1334,13 @@ dependencies = [ "syn 2.0.71", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.71", ] @@ -1526,15 +1472,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1545,18 +1482,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1911,12 +1836,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -2001,12 +1920,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2967,12 +2880,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3194,12 +3101,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3523,12 +3424,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3613,35 +3508,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.71", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3922,45 +3788,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.2.6", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.71", @@ -4038,15 +3866,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4312,49 +4131,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb4459594cbdbc6f3cd199bbca486f0ef7f1ecf107dce9cffa3f9d69df31dc7" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb454e8df10d664ef0e1137c69af0f2d9fa0de713c1b608656318a76a2f5d3cc" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.18" @@ -6296,7 +6072,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6306,10 +6081,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6318,18 +6091,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account 2.3.0", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6339,7 +6104,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6385,13 +6149,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6400,20 +6159,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6505,12 +6254,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/Cargo.toml index 57ce3b7d8..b0b496c29 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/Cargo.toml @@ -14,10 +14,10 @@ arbitrary = "1.3.0" assert_matches = "1.4.0" mpl-token-metadata = "4.1.2" anchor-spl = "0.30.1" + [dependencies.trident-client] path = "../../../../../crates/client" - [dependencies.cpi-metaplex-7] path = "../../programs/cpi-metaplex-7" features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 19cce1d68..a2bb3718d 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -34,6 +34,9 @@ pub mod cpi_metaplex_7_fuzz_instructions { type IxData = cpi_metaplex_7::instruction::Initialize; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + cpi_metaplex_7::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 0fa8fe420..665813cca 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -39,7 +39,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_cpi_metaplex_7, metaplex], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CPI_METAPLEX_7, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/hello_world/Cargo.lock b/examples/fuzz-tests/hello_world/Cargo.lock index 7cec29365..e88ddd2cc 100644 --- a/examples/fuzz-tests/hello_world/Cargo.lock +++ b/examples/fuzz-tests/hello_world/Cargo.lock @@ -199,25 +199,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1310,38 +1291,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1358,24 +1315,13 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.76", ] @@ -1507,15 +1453,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1526,18 +1463,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1892,12 +1817,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1980,12 +1899,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2959,12 +2872,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3189,12 +3096,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3509,12 +3410,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3599,35 +3494,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.76", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3909,45 +3775,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.76", @@ -4025,15 +3853,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4305,49 +4124,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.22" @@ -6095,7 +5871,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6105,10 +5880,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6117,18 +5890,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6138,7 +5903,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6198,15 +5962,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6298,12 +6053,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index dde8b5652..c0b032280 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -28,6 +28,9 @@ pub mod hello_world_fuzz_instructions { type IxData = hello_world::instruction::InitializeFn; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeFnSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + hello_world::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 19601fd66..c6c452cfa 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -24,7 +24,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_hello_world], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_HELLO_WORLD, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock index fa768c4e6..e13408527 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock @@ -263,25 +263,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" -dependencies = [ - "anchor-lang 0.29.0", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.29.0" @@ -1480,38 +1461,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1528,24 +1485,13 @@ dependencies = [ "syn 2.0.60", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ - "darling_core 0.20.8", + "darling_core", "quote", "syn 2.0.60", ] @@ -1677,15 +1623,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1696,18 +1633,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -2062,12 +1987,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -2151,12 +2070,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -3115,12 +3028,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3342,12 +3249,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3671,12 +3572,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" -[[package]] -name = "relative-path" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" - [[package]] name = "reqwest" version = "0.11.27" @@ -3761,35 +3656,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.60", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -4070,45 +3936,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.2.6", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.60", @@ -4186,15 +4014,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4460,49 +4279,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.12" @@ -6491,7 +6267,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang 0.30.1", "anchor-lang-idl-spec", "anchor-syn 0.30.1", @@ -6501,10 +6276,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6513,18 +6286,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account 2.3.0", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6534,7 +6299,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6580,13 +6344,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang 0.30.1", - "anchor-syn 0.30.1", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6595,20 +6354,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6700,12 +6449,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 72e78f481..0c9983f72 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -64,6 +64,9 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { type IxData = incorrect_integer_arithmetic_3::instruction::InitVesting; type IxAccounts = FuzzAccounts; type IxSnapshot = InitVestingSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_integer_arithmetic_3::ID + } fn get_data( &self, client: &mut impl FuzzClient, @@ -163,6 +166,9 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { type IxData = incorrect_integer_arithmetic_3::instruction::WithdrawUnlocked; type IxAccounts = FuzzAccounts; type IxSnapshot = WithdrawUnlockedSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_integer_arithmetic_3::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 5d20349a6..7845cd9d8 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -33,7 +33,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz ProgramTestClientBlocking::new(&[fuzzing_program_incorrect_integer_arithmetic_3], &[]) .unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock index 6e810c8a1..57f244c3b 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock @@ -199,25 +199,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1310,38 +1291,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1358,24 +1315,13 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.76", ] @@ -1507,15 +1453,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1526,18 +1463,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1892,12 +1817,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1980,12 +1899,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2959,12 +2872,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3189,12 +3096,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3509,12 +3410,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3599,35 +3494,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.76", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3909,45 +3775,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.76", @@ -4025,15 +3853,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4305,49 +4124,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.22" @@ -6095,7 +5871,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6105,10 +5880,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6117,18 +5890,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6138,7 +5903,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6184,13 +5948,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6199,20 +5958,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6304,12 +6053,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index ca414898a..2191a6ec2 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -79,6 +79,9 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { type IxData = incorrect_ix_sequence_1::instruction::EndRegistrations; type IxAccounts = FuzzAccounts; type IxSnapshot = EndRegistrationsSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_ix_sequence_1::ID + } fn get_data( &self, _client: &mut impl FuzzClient, @@ -119,6 +122,9 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { type IxData = incorrect_ix_sequence_1::instruction::Initialize; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_ix_sequence_1::ID + } fn get_data( &self, _client: &mut impl FuzzClient, @@ -161,6 +167,9 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { type IxData = incorrect_ix_sequence_1::instruction::Invest; type IxAccounts = FuzzAccounts; type IxSnapshot = InvestSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_ix_sequence_1::ID + } fn get_data( &self, _client: &mut impl FuzzClient, @@ -225,6 +234,9 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { type IxData = incorrect_ix_sequence_1::instruction::Register; type IxAccounts = FuzzAccounts; type IxSnapshot = RegisterSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + incorrect_ix_sequence_1::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 68577f2ec..ae7f54e9f 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -31,7 +31,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_incorrect_ix_sequence_1], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_IX_SEQUENCE_1, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/simple-cpi-6/Cargo.lock b/examples/fuzz-tests/simple-cpi-6/Cargo.lock index 6412bbc6b..99c4a2833 100644 --- a/examples/fuzz-tests/simple-cpi-6/Cargo.lock +++ b/examples/fuzz-tests/simple-cpi-6/Cargo.lock @@ -193,25 +193,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1321,38 +1302,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1369,24 +1326,13 @@ dependencies = [ "syn 2.0.71", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.71", ] @@ -1518,15 +1464,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1537,18 +1474,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1903,12 +1828,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1992,12 +1911,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2945,12 +2858,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3172,12 +3079,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3501,12 +3402,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3591,35 +3486,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.71", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3900,45 +3766,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.71", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.2.6", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.71", @@ -4016,15 +3844,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4290,49 +4109,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb4459594cbdbc6f3cd199bbca486f0ef7f1ecf107dce9cffa3f9d69df31dc7" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb454e8df10d664ef0e1137c69af0f2d9fa0de713c1b608656318a76a2f5d3cc" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.18" @@ -6091,7 +5867,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6101,10 +5876,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6113,18 +5886,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6134,7 +5899,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6180,13 +5944,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6195,20 +5954,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6300,12 +6049,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 45065854d..0a1da48e7 100644 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -26,6 +26,9 @@ pub mod caller_fuzz_instructions { type IxData = caller::instruction::InitializeCaller; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeCallerSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + caller::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index e811cdd89..27fd7f7ba 100644 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -36,7 +36,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz ProgramTestClientBlocking::new(&[fuzzing_program_callee, fuzzing_program_caller], &[]) .unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CALLER, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock index ec1f6a52f..5fada0231 100644 --- a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock +++ b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock @@ -199,25 +199,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1310,38 +1291,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1358,24 +1315,13 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.76", ] @@ -1507,15 +1453,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1526,18 +1463,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1892,12 +1817,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1980,12 +1899,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2950,12 +2863,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3180,12 +3087,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3500,12 +3401,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3590,35 +3485,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.76", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3900,45 +3766,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.76", @@ -4016,15 +3844,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4296,49 +4115,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.22" @@ -6086,7 +5862,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6096,10 +5871,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6108,18 +5881,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6129,7 +5894,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6175,13 +5939,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6190,20 +5949,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6304,12 +6053,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 48549d8b2..f47561509 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -46,6 +46,9 @@ pub mod unauthorized_access_2_fuzz_instructions { type IxData = unauthorized_access_2::instruction::Initialize; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + unauthorized_access_2::ID + } fn get_data( &self, client: &mut impl FuzzClient, @@ -104,6 +107,9 @@ pub mod unauthorized_access_2_fuzz_instructions { type IxData = unauthorized_access_2::instruction::Withdraw; type IxAccounts = FuzzAccounts; type IxSnapshot = WithdrawSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + unauthorized_access_2::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 8dcab457c..cf5992955 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -32,7 +32,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_unauthorized_access_2], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNAUTHORIZED_ACCESS_2, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() { diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock index 54b4f2218..fcb4b4522 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock +++ b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock @@ -199,25 +199,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "anchor-client" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" -dependencies = [ - "anchor-lang", - "anyhow", - "futures", - "regex", - "serde", - "solana-account-decoder", - "solana-client", - "solana-sdk", - "thiserror", - "tokio", - "url", -] - [[package]] name = "anchor-derive-accounts" version = "0.30.1" @@ -1310,38 +1291,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.10", - "darling_macro 0.20.10", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1358,24 +1315,13 @@ dependencies = [ "syn 2.0.76", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.10", + "darling_core", "quote", "syn 2.0.76", ] @@ -1507,15 +1453,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-next" version = "2.0.0" @@ -1526,18 +1463,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -1892,12 +1817,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" - [[package]] name = "futures-util" version = "0.3.30" @@ -1980,12 +1899,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "goblin" version = "0.5.4" @@ -2950,12 +2863,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "os_str_bytes" version = "6.6.1" @@ -3180,12 +3087,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty-hex" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" - [[package]] name = "prettytable" version = "0.10.0" @@ -3500,12 +3401,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "relative-path" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" - [[package]] name = "reqwest" version = "0.11.27" @@ -3590,35 +3485,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rstest" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" -dependencies = [ - "futures", - "futures-timer", - "rstest_macros", - "rustc_version", -] - -[[package]] -name = "rstest_macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" -dependencies = [ - "cfg-if", - "glob", - "proc-macro2", - "quote", - "regex", - "relative-path", - "rustc_version", - "syn 2.0.76", - "unicode-ident", -] - [[package]] name = "rtoolbox" version = "0.0.2" @@ -3900,45 +3766,7 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.10", - "proc-macro2", - "quote", - "syn 2.0.76", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.4.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap", - "futures", - "lazy_static", - "log", - "parking_lot", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ + "darling", "proc-macro2", "quote", "syn 2.0.76", @@ -4016,15 +3844,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shellexpand" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" -dependencies = [ - "dirs", -] - [[package]] name = "shlex" version = "1.3.0" @@ -4296,49 +4115,6 @@ dependencies = [ "url", ] -[[package]] -name = "solana-cli-config" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" -dependencies = [ - "dirs-next", - "lazy_static", - "serde", - "serde_derive", - "serde_yaml", - "solana-clap-utils", - "solana-sdk", - "url", -] - -[[package]] -name = "solana-cli-output" -version = "1.18.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" -dependencies = [ - "Inflector", - "base64 0.21.7", - "chrono", - "clap 2.34.0", - "console", - "humantime", - "indicatif", - "pretty-hex", - "semver", - "serde", - "serde_json", - "solana-account-decoder", - "solana-clap-utils", - "solana-cli-config", - "solana-rpc-client-api", - "solana-sdk", - "solana-transaction-status", - "solana-vote-program", - "spl-memo", -] - [[package]] name = "solana-client" version = "1.18.22" @@ -6086,7 +5862,6 @@ dependencies = [ name = "trident-client" version = "0.7.0" dependencies = [ - "anchor-client", "anchor-lang", "anchor-lang-idl-spec", "anchor-syn", @@ -6096,10 +5871,8 @@ dependencies = [ "borsh 0.10.3", "cargo_metadata", "convert_case", - "ed25519-dalek", "fehler", "futures", - "heck 0.4.1", "honggfuzz", "indicatif", "log", @@ -6108,18 +5881,10 @@ dependencies = [ "quinn-proto", "quote", "regex", - "rstest", "serde", "serde_json", - "serial_test", - "shellexpand", - "solana-account-decoder", - "solana-cli-output", "solana-program-test", "solana-sdk", - "solana-transaction-status", - "spl-associated-token-account", - "spl-token", "syn 1.0.109", "thiserror", "tokio", @@ -6129,7 +5894,6 @@ dependencies = [ "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", "trident-fuzz", - "trident-test", ] [[package]] @@ -6175,13 +5939,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6190,20 +5949,10 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] -[[package]] -name = "trident-test" -version = "0.3.3" -dependencies = [ - "darling 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6304,12 +6053,6 @@ dependencies = [ "void", ] -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 5a9fbe94f..db2fd40ba 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -44,6 +44,9 @@ pub mod unchecked_arithmetic_0_fuzz_instructions { type IxData = unchecked_arithmetic_0::instruction::Initialize; type IxAccounts = FuzzAccounts; type IxSnapshot = InitializeSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + unchecked_arithmetic_0::ID + } fn get_data( &self, _client: &mut impl FuzzClient, @@ -81,6 +84,9 @@ pub mod unchecked_arithmetic_0_fuzz_instructions { type IxData = unchecked_arithmetic_0::instruction::Update; type IxAccounts = FuzzAccounts; type IxSnapshot = UpdateSnapshot<'info>; + fn get_program_id(&self) -> solana_sdk::pubkey::Pubkey { + unchecked_arithmetic_0::ID + } fn get_data( &self, _client: &mut impl FuzzClient, diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index d59c8a55f..3e3e8ad20 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -39,7 +39,7 @@ fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: Fuzz let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_unchecked_arithmetic_0], &[]).unwrap(); - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNCHECKED_ARITHMETIC_0, &mut client); + let _ = fuzz_data.run_with_runtime(&mut client); } fn main() {