From 2d07c264f6b0f4780a672cc0f2d973320f517b7f Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:18:20 +0100 Subject: [PATCH 01/57] =?UTF-8?q?=F0=9F=8E=A8=20added=20discover=20into=20?= =?UTF-8?q?build,=20added=20arch=20into=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/build.rs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index 68b159f8..1e9c4a80 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -1,12 +1,19 @@ -use anyhow::Error; +use crate::{discover, ProgramArch}; +use anyhow::{bail, Error}; use fehler::throws; use trdelnik_client::*; +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; + #[throws] -pub async fn build(root: String) { - let commander = Commander::with_root(root); - commander.create_program_client_crate().await?; - commander.build_programs().await?; - commander.generate_program_client_deps().await?; - commander.generate_program_client_lib_rs().await?; +pub async fn build(root: String, arch: ProgramArch) { + // TODO root argument maybe not needed + let root = if let Some(r) = discover(TRDELNIK_TOML)? { + r + } else { + bail!("It does not seem that Trdelnik is initialized because the Trdelnik.toml file was not found in any parent directory!"); + }; + let mut builder = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + builder.build(arch).await?; } From b10185291872fa28129a26d99cf6cc61c9b3f1ad Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:18:52 +0100 Subject: [PATCH 02/57] =?UTF-8?q?=F0=9F=8E=A8=20added=20discover=20into=20?= =?UTF-8?q?clean,=20and=20moved=20clean=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/clean.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/cli/src/command/clean.rs b/crates/cli/src/command/clean.rs index a08f7e9f..b8cc9f95 100644 --- a/crates/cli/src/command/clean.rs +++ b/crates/cli/src/command/clean.rs @@ -1,9 +1,17 @@ -use anyhow::Error; +use anyhow::{bail, Error}; use fehler::throws; -use trdelnik_client::Cleaner; +use trdelnik_client::WorkspaceBuilder; + +use crate::discover; +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] pub async fn clean() { - let cleaner = Cleaner::new(); - cleaner.clean_target().await?; + let root = if let Some(r) = discover(TRDELNIK_TOML)? { + r + } else { + bail!("It does not seem that Trdelnik is initialized because the Trdelnik.toml file was not found in any parent directory!"); + }; + let builder = WorkspaceBuilder::new_with_root(root); + builder.clean().await?; } From d9f63612c300307cf0f854c9955dfd85cb43621e Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:19:55 +0100 Subject: [PATCH 03/57] =?UTF-8?q?=F0=9F=8E=A8=20moved=20discover=20from=20?= =?UTF-8?q?fuzz=20,=20as=20we=20have=20this=20implemented=20already=20for?= =?UTF-8?q?=20other=20commands,=20also=20moved=20some=20logic=20into=20com?= =?UTF-8?q?mander?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/fuzz.rs | 299 ++------------------------------- 1 file changed, 12 insertions(+), 287 deletions(-) diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index aab548e8..84c3c378 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -1,17 +1,12 @@ -use std::{ - env, - path::{Path, PathBuf}, - process, -}; - -use anyhow::{bail, Context, Error, Result}; +use anyhow::{bail, Error}; use clap::Subcommand; use fehler::throws; use trdelnik_client::Commander; -pub const TESTS_WORKSPACE: &str = "trdelnik-tests"; -pub const HFUZZ_WORKSPACE: &str = "hfuzz_workspace"; +use crate::discover; + +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[derive(Subcommand)] #[allow(non_camel_case_types)] @@ -35,10 +30,14 @@ pub enum FuzzCommand { #[throws] pub async fn fuzz(root: Option, subcmd: FuzzCommand) { + // TODO also think about skip_fuzzer within the init option, because here + // we look for Trdelnik.toml but toml can exist but fuzzer is not initialized + // Moreover fuzzer should be main goal of framework, so would remove skip_fuzzer + // option let root = match root { Some(r) => r, _ => { - let root = _discover()?; + let root = discover(TRDELNIK_TOML)?; if let Some(r) = root { r } else { @@ -47,296 +46,22 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { } }; - let commander = Commander::with_root(root.clone()); - match subcmd { FuzzCommand::Run { target, with_exit_code, } => { if with_exit_code { - // Parse the HFUZZ run arguments to find out if the crash folder and crash files extension was modified. - let hfuzz_run_args = env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); - let (crash_dir, ext) = get_crash_dir_and_ext(&root, &target, &hfuzz_run_args); - - if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { - if !crash_files.is_empty() { - println!("Error: The crash directory {} already contains crash files from previous runs. \n\nTo run Trdelnik fuzzer with exit code, you must either (backup and) remove the old crash files or alternatively change the crash folder using for example the --crashdir option and the HFUZZ_RUN_ARGS env variable such as:\nHFUZZ_RUN_ARGS=\"--crashdir ./new_crash_dir\"", crash_dir.to_string_lossy()); - process::exit(1); - } - } - commander.run_fuzzer(target).await?; - if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { - if !crash_files.is_empty() { - println!( - "The crash directory {} contains new fuzz test crashes. Exiting!", - crash_dir.to_string_lossy() - ); - process::exit(1); - } - } + Commander::run_fuzzer_with_exit_code(target, root).await?; } else { - commander.run_fuzzer(target).await?; + Commander::run_fuzzer(target, root).await?; } } FuzzCommand::Run_Debug { target, crash_file_path, } => { - commander.run_fuzzer_debug(target, crash_file_path).await?; + Commander::run_fuzzer_debug(target, crash_file_path, root).await?; } }; } - -// Climbs each parent directory until we find Trdelnik.toml. -fn _discover() -> Result> { - let _cwd = std::env::current_dir()?; - let mut cwd_opt = Some(_cwd.as_path()); - - while let Some(cwd) = cwd_opt { - for f in std::fs::read_dir(cwd) - .with_context(|| format!("Error reading the directory with path: {}", cwd.display()))? - { - let p = f - .with_context(|| { - format!("Error reading the directory with path: {}", cwd.display()) - })? - .path(); - if let Some(filename) = p.file_name() { - if filename.to_str() == Some("Trdelnik.toml") { - return Ok(Some(cwd.to_string_lossy().to_string())); - } - } - } - - cwd_opt = cwd.parent(); - } - - Ok(None) -} - -fn get_crash_dir_and_ext(root: &str, target: &str, hfuzz_run_args: &str) -> (PathBuf, String) { - // FIXME: we split by whitespace without respecting escaping or quotes - same approach as honggfuzz-rs so there is no point to fix it here before the upstream is fixed - let hfuzz_run_args = hfuzz_run_args.split_whitespace(); - - let extension = - get_cmd_option_value(hfuzz_run_args.clone(), "-e", "--ext").unwrap_or("fuzz".to_string()); - - let crash_dir = get_cmd_option_value(hfuzz_run_args.clone(), "", "--cr") - .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); - - let crash_path = if let Some(dir) = crash_dir { - Path::new(root).join(TESTS_WORKSPACE).join(dir) - } else { - Path::new(root) - .join(TESTS_WORKSPACE) - .join(HFUZZ_WORKSPACE) - .join(target) - }; - - (crash_path, extension) -} - -fn get_cmd_option_value<'a>( - hfuzz_run_args: impl Iterator, - short_opt: &str, - long_opt: &str, -) -> Option { - let mut args_iter = hfuzz_run_args; - let mut value: Option = None; - - // ensure short option starts with one dash and long option with two dashes - let short_opt = format!("-{}", short_opt.trim_start_matches('-')); - let long_opt = format!("--{}", long_opt.trim_start_matches('-')); - - while let Some(arg) = args_iter.next() { - match arg.strip_prefix(&short_opt) { - Some(val) if short_opt.len() > 1 => { - if !val.is_empty() { - // -ecrash for crash extension with no space - value = Some(val.to_string()); - } else if let Some(next_arg) = args_iter.next() { - // -e crash for crash extension with space - value = Some(next_arg.to_string()); - } else { - value = None; - } - } - _ => { - if arg.starts_with(&long_opt) && long_opt.len() > 2 { - value = args_iter.next().map(|a| a.to_string()); - } - } - } - } - - value -} - -fn get_crash_files( - dir: &PathBuf, - extension: &str, -) -> Result, Box> { - let paths = std::fs::read_dir(dir)? - // Filter out all those directory entries which couldn't be read - .filter_map(|res| res.ok()) - // Map the directory entries to paths - .map(|dir_entry| dir_entry.path()) - // Filter out all paths with extensions other than `extension` - .filter_map(|path| { - if path.extension().map_or(false, |ext| ext == extension) { - Some(path) - } else { - None - } - }) - .collect::>(); - Ok(paths) -} - -#[cfg(test)] -mod tests { - use super::*; - #[test] - fn test_cmd_options_parsing() { - let mut command = String::from("-Q -v --extension fuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q --extension fuzz -v"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q -e fuzz -v"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q --extension fuzz -v --extension "); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, None); - - command = String::from("-Q --extension fuzz -v -e "); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, None); - - let mut command = String::from("--extension buzz -e fuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q -v -e fuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q -v -efuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q -v --ext fuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, Some("fuzz".to_string())); - - command = String::from("-Q -v --extfuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, None); - - command = String::from("-Q -v --workspace"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", "--ext"); - assert_eq!(extension, None); - - command = String::from("-Q -v -e"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "", "--ext"); - assert_eq!(extension, None); - - command = String::from("-Q -v --ext fuzz"); - let args = command.split_whitespace(); - - let extension = get_cmd_option_value(args, "-e", ""); - assert_eq!(extension, None); - } - - #[test] - fn test_get_crash_dir_and_ext() { - let root = "/home/fuzz"; - let target = "target"; - let default_crash_path = Path::new(root) - .join(TESTS_WORKSPACE) - .join(HFUZZ_WORKSPACE) - .join(target); - - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, ""); - - assert_eq!(crash_dir, default_crash_path); - assert_eq!(&ext, "fuzz"); - - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e"); - - assert_eq!(crash_dir, default_crash_path); - assert_eq!(&ext, "fuzz"); - - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e crash"); - - assert_eq!(crash_dir, default_crash_path); - assert_eq!(&ext, "crash"); - - // test absolute path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W /home/crash -e crash"); - - let expected_crash_path = Path::new("/home/crash"); - assert_eq!(crash_dir, expected_crash_path); - assert_eq!(&ext, "crash"); - - // test absolute path - let (crash_dir, ext) = - get_crash_dir_and_ext(root, target, "-Q --crash /home/crash -e crash"); - - let expected_crash_path = Path::new("/home/crash"); - assert_eq!(crash_dir, expected_crash_path); - assert_eq!(&ext, "crash"); - - // test relative path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W ../crash -e crash"); - - let expected_crash_path = Path::new(root).join(TESTS_WORKSPACE).join("../crash"); - assert_eq!(crash_dir, expected_crash_path); - assert_eq!(&ext, "crash"); - - // test relative path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash ../crash -e crash"); - - let expected_crash_path = Path::new(root).join(TESTS_WORKSPACE).join("../crash"); - assert_eq!(crash_dir, expected_crash_path); - assert_eq!(&ext, "crash"); - - // crash directory has precedence before workspace - let (crash_dir, ext) = - get_crash_dir_and_ext(root, target, "-Q --crash ../crash -W /workspace -e crash"); - - let expected_crash_path = Path::new(root).join(TESTS_WORKSPACE).join("../crash"); - assert_eq!(crash_dir, expected_crash_path); - assert_eq!(&ext, "crash"); - } -} From bd3ed402c3b83c38c29c4cef00312bfe2501b826 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:20:41 +0100 Subject: [PATCH 04/57] =?UTF-8?q?=F0=9F=8E=A8=20also=20added=20functionali?= =?UTF-8?q?ty=20for=20sbf/bpf=20arch=20and=20also=20correctly=20check=20fo?= =?UTF-8?q?r=20anchor/cargo=20toml=20files=20for=20fuzzer/no=20fuzzer=20in?= =?UTF-8?q?it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/init.rs | 35 +++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index 2f11da76..d6303a60 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -1,9 +1,34 @@ -use anyhow::Error; +use anyhow::{bail, Error}; use fehler::throws; -use trdelnik_client::TestGenerator; +use trdelnik_client::WorkspaceBuilder; + +use crate::{discover, ProgramArch}; + +pub const ANCHOR_TOML: &str = "Anchor.toml"; +pub const CARGO_TOML: &str = "Cargo.toml"; #[throws] -pub async fn init(skip_fuzzer: bool) { - let generator = TestGenerator::new(); - generator.generate(skip_fuzzer).await?; +pub async fn init(skip_fuzzer: bool, arch: ProgramArch) { + // TODO maybe remove skip fuzzer option ? + if skip_fuzzer { + // if skipping fuzzer no need to look for anchor.toml + let root = if let Some(r) = discover(CARGO_TOML)? { + r + } else { + bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); + }; + let mut generator = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + generator.initialize_without_fuzzer(arch).await?; + } else { + // fuzzer only supported with anchor + let root = if let Some(r) = discover(ANCHOR_TOML)? { + r + } else { + bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); + }; + let mut generator = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + generator.initialize_with_fuzzer(arch).await?; + } } From 569861f4fcfa3b652e1634a43f836854b8b6fe9c Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:21:14 +0100 Subject: [PATCH 05/57] =?UTF-8?q?=F0=9F=8E=A8=20added=20discover=20into=20?= =?UTF-8?q?localnet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/localnet.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/crates/cli/src/command/localnet.rs b/crates/cli/src/command/localnet.rs index 580ab01a..511ab51f 100644 --- a/crates/cli/src/command/localnet.rs +++ b/crates/cli/src/command/localnet.rs @@ -1,12 +1,20 @@ -use anyhow::Error; +use anyhow::{bail, Error}; use fehler::throws; use tokio::signal; use trdelnik_client::*; +use crate::discover; +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] pub async fn localnet() { - let commander = Commander::new(); - let validator_handle = commander.start_localnet().await?; + // TODO this is only starting local validator , so maybe no need to check for Trdelnik.toml + let root = if let Some(r) = discover(TRDELNIK_TOML)? { + r + } else { + bail!("It does not seem that Trdelnik is initialized because the {} file was not found in any parent directory!",TRDELNIK_TOML); + }; + + let validator_handle = Commander::start_localnet(&root).await?; // wait for SIGINT (^C) signal signal::ctrl_c().await.expect("failed to listen for event"); From 13988789d29c4e46d047cb258ddf03aca98eac31 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:21:34 +0100 Subject: [PATCH 06/57] =?UTF-8?q?=F0=9F=8E=A8=20discover=20added=20for=20t?= =?UTF-8?q?est=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/test.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/cli/src/command/test.rs b/crates/cli/src/command/test.rs index b4eb3030..ed1c259e 100644 --- a/crates/cli/src/command/test.rs +++ b/crates/cli/src/command/test.rs @@ -1,9 +1,19 @@ -use anyhow::Error; +use anyhow::{bail, Error}; use fehler::throws; use trdelnik_client::*; +use crate::discover; + +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; + #[throws] pub async fn test(root: String) { - let commander = Commander::with_root(root); - commander.run_tests().await?; + // TODO root argument maybe not needed + + match discover(TRDELNIK_TOML)? { + Some(_) => Commander::run_tests().await?, + _ => { + bail!("It does not seem that Trdelnik is initialized because the Trdelnik.toml file was not found in any parent directory!") + } + } } From 8b1b58b0dc9a74c3b6570c89a316bede0e1a3de9 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:22:17 +0100 Subject: [PATCH 07/57] =?UTF-8?q?=F0=9F=8E=A8=20one=20discover=20for=20all?= =?UTF-8?q?=20commands=20+=20arch=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/lib.rs | 51 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 4b21d49a..675c3e16 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,5 +1,5 @@ -use anyhow::Error; -use clap::{Parser, Subcommand}; +use anyhow::{Context, Error, Result}; +use clap::{Parser, Subcommand, ValueEnum}; use fehler::throws; // subcommand functions to call and nested subcommands @@ -7,9 +7,23 @@ mod command; // bring nested subcommand enums into scope use command::ExplorerCommand; use command::FuzzCommand; - use command::KeyPairCommand; +#[derive(ValueEnum, Parser, Clone, PartialEq, Eq, Debug)] +pub enum ProgramArch { + Bpf, + Sbf, +} + +impl ProgramArch { + pub fn build_subcommand(&self) -> &str { + match self { + Self::Bpf => "build-bpf", + Self::Sbf => "build-sbf", + } + } +} + #[derive(Parser)] #[clap(version, propagate_version = true)] struct Cli { @@ -24,6 +38,8 @@ enum Command { /// Anchor project root #[clap(short, long, default_value = "./")] root: String, + #[clap(value_enum, short, long, default_value = "sbf")] + arch: ProgramArch, }, /// Get information about a keypair KeyPair { @@ -56,6 +72,8 @@ enum Command { /// Flag to skip generating template for fuzzing and activating the fuzzing feature. #[arg(short, long)] skip_fuzzer: bool, + #[clap(value_enum, short, long, default_value = "sbf")] + arch: ProgramArch, }, /// Removes target contents except for KeyPair and removes hfuzz_target folder Clean, @@ -66,13 +84,36 @@ pub async fn start() { let cli = Cli::parse(); match cli.command { - Command::Build { root } => command::build(root).await?, + Command::Build { root, arch } => command::build(root, arch).await?, Command::KeyPair { subcmd } => command::keypair(subcmd)?, Command::Test { root } => command::test(root).await?, Command::Fuzz { root, subcmd } => command::fuzz(root, subcmd).await?, Command::Localnet => command::localnet().await?, Command::Explorer { subcmd } => command::explorer(subcmd).await?, - Command::Init { skip_fuzzer } => command::init(skip_fuzzer).await?, + Command::Init { skip_fuzzer, arch } => command::init(skip_fuzzer, arch).await?, Command::Clean => command::clean().await?, } } + +pub fn discover(searching_for: &str) -> Result> { + let current_dir = std::env::current_dir()?; + let mut dir = Some(current_dir.as_path()); + while let Some(cwd) = dir { + for file in std::fs::read_dir(cwd) + .with_context(|| format!("Error reading the directory with path: {}", cwd.display()))? + { + let path = file + .with_context(|| { + format!("Error reading the directory with path: {}", cwd.display()) + })? + .path(); + if let Some(filename) = path.file_name() { + if filename.to_str() == Some(searching_for) { + return Ok(Some(cwd.to_string_lossy().to_string())); + } + } + } + dir = cwd.parent(); + } + Ok(None) +} From 87f23e3f4d91d3787b73598507bfd3c4f7640ab7 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:22:47 +0100 Subject: [PATCH 08/57] =?UTF-8?q?=F0=9F=94=A5=20removed=20cleaner=20as=20t?= =?UTF-8?q?his=20can=20be=20handled=20within=20the=20workspace=20builder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/cleaner.rs | 59 ------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 crates/client/src/cleaner.rs diff --git a/crates/client/src/cleaner.rs b/crates/client/src/cleaner.rs deleted file mode 100644 index ff753338..00000000 --- a/crates/client/src/cleaner.rs +++ /dev/null @@ -1,59 +0,0 @@ -use crate::config::Config; -use fehler::{throw, throws}; -use std::{ - io, - path::{Path, PathBuf}, -}; -use thiserror::Error; -use tokio::{fs, process::Command}; - -#[derive(Error, Debug)] -pub enum Error { - #[error("{0:?}")] - Io(#[from] io::Error), - #[error("Cannot find the Anchor.toml file to locate the root folder")] - BadWorkspace, -} - -pub struct Cleaner; - -impl Default for Cleaner { - fn default() -> Self { - Self::new() - } -} - -impl Cleaner { - pub fn new() -> Self { - Self - } - #[throws] - pub async fn clean_target(&self) { - let root = match Config::discover_root() { - Ok(root) => root, - Err(_) => throw!(Error::BadWorkspace), - }; - self.clean_anchor_target().await?; - self.clean_hfuzz_target(&root).await?; - } - - #[throws] - async fn clean_anchor_target(&self) { - Command::new("anchor").arg("clean").spawn()?.wait().await?; - } - #[throws] - async fn clean_hfuzz_target(&self, root: &PathBuf) { - let hfuzz_target_path = Path::new(root) - .join(crate::test_generator::TESTS_WORKSPACE) - .join(crate::test_generator::HFUZZ_TARGET); - if hfuzz_target_path.exists() { - fs::remove_dir_all(hfuzz_target_path).await?; - } else { - println!( - "skipping {}/{} directory: not found", - crate::test_generator::TESTS_WORKSPACE, - crate::test_generator::HFUZZ_TARGET - ) - } - } -} From b95efae41637a87fc22293046cddcbb593521f20 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:23:36 +0100 Subject: [PATCH 09/57] =?UTF-8?q?=F0=9F=8E=A8=20grouping=20constants=20on?= =?UTF-8?q?=20one=20place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/lib.rs | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index e4e992f2..43a8127d 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -64,11 +64,34 @@ pub use keys::*; pub mod idl; pub mod program_client_generator; -pub mod test_generator; -pub use test_generator::TestGenerator; +pub mod workspace_builder; +pub use workspace_builder::WorkspaceBuilder; pub mod error_reporter; pub use error_reporter::*; -pub mod cleaner; -pub use cleaner::*; +pub mod constants { + pub const PROGRAM_CLIENT_DIRECTORY: &str = ".program_client"; + pub const CARGO: &str = "Cargo.toml"; + pub const TRDELNIK: &str = "Trdelnik.toml"; + pub const ANCHOR: &str = "Anchor.toml"; + + pub const LIB: &str = "lib.rs"; + pub const SRC: &str = "src"; + + pub const TESTS_WORKSPACE_DIRECTORY: &str = "trdelnik-tests"; + pub const TEST_DIRECTORY: &str = "tests"; + pub const TEST: &str = "test.rs"; + + pub const FUZZ_DIRECTORY: &str = "src/bin"; + pub const FUZZ: &str = "fuzz_target.rs"; + pub const PROGRAM_STUBS: &str = "program_stubs.rs"; + + //pub const PROGRAM_STUBS_ENTRIES: &str = "// ### \"Entrypoints go above\" ###"; + pub const HFUZZ_TARGET: &str = "hfuzz_target"; + pub const HFUZZ_WORKSPACE: &str = "hfuzz_workspace"; + + pub const GIT_IGNORE: &str = ".gitignore"; + + pub const CLIENT_TOML_TEMPLATE: &str = "/src/templates/program_client/Cargo.toml.tmpl"; +} From bdbb47255c294caec1f0100d4da2973b92b8dd39 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:24:28 +0100 Subject: [PATCH 10/57] =?UTF-8?q?=F0=9F=8E=A8=20new=20params=20from=20conf?= =?UTF-8?q?ig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/config.rs | 123 +++++++++++++++++++++++++++++++++--- 1 file changed, 114 insertions(+), 9 deletions(-) diff --git a/crates/client/src/config.rs b/crates/client/src/config.rs index d3712c18..4da9f837 100644 --- a/crates/client/src/config.rs +++ b/crates/client/src/config.rs @@ -4,9 +4,7 @@ use serde::Deserialize; use std::{env, fs, io, path::PathBuf}; use thiserror::Error; -pub const CARGO_TOML: &str = "Cargo.toml"; -pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; -pub const ANCHOR_TOML: &str = "Anchor.toml"; +use crate::constants::*; #[derive(Error, Debug)] pub enum Error { @@ -58,23 +56,60 @@ struct _Fuzz { #[serde(default)] /// Timeout in seconds (default: 10) /// -t + /// --timeout pub timeout: Option, #[serde(default)] /// Number of fuzzing iterations (default: 0 [no limit]) /// -N + /// --iterations pub iterations: Option, #[serde(default)] + /// Number of concurrent fuzzing threads (default: number of CPUs / 2) + /// -n + /// --threads + pub threads: Option, + #[serde(default)] /// Don't close children's stdin, stdout, stderr; can be noisy /// -Q + /// --keep_output pub keep_output: Option, #[serde(default)] /// Disable ANSI console; use simple log output /// -v + /// --verbose pub verbose: Option, #[serde(default)] /// Exit upon seeing the first crash (default: false) /// --exit_upon_crash pub exit_upon_crash: Option, + #[serde(default)] + /// Maximal number of mutations per one run (default: 6) + /// -r + /// --mutations_per_run + pub mutations_per_run: Option, + #[serde(default)] + /// Directory where crashes are saved to (default: workspace directory) + /// --crashdir + pub crashdir: Option, + #[serde(default)] + /// Input file extension (e.g. 'swf'), (default: 'fuzz') + /// -e + /// --extension + pub extension: Option, + #[serde(default)] + /// Number of seconds this fuzzing session will last (default: 0 [no limit]) + /// --run_time + pub run_time: Option, + #[serde(default)] + /// Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) + /// -F + /// --max_file_size + pub max_file_size: Option, + #[serde(default)] + /// Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) + /// -u + /// --save_all + pub save_all: Option, } impl Default for Fuzz { fn default() -> Self { @@ -82,6 +117,10 @@ impl Default for Fuzz { fuzz_args: vec![ FuzzArg::new("-t", "--timeout", &10.to_string()), FuzzArg::new("-N", "--iterations", &0.to_string()), + FuzzArg::new("-r", "--mutations_per_run", &6.to_string()), + FuzzArg::new("-e", "--extension", "fuzz"), + FuzzArg::new("", "--run_time", &0.to_string()), + FuzzArg::new("-F", "--max_file_size", &1_048_576.to_string()), ], } } @@ -102,6 +141,14 @@ impl From<_Fuzz> for Fuzz { .fuzz_args .push(FuzzArg::new("-N", "--iterations", &iterations.to_string())); + // threads + let threads = _f.threads.unwrap_or(0); + if threads > 0 { + _self + .fuzz_args + .push(FuzzArg::new("-n", "--threads", &threads.to_string())); + } + // keep_output let keep_output = _f.keep_output.unwrap_or(false); if keep_output { @@ -123,6 +170,45 @@ impl From<_Fuzz> for Fuzz { .fuzz_args .push(FuzzArg::new("", "--exit_upon_crash", "")); } + // mutations_per_run + let mutations_per_run = _f.mutations_per_run.unwrap_or(6); + _self.fuzz_args.push(FuzzArg::new( + "-r", + "--mutations_per_run", + &mutations_per_run.to_string(), + )); + // crashdir + let crash_dir = _f.crashdir.unwrap_or_default(); + if !crash_dir.is_empty() { + _self + .fuzz_args + .push(FuzzArg::new("", "--crashdir", &crash_dir)); + } + // extension + let extension = _f.extension.unwrap_or_default(); + if !extension.is_empty() { + _self + .fuzz_args + .push(FuzzArg::new("-e", "--extension", &extension)); + } + // run_time + let run_time = _f.run_time.unwrap_or(0); + _self + .fuzz_args + .push(FuzzArg::new("", "--run_time", &run_time.to_string())); + + // max_file_size + let max_file_size = _f.max_file_size.unwrap_or(1_048_576); + _self.fuzz_args.push(FuzzArg::new( + "-F", + "--max_file_size", + &max_file_size.to_string(), + )); + // save_all + let save_all = _f.save_all.unwrap_or(false); + if save_all { + _self.fuzz_args.push(FuzzArg::new("-u", "--save_all", "")); + } _self } } @@ -178,7 +264,7 @@ impl From<_Config> for Config { impl Config { pub fn new() -> Self { let root = Config::discover_root().expect("failed to find the root folder"); - let s = fs::read_to_string(root.join(TRDELNIK_TOML).as_path()) + let s = fs::read_to_string(root.join(TRDELNIK).as_path()) .expect("failed to read the Trdelnik config file"); let _config: _Config = toml::from_str(&s).expect("failed to parse the Trdelnik config file"); @@ -200,7 +286,7 @@ impl Config { })? .path(); if let Some(filename) = path.file_name() { - if filename.to_str() == Some(ANCHOR_TOML) { + if filename.to_str() == Some(TRDELNIK) { return Ok(PathBuf::from(cwd)); } } @@ -246,7 +332,10 @@ mod tests { }; let env_var_string = config.get_fuzz_args(String::default()); - assert_eq!(env_var_string, "-t 10 -N 0 "); + assert_eq!( + env_var_string, + "-t 10 -N 0 -r 6 -e fuzz --run_time 0 -F 1048576 " + ); } #[test] fn test_merge_and_precedence2() { @@ -257,7 +346,10 @@ mod tests { let env_var_string = config.get_fuzz_args("-t 0 -N10 --exit_upon_crash".to_string()); - assert_eq!(env_var_string, "-t 10 -N 0 -t 0 -N10 --exit_upon_crash"); + assert_eq!( + env_var_string, + "-t 10 -N 0 -r 6 -e fuzz --run_time 0 -F 1048576 -t 0 -N10 --exit_upon_crash" + ); } #[test] fn test_merge_and_precedence3() { @@ -269,7 +361,7 @@ mod tests { config.get_fuzz_args("-t 100 -N 5000 -Q -v --exit_upon_crash".to_string()); assert_eq!( env_var_string, - "-t 10 -N 0 -t 100 -N 5000 -Q -v --exit_upon_crash" + "-t 10 -N 0 -r 6 -e fuzz --run_time 0 -F 1048576 -t 100 -N 5000 -Q -v --exit_upon_crash" ); } #[test] @@ -282,7 +374,20 @@ mod tests { let env_var_string = config.get_fuzz_args("-t 10 -N 500 -Q -v --exit_upon_crash -n 15 --mutations_per_run 8 --verifier -W random_dir --crashdir random_dir5 --run_time 666".to_string()); assert_eq!( env_var_string, - "-t 10 -N 0 -t 10 -N 500 -Q -v --exit_upon_crash -n 15 --mutations_per_run 8 --verifier -W random_dir --crashdir random_dir5 --run_time 666" + "-t 10 -N 0 -r 6 -e fuzz --run_time 0 -F 1048576 -t 10 -N 500 -Q -v --exit_upon_crash -n 15 --mutations_per_run 8 --verifier -W random_dir --crashdir random_dir5 --run_time 666" + ); + } + #[test] + fn test_merge_and_precedence5() { + let config = Config { + test: Test::default(), + fuzz: Fuzz::default(), + }; + + let env_var_string = config.get_fuzz_args("-t 10 -N 500 -Q -v --exit_upon_crash -n 15 --verifier -W random_dir --crashdir random_dir5 --run_time 666".to_string()); + assert_eq!( + env_var_string, + "-t 10 -N 0 -r 6 -e fuzz --run_time 0 -F 1048576 -t 10 -N 500 -Q -v --exit_upon_crash -n 15 --verifier -W random_dir --crashdir random_dir5 --run_time 666" ); } } From 21731a4965ffa745757361c7f9cba16026a5ac24 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:25:13 +0100 Subject: [PATCH 11/57] =?UTF-8?q?=F0=9F=8E=A8=20no=20need=20for=20creating?= =?UTF-8?q?=20commander=20with=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/tester.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/client/src/tester.rs b/crates/client/src/tester.rs index 68cdd745..25b654fe 100644 --- a/crates/client/src/tester.rs +++ b/crates/client/src/tester.rs @@ -1,7 +1,7 @@ use crate::{commander::Error, Commander, LocalnetHandle}; use fehler::throws; use log::debug; -use std::{borrow::Cow, mem}; +use std::borrow::Cow; /// `Tester` is used primarily by [`#[trdelnik_test]`](trdelnik_test::trdelnik_test) macro. /// @@ -26,8 +26,7 @@ impl Tester { pub async fn before(&mut self) -> LocalnetHandle { debug!("_____________________"); debug!("____ BEFORE TEST ____"); - let commander = Commander::with_root(mem::take(&mut self.root)); - commander.start_localnet().await? + Commander::start_localnet(&self.root.to_string()).await? } #[throws] From 1845b86e8aa4f1e67b170e6b493c9dac9e30934a Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:25:30 +0100 Subject: [PATCH 12/57] =?UTF-8?q?=F0=9F=8E=A8=20added=20reference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/program_client_generator.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/client/src/program_client_generator.rs b/crates/client/src/program_client_generator.rs index a6b16b78..d087ae3f 100644 --- a/crates/client/src/program_client_generator.rs +++ b/crates/client/src/program_client_generator.rs @@ -6,11 +6,11 @@ use syn::{parse_quote, parse_str}; /// Disable regenerating the `use` statements with a used imports `use_modules` /// /// _Note_: See the crate's tests for output example. -pub fn generate_source_code(idl: Idl, use_modules: &[syn::ItemUse]) -> String { +pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { let mut output = "// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module\n".to_owned(); let code = idl .programs - .into_iter() + .iter() .map(|idl_program| { let program_name = idl_program.name.snake_case.replace('-', "_"); let instruction_module_name = format_ident!("{}_instruction", program_name); @@ -19,7 +19,7 @@ pub fn generate_source_code(idl: Idl, use_modules: &[syn::ItemUse]) -> String { let instructions = idl_program .instruction_account_pairs - .into_iter() + .iter() .fold( Vec::new(), |mut instructions, (idl_instruction, idl_account_group)| { @@ -30,7 +30,7 @@ pub fn generate_source_code(idl: Idl, use_modules: &[syn::ItemUse]) -> String { let account_struct_name: syn::Ident = parse_str(&idl_account_group.name.upper_camel_case).unwrap(); let instruction_name: syn::Ident = - parse_str(&(idl_instruction.name.snake_case + "_ix")).unwrap(); + parse_str(&(idl_instruction.name.snake_case.clone() + "_ix")).unwrap(); let parameters = idl_instruction .parameters From 1066e0f7d5c5375b05e801ce26d114d7d6dd3867 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:25:54 +0100 Subject: [PATCH 13/57] =?UTF-8?q?=F0=9F=8E=A8=20added=20path=20into=20idl?= =?UTF-8?q?=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/idl.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index 8d37c9d6..be547a92 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -96,8 +96,8 @@ use heck::{ToSnakeCase, ToUpperCamelCase}; use quote::ToTokens; +use std::path::{Path, PathBuf}; use thiserror::Error; - static ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; #[derive(Error, Debug)] @@ -123,6 +123,7 @@ pub struct IdlName { pub struct IdlProgram { pub name: IdlName, pub id: String, + pub path: PathBuf, pub instruction_account_pairs: Vec<(IdlInstruction, IdlAccountGroup)>, } @@ -138,7 +139,11 @@ pub struct IdlAccountGroup { pub accounts: Vec<(String, String)>, } -pub async fn parse_to_idl_program(name: String, code: &str) -> Result { +pub async fn parse_to_idl_program( + name: String, + code: &str, + path: &Path, +) -> Result { let mut static_program_id = None::; let mut mod_private = None::; let mut mod_instruction = None::; @@ -463,6 +468,7 @@ pub async fn parse_to_idl_program(name: String, code: &str) -> Result Date: Sun, 3 Dec 2023 21:26:18 +0100 Subject: [PATCH 14/57] =?UTF-8?q?=F0=9F=94=A5=20test=20generator=20renamed?= =?UTF-8?q?=20for=20workspace=20builder=20as=20I=20find=20this=20name=20be?= =?UTF-8?q?tter=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/test_generator.rs | 443 ---------------------------- 1 file changed, 443 deletions(-) delete mode 100644 crates/client/src/test_generator.rs diff --git a/crates/client/src/test_generator.rs b/crates/client/src/test_generator.rs deleted file mode 100644 index a34f1fe4..00000000 --- a/crates/client/src/test_generator.rs +++ /dev/null @@ -1,443 +0,0 @@ -use crate::{ - commander::{Commander, Error as CommanderError}, - config::{Config, CARGO_TOML, TRDELNIK_TOML}, -}; -use fehler::{throw, throws}; -use std::{ - env, - fs::OpenOptions, - io, - path::{Path, PathBuf}, -}; -use std::{fs::File, io::prelude::*}; -use thiserror::Error; -use tokio::fs; -use toml::{ - value::{Map, Table}, - Value, -}; - -pub(crate) const TESTS_WORKSPACE: &str = "trdelnik-tests"; -const TESTS_DIRECTORY: &str = "tests"; -const FUZZ_DIRECTORY: &str = "src/bin"; -const TESTS_FILE_NAME: &str = "test.rs"; -const FUZZ_TEST_FILE_NAME: &str = "fuzz_target.rs"; -pub(crate) const HFUZZ_TARGET: &str = "hfuzz_target"; - -#[derive(Error, Debug)] -pub enum Error { - #[error("cannot parse Cargo.toml")] - CannotParseCargoToml, - #[error("{0:?}")] - Io(#[from] io::Error), - #[error("{0:?}")] - Toml(#[from] toml::de::Error), - #[error("{0:?}")] - Commander(#[from] CommanderError), - #[error("Cannot find the Anchor.toml file to locate the root folder")] - BadWorkspace, - #[error("The Anchor project does not contain any programs")] - NoProgramsFound, -} - -pub struct TestGenerator; -impl Default for TestGenerator { - fn default() -> Self { - Self::new() - } -} -impl TestGenerator { - pub fn new() -> Self { - Self - } - - /// Builds all the programs and creates `.program_client` directory. Initializes the - /// `trdelnik-tests/tests` directory with all the necessary files. Adds the - /// `test.rs` file and generates `Cargo.toml` with `dependencies`. Updates root's `Cargo.toml` - /// workspace members. - /// - /// The crate is generated from `trdelnik-tests` template located in `client/src/templates`. - /// - /// Before you start writing trdelnik tests do not forget to add your program as a dependency - /// to the `trdelnik-tests/Cargo.toml`. For example: - /// - /// ```toml - /// # /trdelnik-tests/Cargo.toml - /// # ... - /// [dependencies] - /// my-program = { path = "../programs/my-program" } - /// # ... - /// ``` - /// - /// Then you can easily use it in tests: - /// - /// ```ignore - /// use my_program; - /// - /// // ... - /// - /// #[trdelnik_test] - /// async fn test() { - /// // ... - /// my_program::do_something(/*...*/); - /// // ... - /// } - /// ``` - /// - /// # Errors - /// - /// It fails when: - /// - there is not a root directory (no `Anchor.toml` file) - #[throws] - pub async fn generate(&self, skip_fuzzer: bool) { - let root = match Config::discover_root() { - Ok(root) => root, - Err(_) => throw!(Error::BadWorkspace), - }; - let root_path = root.to_str().unwrap().to_string(); - let commander = Commander::with_root(root_path); - commander.create_program_client_crate().await?; - self.generate_test_files(&root).await?; - self.update_workspace(&root).await?; - self.build_program_client(&commander).await?; - if !skip_fuzzer { - self.generate_fuzz_test_files(&root).await?; - self.update_gitignore(&root, "hfuzz_target")?; - } - } - - /// Builds and generates programs for `program_client` module - #[throws] - async fn build_program_client(&self, commander: &Commander) { - commander.build_programs().await?; - commander.generate_program_client_deps().await?; - commander.generate_program_client_lib_rs().await?; - } - - /// Creates the `trdelnik-tests` workspace with `tests` directory and empty `test.rs` file - /// finally it generates the `Cargo.toml` file. Crate is generated from `trdelnik-tests` - /// template located in `client/src/templates` - #[throws] - async fn generate_test_files(&self, root: &Path) { - let workspace_path = root.join(TESTS_WORKSPACE); - self.create_directory(&workspace_path, TESTS_WORKSPACE) - .await?; - - let tests_path = workspace_path.join(TESTS_DIRECTORY); - self.create_directory(&tests_path, TESTS_DIRECTORY).await?; - let test_path = tests_path.join(TESTS_FILE_NAME); - let test_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/test.rs" - )); - let program_libs = self.get_program_lib_names(root).await?; - let program_name = if let Some(name) = program_libs.first() { - name - } else { - throw!(Error::NoProgramsFound) - }; - let test_content = test_content.replace("###PROGRAM_NAME###", program_name); - let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); - let template = format!("{use_instructions}{test_content}"); - - self.create_file(&test_path, TESTS_FILE_NAME, &template) - .await?; - - let cargo_toml_path = workspace_path.join(CARGO_TOML); - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/Cargo.toml.tmpl" - )); - self.create_file(&cargo_toml_path, CARGO_TOML, cargo_toml_content) - .await?; - self.add_program_deps(root, &cargo_toml_path).await?; - - let trdelnik_toml_path = root.join(TRDELNIK_TOML); - let trdelnik_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/Trdelnik.toml.tmpl" - )); - self.create_file(&trdelnik_toml_path, TRDELNIK_TOML, trdelnik_toml_content) - .await?; - } - - /// Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file - #[throws] - async fn generate_fuzz_test_files(&self, root: &Path) { - let fuzzer_path = root.join(TESTS_WORKSPACE).join(FUZZ_DIRECTORY); - self.create_directory_all(&fuzzer_path, FUZZ_DIRECTORY) - .await?; - - let libs = self.get_program_lib_names(root).await?; - - let fuzzer_test_path = fuzzer_path.join(FUZZ_TEST_FILE_NAME); - let fuzz_test_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/fuzz_target.rs" - )) - .to_string(); - - let fuzz_test_content = if let Some(lib) = libs.first() { - let use_entry = format!("use {}::entry;\n", lib); - let use_instructions = format!("use program_client::{}_instruction::*;\n", lib); - let template = format!("{use_entry}{use_instructions}{fuzz_test_content}"); - template.replace("###PROGRAM_NAME###", lib) - } else { - throw!(Error::NoProgramsFound) - }; - - self.create_file(&fuzzer_test_path, FUZZ_TEST_FILE_NAME, &fuzz_test_content) - .await?; - - let workspace_path = root.join(TESTS_WORKSPACE); - let cargo_toml_path = workspace_path.join(CARGO_TOML); - self.add_feature_to_dep(root, &cargo_toml_path, "trdelnik-client", "fuzzing") - .await?; - } - - /// Creates a new file with a given content on the specified `path` and `name` - // todo: the function should be located in the different module, File module for example - async fn create_file<'a>( - &self, - path: &'a PathBuf, - name: &str, - content: &str, - ) -> Result<&'a PathBuf, Error> { - match path.exists() { - true => println!("Skipping creating the {name} file"), - false => { - println!("Creating the {name} file ..."); - fs::write(path, content).await?; - } - }; - Ok(path) - } - - /// Creates a new directory on the specified `path` and with the specified `name` - // todo: the function should be located in the different module, File module for example - async fn create_directory<'a>( - &self, - path: &'a PathBuf, - name: &str, - ) -> Result<&'a PathBuf, Error> { - match path.exists() { - true => println!("Skipping creating the {name} directory"), - false => { - println!("Creating the {name} directory ..."); - fs::create_dir(path).await?; - } - }; - Ok(path) - } - - /// Creates a new directory and all missing parent directories on the specified `path` and with the specified `name` - // todo: the function should be located in the different module, File module for example - async fn create_directory_all<'a>( - &self, - path: &'a PathBuf, - name: &str, - ) -> Result<&'a PathBuf, Error> { - match path.exists() { - true => println!("Skipping creating the {name} directory"), - false => { - println!("Creating the {name} directory ..."); - fs::create_dir_all(path).await?; - } - }; - Ok(path) - } - - /// Adds `trdelnik-tests` workspace to the `root`'s `Cargo.toml` workspace members if needed. - #[throws] - async fn update_workspace(&self, root: &PathBuf) { - let cargo = Path::new(&root).join(CARGO_TOML); - let mut content: Value = fs::read_to_string(&cargo).await?.parse()?; - let test_workspace_value = Value::String(String::from(TESTS_WORKSPACE)); - let members = content - .as_table_mut() - .ok_or(Error::CannotParseCargoToml)? - .entry("workspace") - .or_insert(Value::Table(Table::default())) - .as_table_mut() - .ok_or(Error::CannotParseCargoToml)? - .entry("members") - .or_insert(Value::Array(vec![test_workspace_value.clone()])) - .as_array_mut() - .ok_or(Error::CannotParseCargoToml)?; - match members.iter().find(|&x| x.eq(&test_workspace_value)) { - Some(_) => println!("Skipping updating project workspace"), - None => { - members.push(test_workspace_value); - println!("Project workspace successfully updated"); - } - }; - fs::write(cargo, content.to_string()).await?; - } - - /// Updates .gitignore file in the `root` directory and appends `ignored_path` to the end of the file - #[throws] - fn update_gitignore(&self, root: &Path, ignored_path: &str) { - let file_path = root.join(".gitignore"); - if file_path.exists() { - let file = File::open(&file_path)?; - for line in io::BufReader::new(file).lines().flatten() { - if line == ignored_path { - // do not add the ignored path again if it is already in the .gitignore file - return; - } - } - let file = OpenOptions::new().write(true).append(true).open(file_path); - - if let Ok(mut file) = file { - writeln!(file, "{}", ignored_path)?; - println!(".gitignore file sucessfully updated"); - } - } else { - println!("Skipping updating .gitignore file"); - } - } - - /// Adds programs to Cargo.toml as a dependencies to be able to be used in tests and fuzz targets - #[throws] - async fn add_program_deps(&self, root: &Path, cargo_toml_path: &Path) { - let programs = self.get_programs(root).await?; - if !programs.is_empty() { - println!("Adding programs to Cargo.toml ..."); - let mut content: Value = fs::read_to_string(cargo_toml_path).await?.parse()?; - let dev_deps = content - .get_mut("dependencies") - .and_then(Value::as_table_mut) - .ok_or(Error::CannotParseCargoToml)?; - for dep in programs { - if let Value::Table(table) = dep { - let (name, value) = table.into_iter().next().unwrap(); - dev_deps.entry(name).or_insert(value); - } - } - fs::write(cargo_toml_path, content.to_string()).await?; - } else { - println!("Skipping adding programs to Cargo.toml ..."); - } - } - - /// Adds programs to Cargo.toml as a dev dependencies to be able to be used in tests - #[throws] - async fn add_feature_to_dep( - &self, - root: &Path, - cargo_toml_path: &Path, - dependency: &str, - feature: &str, - ) { - let rel_path = cargo_toml_path - .strip_prefix(root) - .unwrap_or(Path::new("Cargo.toml")) - .to_string_lossy() - .to_string(); - println!("Adding feature {feature} to dependency {dependency} in {rel_path} ..."); - let mut content: Value = fs::read_to_string(cargo_toml_path).await?.parse()?; - let deps = content - .get_mut("dependencies") - .and_then(Value::as_table_mut) - .ok_or(Error::CannotParseCargoToml)?; - - let values = deps - .get_mut(dependency) - .and_then(|f| { - if f.is_table() { - f.as_table_mut() - } else if f.is_str() { - // if the value is only a string with version such as dependency = 0.0, create a new table with that version - let version = f.as_str().unwrap(); - let mut map = Map::new(); - let _ = map.insert("version".to_string(), Value::String(version.to_string())); - let t = Value::Table(map); - *f = t.to_owned(); - f.as_table_mut() - } else { - None - } - }) - .ok_or(Error::CannotParseCargoToml)?; - - let fuzzing = Value::String(feature.to_string()); - let value = Value::Array(vec![fuzzing.clone()]); - let features = values.entry("features").or_insert(value); - if let Some(features) = features.as_array_mut() { - if !features.iter().any(|f| *f == fuzzing) { - features.push(fuzzing); - }; - } - - fs::write(cargo_toml_path, content.to_string()).await?; - } - - /// Scans `programs` directory and returns a list of `toml::Value` programs and their paths. - async fn get_programs(&self, root: &Path) -> Result, Error> { - let programs = root.join("programs"); - if !programs.exists() { - println!("Programs folder does not exist."); - return Ok(Vec::new()); - } - println!("Searching for programs ..."); - let mut program_names: Vec = vec![]; - let programs = std::fs::read_dir(programs)?; - for program in programs { - let file = program?; - let file_name = file.file_name(); - if file.path().is_dir() { - let path = file.path().join(CARGO_TOML); - if path.exists() { - let name = file_name.to_str().unwrap(); - let dependency = self.get_program_dep(&path, name).await?; - program_names.push(dependency); - } - } - } - Ok(program_names) - } - - /// Scans `programs` directory and returns a list of names of libraries - async fn get_program_lib_names(&self, root: &Path) -> Result, Error> { - let programs = root.join("programs"); - if !programs.exists() { - println!("Programs folder does not exist."); - return Ok(Vec::new()); - } - println!("Searching for programs ..."); - let mut program_names: Vec = vec![]; - let programs = std::fs::read_dir(programs)?; - for program in programs { - let file = program?; - if file.path().is_dir() { - let path = file.path().join(CARGO_TOML); - if path.exists() { - let content: Value = fs::read_to_string(&path).await?.parse()?; - let name = content - .get("lib") - .and_then(Value::as_table) - .and_then(|table| table.get("name")) - .and_then(Value::as_str) - .ok_or(Error::CannotParseCargoToml)?; - program_names.push(name.to_string()); - } - } - } - Ok(program_names) - } - - /// Gets the program name from `/Cargo.toml` and returns a `toml::Value` program dependency. - #[throws] - async fn get_program_dep<'a>(&self, dir: &Path, dir_name: &'a str) -> Value { - let content: Value = fs::read_to_string(&dir).await?.parse()?; - let name = content - .get("package") - .and_then(Value::as_table) - .and_then(|table| table.get("name")) - .and_then(Value::as_str) - .ok_or(Error::CannotParseCargoToml)?; - format!("{name} = {{ path = \"../programs/{dir_name}\" }}") - .parse() - .unwrap() - } -} From ab09a5e657276a748d08e3c208e94ca001df40d7 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:27:28 +0100 Subject: [PATCH 15/57] =?UTF-8?q?=F0=9F=8E=A8=20removed=20stuff=20that=20s?= =?UTF-8?q?hould=20be=20inside=20workspace=20builder,=20logic=20from=20fuz?= =?UTF-8?q?z=20command=20moved=20here?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 659 +++++++++++++++++++++------------ 1 file changed, 429 insertions(+), 230 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index f9a2733d..d9b71374 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -1,8 +1,6 @@ use crate::config::Config; use crate::{ idl::{self, Idl}, - program_client_generator, - test_generator::TESTS_WORKSPACE, Client, }; use cargo_metadata::{MetadataCommand, Package}; @@ -10,10 +8,7 @@ use fehler::{throw, throws}; use futures::future::try_join_all; use log::debug; use solana_sdk::signer::keypair::Keypair; -use std::{ - borrow::Cow, io, iter, os::unix::process::CommandExt, path::Path, process::Stdio, - string::FromUtf8Error, -}; +use std::{io, os::unix::process::CommandExt, path::Path, process::Stdio, string::FromUtf8Error}; use thiserror::Error; use tokio::{ fs, @@ -22,7 +17,8 @@ use tokio::{ signal, }; -pub static PROGRAM_CLIENT_DIRECTORY: &str = ".program_client"; +// ----- +use crate::constants::*; #[derive(Error, Debug)] pub enum Error { @@ -98,38 +94,137 @@ impl LocalnetHandle { /// `Commander` allows you to start localnet, build programs, /// run tests and do other useful operations. -pub struct Commander { - root: Cow<'static, str>, -} +pub struct Commander {} impl Commander { - /// Creates a new `Commander` instance with the default root `"../../"`. - pub fn new() -> Self { - Self { - root: "../../".into(), + // TODO maybe remove unnecesarry async + #[throws] + pub async fn build_programs(arch: &str) { + let exit = std::process::Command::new("cargo") + .arg(arch) + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) + .output() + .unwrap(); + + if !exit.status.success() { + std::process::exit(exit.status.code().unwrap_or(1)); } } + /// Returns an [Iterator] of program [Package]s read from `Cargo.toml` files. + pub fn program_packages() -> impl Iterator { + let cargo_toml_data = MetadataCommand::new() + .no_deps() + .exec() + .expect("Cargo.toml reading failed"); - /// Creates a new `Commander` instance with the provided `root`. - pub fn with_root(root: impl Into>) -> Self { - Self { root: root.into() } + cargo_toml_data.packages.into_iter().filter(|package| { + // @TODO less error-prone test if the package is a _program_? + // This will only consider Packages where path: + // /home/xyz/xyz/trdelnik/trdelnik/examples/example_project/programs/package1 + // NOTE we can obtain more important information here, only to remember + if let Some("programs") = package.manifest_path.iter().nth_back(2) { + return true; + } + false + }) + } + #[throws] + pub async fn obtain_program_idl(root: &Path) -> Option { + let idl_programs = Commander::program_packages().map(|package| async move { + let absolute_root = fs::canonicalize(root).await?; + + let name = package.name; + let output = std::process::Command::new("cargo") + .arg("+nightly") + .arg("rustc") + .args(["--package", &name]) + .arg("--profile=check") + .arg("--") + .arg("-Zunpretty=expanded") + .output() + .unwrap(); + if output.status.success() { + let code = String::from_utf8(output.stdout)?; + let path = package + .manifest_path + .parent() + .unwrap() + .strip_prefix(&absolute_root) + .unwrap() + .as_std_path(); + Ok(idl::parse_to_idl_program(name, &code, path).await?) + } else { + let error_text = String::from_utf8(output.stderr)?; + Err(Error::ReadProgramCodeFailed(error_text)) + } + }); + Some(Idl { + programs: try_join_all(idl_programs).await?, + }) + } + #[throws] + pub async fn clean_anchor_target() { + Command::new("anchor").arg("clean").spawn()?.wait().await?; + } + #[throws] + pub async fn clean_hfuzz_target(root: &Path) { + let hfuzz_target_path = root.join(TESTS_WORKSPACE_DIRECTORY).join(HFUZZ_TARGET); + if hfuzz_target_path.exists() { + fs::remove_dir_all(hfuzz_target_path).await?; + } else { + println!( + "skipping {}/{} directory: not found", + TESTS_WORKSPACE_DIRECTORY, HFUZZ_TARGET + ) + } } - /// Builds programs (smart contracts). + /// Returns `use` modules / statements + /// The goal of this method is to find all `use` statements defined by the user in the `.program_client` + /// crate. It solves the problem with regenerating the program client and removing imports defined by + /// the user. + // TODO is this relevant when program_client should not be changed by user ? #[throws] - pub async fn build_programs(&self) { - let success = Command::new("cargo") - .arg("build-bpf") + pub async fn parse_program_client_imports() -> Option> { + let output = std::process::Command::new("cargo") + .arg("+nightly") + .arg("rustc") + .args(["--package", "program_client"]) + .arg("--profile=check") .arg("--") - // prevent prevent dependency loop: - // program tests -> program_client -> program - .args(["-Z", "avoid-dev-deps"]) - .spawn()? - .wait() - .await? - .success(); - if !success { - throw!(Error::BuildProgramsFailed); + .arg("-Zunpretty=expanded") + .output() + .unwrap(); + + if output.status.success() { + let code = String::from_utf8(output.stdout)?; + let mut use_modules: Vec = vec![]; + for item in syn::parse_file(code.as_str()).unwrap().items.into_iter() { + if let syn::Item::Mod(module) = item { + let modules = module + .content + .ok_or("account mod: empty content") + .unwrap() + .1 + .into_iter(); + for module in modules { + if let syn::Item::Use(u) = module { + use_modules.push(u); + } + } + } + } + if use_modules.is_empty() { + use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) + } + Some(use_modules) + } else { + let mut use_modules: Vec = vec![]; + if use_modules.is_empty() { + use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) + } + Some(use_modules) } } @@ -138,7 +233,7 @@ impl Commander { /// _Note_: The [--nocapture](https://doc.rust-lang.org/cargo/commands/cargo-test.html#display-options) argument is used /// to allow you read `println` outputs in your terminal window. #[throws] - pub async fn run_tests(&self) { + pub async fn run_tests() { let success = Command::new("cargo") .arg("test") .arg("--") @@ -151,15 +246,18 @@ impl Commander { throw!(Error::TestingFailed); } } + /// Runs fuzzer on the given target. #[throws] - pub async fn run_fuzzer(&self, target: String) { + pub async fn run_fuzzer(target: String, root: String) { + let root = Path::new(&root); + let config = Config::new(); let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); let fuzz_args = config.get_fuzz_args(hfuzz_run_args); - let cur_dir = Path::new(&self.root.to_string()).join(TESTS_WORKSPACE); + let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); if !cur_dir.try_exists()? { throw!(Error::NotInitialized); } @@ -185,11 +283,70 @@ impl Commander { }, } } + #[throws] + pub async fn run_fuzzer_with_exit_code(target: String, root: String) { + let root = Path::new(&root); + + // obtain config data + let config = Config::new(); + // obtain hfuzz_run_args + let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); + // obtain string from config and hfuzz_run_args + let fuzz_args = config.get_fuzz_args(hfuzz_run_args); + // Parse the fuzz_args arguments to find out if the crash folder and crash files extension was modified. + // This will give precedence to latter + let (crash_dir, ext) = get_crash_dir_and_ext(root, &target, &fuzz_args); + + if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { + if !crash_files.is_empty() { + println!("Error: The crash directory {} already contains crash files from previous runs. \n\nTo run Trdelnik fuzzer with exit code, you must either (backup and) remove the old crash files or alternatively change the crash folder using for example the --crashdir option and the HFUZZ_RUN_ARGS env variable such as:\nHFUZZ_RUN_ARGS=\"--crashdir ./new_crash_dir\"", crash_dir.to_string_lossy()); + std::process::exit(1); + } + } + + let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); + if !cur_dir.try_exists()? { + throw!(Error::NotInitialized); + } + + let mut child = Command::new("cargo") + .env("HFUZZ_RUN_ARGS", fuzz_args) + .current_dir(cur_dir) + .arg("hfuzz") + .arg("run") + .arg(target) + .spawn()?; + + tokio::select! { + res = child.wait() => + match res { + Ok(status) => if !status.success() { + println!("Honggfuzz exited with an error!"); + }, + Err(_) => throw!(Error::FuzzingFailed), + }, + _ = signal::ctrl_c() => { + tokio::time::sleep(tokio::time::Duration::from_millis(100)).await; + }, + } + + if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { + if !crash_files.is_empty() { + println!( + "The crash directory {} contains new fuzz test crashes. Exiting!", + crash_dir.to_string_lossy() + ); + std::process::exit(1); + } + } + } /// Runs fuzzer on the given target. #[throws] - pub async fn run_fuzzer_debug(&self, target: String, crash_file_path: String) { - let cur_dir = Path::new(&self.root.to_string()).join(TESTS_WORKSPACE); + pub async fn run_fuzzer_debug(target: String, crash_file_path: String, root: String) { + let root = Path::new(&root); + + let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); let crash_file = std::env::current_dir()?.join(crash_file_path); if !cur_dir.try_exists()? { @@ -213,147 +370,26 @@ impl Commander { eprintln!("cannot execute \"cargo hfuzz run-debug\" command"); } - /// Creates the `program_client` crate. - /// - /// It's used internally by the [`#[trdelnik_test]`](trdelnik_test::trdelnik_test) macro. - #[throws] - pub async fn create_program_client_crate(&self) { - let crate_path = Path::new(self.root.as_ref()).join(PROGRAM_CLIENT_DIRECTORY); - if fs::metadata(&crate_path).await.is_ok() { - return; - } - - // @TODO Would it be better to: - // zip the template folder -> embed the archive to the binary -> unzip to a given location? - - fs::create_dir(&crate_path).await?; - - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/program_client/Cargo.toml.tmpl" - )); - fs::write(crate_path.join("Cargo.toml"), &cargo_toml_content).await?; - - let src_path = crate_path.join("src"); - fs::create_dir(&src_path).await?; - - let lib_rs_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/program_client/lib.rs" - )); - fs::write(src_path.join("lib.rs"), &lib_rs_content).await?; - - debug!("program_client crate created") - } - - /// Returns an [Iterator] of program [Package]s read from `Cargo.toml` files. - pub fn program_packages(&self) -> impl Iterator { - let cargo_toml_data = MetadataCommand::new() - .no_deps() - .exec() - .expect("Cargo.toml reading failed"); - - cargo_toml_data.packages.into_iter().filter(|package| { - // @TODO less error-prone test if the package is a _program_? - if let Some("programs") = package.manifest_path.iter().nth_back(2) { - return true; - } - false - }) - } - - /// Updates the `program_client` dependencies. - /// - /// It's used internally by the [`#[trdelnik_test]`](trdelnik_test::trdelnik_test) macro. + /// Starts the localnet (Solana validator). #[throws] - pub async fn generate_program_client_deps(&self) { - let trdelnik_dep = r#"trdelnik-client = "0.5.0""#.parse().unwrap(); - // @TODO replace the line above with the specific version or commit hash - // when Trdelnik is released or when its repo is published. - // Or use both variants - path for Trdelnik repo/dev and version/commit for users. - // Some related snippets: - // - // println!("Trdelnik Version: {}", std::env!("VERGEN_BUILD_SEMVER")); - // println!("Trdelnik Commit: {}", std::env!("VERGEN_GIT_SHA")); - // https://docs.rs/vergen/latest/vergen/#environment-variables - // - // `trdelnik = "0.1.0"` - // `trdelnik = { git = "https://github.com/Ackee-Blockchain/trdelnik.git", rev = "cf867aea87e67d7be029982baa39767f426e404d" }` - - let absolute_root = fs::canonicalize(self.root.as_ref()).await?; - - let program_deps = self.program_packages().map(|package| { - let name = package.name; - let path = package - .manifest_path - .parent() - .unwrap() - .strip_prefix(&absolute_root) - .unwrap(); - format!(r#"{name} = {{ path = "../{path}", features = ["no-entrypoint"] }}"#) - .parse() - .unwrap() - }); - - let cargo_toml_path = Path::new(self.root.as_ref()) - .join(PROGRAM_CLIENT_DIRECTORY) - .join("Cargo.toml"); - - let mut cargo_toml_content: toml::Value = - fs::read_to_string(&cargo_toml_path).await?.parse()?; - - let cargo_toml_deps = cargo_toml_content - .get_mut("dependencies") - .and_then(toml::Value::as_table_mut) - .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; + pub async fn start_localnet(root: &String) -> LocalnetHandle { + let mut process = Command::new("solana-test-validator") + .arg("-C") + .arg([root, "config.yml"].concat()) + .arg("-r") + .arg("-q") + .spawn()?; - for dep in iter::once(trdelnik_dep).chain(program_deps) { - if let toml::Value::Table(table) = dep { - let (name, value) = table.into_iter().next().unwrap(); - cargo_toml_deps.entry(name).or_insert(value); - } + if !Client::new(Keypair::new()).is_localnet_running(true).await { + // The validator might not be running, but the process might be still alive (very slow start, some bug, ...), + // therefore we want to kill it if it's still running so ports aren't held. + process.kill().await.ok(); + throw!(Error::LocalnetIsNotRunning); + } + debug!("localnet started"); + LocalnetHandle { + solana_test_validator_process: process, } - - // @TODO remove renamed or deleted programs from deps? - - fs::write(cargo_toml_path, cargo_toml_content.to_string()).await?; - } - - /// Updates the `program_client` `lib.rs`. - /// - /// It's used internally by the [`#[trdelnik_test]`](trdelnik_test::trdelnik_test) macro. - #[throws] - pub async fn generate_program_client_lib_rs(&self) { - let idl_programs = self.program_packages().map(|package| async move { - let name = package.name; - let output = Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", &name]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - .await?; - if output.status.success() { - let code = String::from_utf8(output.stdout)?; - Ok(idl::parse_to_idl_program(name, &code).await?) - } else { - let error_text = String::from_utf8(output.stderr)?; - Err(Error::ReadProgramCodeFailed(error_text)) - } - }); - let idl = Idl { - programs: try_join_all(idl_programs).await?, - }; - let use_tokens = self.parse_program_client_imports().await?; - let program_client = program_client_generator::generate_source_code(idl, &use_tokens); - let program_client = Self::format_program_code(&program_client).await?; - - let rust_file_path = Path::new(self.root.as_ref()) - .join(PROGRAM_CLIENT_DIRECTORY) - .join("src/lib.rs"); - fs::write(rust_file_path, &program_client).await?; } /// Formats program code. @@ -371,71 +407,234 @@ impl Commander { let output = rustfmt.wait_with_output().await?; String::from_utf8(output.stdout)? } +} - /// Starts the localnet (Solana validator). - #[throws] - pub async fn start_localnet(&self) -> LocalnetHandle { - let mut process = Command::new("solana-test-validator") - .arg("-C") - .arg([&self.root, "config.yml"].concat()) - .arg("-r") - .arg("-q") - .spawn()?; +fn get_crash_dir_and_ext( + root: &Path, + target: &str, + hfuzz_run_args: &str, +) -> (std::path::PathBuf, String) { + // FIXME: we split by whitespace without respecting escaping or quotes - same approach as honggfuzz-rs so there is no point to fix it here before the upstream is fixed + let hfuzz_run_args = hfuzz_run_args.split_whitespace(); + + let extension = + get_cmd_option_value(hfuzz_run_args.clone(), "-e", "--ext").unwrap_or("fuzz".to_string()); + + let crash_dir = get_cmd_option_value(hfuzz_run_args.clone(), "", "--cr") + .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); + + let crash_path = if let Some(dir) = crash_dir { + Path::new(root).join(TESTS_WORKSPACE_DIRECTORY).join(dir) + } else { + Path::new(root) + .join(TESTS_WORKSPACE_DIRECTORY) + .join(HFUZZ_WORKSPACE) + .join(target) + }; + + (crash_path, extension) +} - if !Client::new(Keypair::new()).is_localnet_running(true).await { - // The validator might not be running, but the process might be still alive (very slow start, some bug, ...), - // therefore we want to kill it if it's still running so ports aren't held. - process.kill().await.ok(); - throw!(Error::LocalnetIsNotRunning); - } - debug!("localnet started"); - LocalnetHandle { - solana_test_validator_process: process, - } - } +fn get_crash_files( + dir: &std::path::PathBuf, + extension: &str, +) -> Result, Box> { + let paths = std::fs::read_dir(dir)? + // Filter out all those directory entries which couldn't be read + .filter_map(|res| res.ok()) + // Map the directory entries to paths + .map(|dir_entry| dir_entry.path()) + // Filter out all paths with extensions other than `extension` + .filter_map(|path| { + if path.extension().map_or(false, |ext| ext == extension) { + Some(path) + } else { + None + } + }) + .collect::>(); + Ok(paths) +} - /// Returns `use` modules / statements - /// The goal of this method is to find all `use` statements defined by the user in the `.program_client` - /// crate. It solves the problem with regenerating the program client and removing imports defined by - /// the user. - #[throws] - pub async fn parse_program_client_imports(&self) -> Vec { - let output = Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", "program_client"]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - .await?; - let code = String::from_utf8(output.stdout)?; - let mut use_modules: Vec = vec![]; - for item in syn::parse_file(code.as_str()).unwrap().items.into_iter() { - if let syn::Item::Mod(module) = item { - let modules = module - .content - .ok_or("account mod: empty content") - .unwrap() - .1 - .into_iter(); - for module in modules { - if let syn::Item::Use(u) = module { - use_modules.push(u); - } +fn get_cmd_option_value<'a>( + hfuzz_run_args: impl Iterator, + short_opt: &str, + long_opt: &str, +) -> Option { + let mut args_iter = hfuzz_run_args; + let mut value: Option = None; + + // ensure short option starts with one dash and long option with two dashes + let short_opt = format!("-{}", short_opt.trim_start_matches('-')); + let long_opt = format!("--{}", long_opt.trim_start_matches('-')); + + while let Some(arg) = args_iter.next() { + match arg.strip_prefix(&short_opt) { + Some(val) if short_opt.len() > 1 => { + if !val.is_empty() { + // -ecrash for crash extension with no space + value = Some(val.to_string()); + } else if let Some(next_arg) = args_iter.next() { + // -e crash for crash extension with space + value = Some(next_arg.to_string()); + } else { + value = None; + } + } + _ => { + if arg.starts_with(&long_opt) && long_opt.len() > 2 { + value = args_iter.next().map(|a| a.to_string()); } } } - if use_modules.is_empty() { - use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) - } - use_modules } + + value } -impl Default for Commander { - /// Creates a new `Commander` instance with the default root `"../../"`. - fn default() -> Self { - Self::new() +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn test_cmd_options_parsing() { + let mut command = String::from("-Q -v --extension fuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q --extension fuzz -v"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q -e fuzz -v"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q --extension fuzz -v --extension "); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, None); + + command = String::from("-Q --extension fuzz -v -e "); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, None); + + let mut command = String::from("--extension buzz -e fuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q -v -e fuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q -v -efuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q -v --ext fuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, Some("fuzz".to_string())); + + command = String::from("-Q -v --extfuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, None); + + command = String::from("-Q -v --workspace"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", "--ext"); + assert_eq!(extension, None); + + command = String::from("-Q -v -e"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "", "--ext"); + assert_eq!(extension, None); + + command = String::from("-Q -v --ext fuzz"); + let args = command.split_whitespace(); + + let extension = get_cmd_option_value(args, "-e", ""); + assert_eq!(extension, None); + } + + #[test] + fn test_get_crash_dir_and_ext() { + let root = Path::new("/home/fuzz"); + let target = "target"; + let default_crash_path = Path::new(root) + .join(TESTS_WORKSPACE_DIRECTORY) + .join(HFUZZ_WORKSPACE) + .join(target); + + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, ""); + + assert_eq!(crash_dir, default_crash_path); + assert_eq!(&ext, "fuzz"); + + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e"); + + assert_eq!(crash_dir, default_crash_path); + assert_eq!(&ext, "fuzz"); + + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e crash"); + + assert_eq!(crash_dir, default_crash_path); + assert_eq!(&ext, "crash"); + + // test absolute path + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W /home/crash -e crash"); + + let expected_crash_path = Path::new("/home/crash"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + + // test absolute path + let (crash_dir, ext) = + get_crash_dir_and_ext(root, target, "-Q --crash /home/crash -e crash"); + + let expected_crash_path = Path::new("/home/crash"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + + // test relative path + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W ../crash -e crash"); + + let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + + // test relative path + let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash ../crash -e crash"); + + let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + + // crash directory has precedence before workspace + let (crash_dir, ext) = + get_crash_dir_and_ext(root, target, "-Q --crash ../crash -W /workspace -e crash"); + + let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); } } From c9893f72b77e944e5d9c80c424e573e4449e9e24 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:28:58 +0100 Subject: [PATCH 16/57] =?UTF-8?q?=F0=9F=8E=A8=20workspace=20builder=20now?= =?UTF-8?q?=20correctly=20builds=20project=20first=20,=20then=20obtain=20d?= =?UTF-8?q?ata=20from=20the=20idl=20parse=20,=20those=20data=20are=20later?= =?UTF-8?q?=20used=20so=20no=20need=20to=20obtain=20them=20again,=20also?= =?UTF-8?q?=20moved=20here=20some=20logic=20from=20commander=20,=20and=20a?= =?UTF-8?q?lso=20removed=20some=20unneeded=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/workspace_builder.rs | 529 +++++++++++++++++++++++++ 1 file changed, 529 insertions(+) create mode 100644 crates/client/src/workspace_builder.rs diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs new file mode 100644 index 00000000..79245b32 --- /dev/null +++ b/crates/client/src/workspace_builder.rs @@ -0,0 +1,529 @@ +use crate::commander::{Commander, Error as CommanderError}; +use fehler::{throw, throws}; +use std::{ + env, + fs::OpenOptions, + io, + path::{Path, PathBuf}, +}; +use std::{fs::File, io::prelude::*}; +use syn::ItemUse; +use thiserror::Error; +use tokio::fs; +use toml::{ + value::{Map, Table}, + Value, +}; + +//---- +use crate::constants::*; +use crate::idl::Idl; +use crate::program_client_generator; + +#[derive(Error, Debug)] +pub enum Error { + #[error("cannot parse Cargo.toml")] + CannotParseCargoToml, + #[error("{0:?}")] + Io(#[from] io::Error), + #[error("{0:?}")] + Toml(#[from] toml::de::Error), + #[error("{0:?}")] + Commander(#[from] CommanderError), + #[error("The Anchor project does not contain any programs")] + NoProgramsFound, + #[error("parsing Cargo.toml dependencies failed")] + ParsingCargoTomlDependenciesFailed, +} + +pub struct WorkspaceBuilder { + root: PathBuf, + idl: Option, + use_tokens: Option>, +} +impl Default for WorkspaceBuilder { + fn default() -> Self { + Self::new_with_root("../../".to_string()) + } +} +impl WorkspaceBuilder { + pub fn new_with_root(root: String) -> Self { + Self { + root: Path::new(&root).to_path_buf(), + idl: None, + use_tokens: None, + } + } + #[throws] + pub async fn build(&mut self, arch: &str) { + self.build_and_parse(arch).await?; + + // automatically generated so we should be ok with updating this + self.update_program_client().await?; + //self.update_program_stubs().await?; + self.update_toml_dependencies().await?; + //self.add_invoked_program_deps().await?; + } + #[throws] + pub async fn clean(&self) { + Commander::clean_anchor_target().await?; + Commander::clean_hfuzz_target(&self.root).await?; + } + #[throws] + pub async fn initialize_without_fuzzer(&mut self, arch: &str) { + // build first + self.build_and_parse(arch).await?; + + self.create_program_client_crate().await?; + self.create_trdelnik_tests_crate().await?; + self.create_trdelnik_tests().await?; + + self.update_toml_dependencies().await?; + + self.create_trdelnik_manifest().await?; + self.update_workspace_cargo().await?; + } + #[throws] + pub async fn initialize_with_fuzzer(&mut self, arch: &str) { + // build first + self.build_and_parse(arch).await?; + + self.create_program_client_crate().await?; + self.create_trdelnik_tests_crate().await?; + self.create_trdelnik_tests().await?; + self.create_trdelnik_fuzz().await?; + + self.update_toml_dependencies().await?; + //self.add_invoked_program_deps().await?; + + self.create_trdelnik_manifest().await?; + self.update_workspace_cargo().await?; + self.update_gitignore("hfuzz_target")?; + } + #[throws] + async fn build_and_parse(&mut self, arch: &str) { + Commander::build_programs(arch).await?; + + println!("--> Obtaining data from programs ... <--"); + self.idl = Commander::obtain_program_idl(&self.root).await?; + self.use_tokens = Commander::parse_program_client_imports().await?; + println!("\x1b[92mSuccesfully\x1b[0m obtained."); + } + /// Creates .program_client folder, subfolders and files + #[throws] + async fn create_program_client_crate(&self) { + let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); + let cargo_path = crate_path.join(CARGO); + let src_path = crate_path.join(SRC); + let lib_path = src_path.join(LIB); + + self.create_directory_all(&src_path).await?; + + let cargo_toml_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/program_client/Cargo.toml.tmpl" + )); + self.create_file(&cargo_path, cargo_toml_content).await?; + + let program_client = program_client_generator::generate_source_code( + self.idl.as_ref().unwrap(), + self.use_tokens.as_ref().unwrap(), + ); + let program_client = Commander::format_program_code(&program_client).await?; + + self.create_file(&lib_path, &program_client).await?; + } + /// Creates trdelnik-tests crate + #[throws] + async fn create_trdelnik_tests_crate(&self) { + let workspace_path = self.root.join(TESTS_WORKSPACE_DIRECTORY); + let cargo_toml_path = workspace_path.join(CARGO); + + self.create_directory(&workspace_path).await?; + + let cargo_toml_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/trdelnik-tests/Cargo.toml.tmpl" + )); + self.create_file(&cargo_toml_path, cargo_toml_content) + .await?; + } + #[throws] + async fn create_trdelnik_tests(&self) { + let tests_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(TEST_DIRECTORY); + let test_path = tests_path.join(TEST); + + self.create_directory(&tests_path).await?; + + let test_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/trdelnik-tests/test.rs" + )); + + match &self.idl { + Some(idl) => { + let program_name = &idl.programs.first().unwrap().name.snake_case; + let test_content = test_content.replace("###PROGRAM_NAME###", program_name); + let use_instructions = + format!("use program_client::{}_instruction::*;\n", program_name); + let template = format!("{use_instructions}{test_content}"); + + self.create_file(&test_path, &template).await?; + } + None => { + throw!(Error::NoProgramsFound) + } + } + } + /// Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file + #[throws] + async fn create_trdelnik_fuzz(&self) { + let fuzzer_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(FUZZ_DIRECTORY); + //let program_stubs_path = fuzzer_path.join(PROGRAM_STUBS); + let fuzzer_test_path = fuzzer_path.join(FUZZ); + + self.create_directory_all(&fuzzer_path).await?; + + let fuzz_test_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/trdelnik-tests/fuzz_target.rs" + )) + .to_string(); + + // let program_stubs_content = include_str!(concat!( + // env!("CARGO_MANIFEST_DIR"), + // "/src/templates/trdelnik-tests/program_stubs.rs" + // )) + // .to_string(); + + match &self.idl { + Some(idl) => { + let fuzz_test_content = get_fuzz_test_content(idl, fuzz_test_content)?; + self.create_file(&fuzzer_test_path, &fuzz_test_content) + .await?; + + // let program_stubs_content = get_program_stubs_content(idl, program_stubs_content)?; + // self.create_file(&program_stubs_path, &program_stubs_content) + // .await?; + } + None => { + throw!(Error::NoProgramsFound) + } + } + + self.add_feature_to_dep("trdelnik-client", "fuzzing") + .await?; + } + + #[throws] + async fn create_trdelnik_manifest(&self) { + let trdelnik_toml_path = self.root.join(TRDELNIK); + let trdelnik_toml_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/Trdelnik.toml.tmpl" + )); + self.create_file(&trdelnik_toml_path, trdelnik_toml_content) + .await?; + } + /// Adds `trdelnik-tests` workspace to the `root`'s `Cargo.toml` workspace members if needed. + #[throws] + async fn update_program_client(&self) { + let lib_path = self.root.join(PROGRAM_CLIENT_DIRECTORY).join(SRC).join(LIB); + + let program_client = program_client_generator::generate_source_code( + self.idl.as_ref().unwrap(), + self.use_tokens.as_ref().unwrap(), + ); + let program_client = Commander::format_program_code(&program_client).await?; + + self.update_file(&lib_path, &program_client).await?; + } + #[throws] + async fn update_workspace_cargo(&self) { + let cargo = self.root.join(CARGO); + let mut content: Value = fs::read_to_string(&cargo).await?.parse()?; + let test_workspace_value = Value::String(String::from(TESTS_WORKSPACE_DIRECTORY)); + let members = content + .as_table_mut() + .ok_or(Error::CannotParseCargoToml)? + .entry("workspace") + .or_insert(Value::Table(Table::default())) + .as_table_mut() + .ok_or(Error::CannotParseCargoToml)? + .entry("members") + .or_insert(Value::Array(vec![test_workspace_value.clone()])) + .as_array_mut() + .ok_or(Error::CannotParseCargoToml)?; + match members.iter().find(|&x| x.eq(&test_workspace_value)) { + Some(_) => { + println!( + "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{CARGO}\x1b[0m, already contains trdelnik-tests." + ) + } + None => { + members.push(test_workspace_value); + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{CARGO}\x1b[0m."); + } + }; + fs::write(cargo, content.to_string()).await?; + } + /// Updates .gitignore file in the `root` directory and appends `ignored_path` to the end of the file + #[throws] + fn update_gitignore(&self, ignored_path: &str) { + let file_path = self.root.join(GIT_IGNORE); + if file_path.exists() { + let file = File::open(&file_path)?; + for line in io::BufReader::new(file).lines().flatten() { + if line == ignored_path { + // TODO do not add the ignored path again if it is already in the .gitignore file + return; + } + } + let file = OpenOptions::new().write(true).append(true).open(file_path); + + if let Ok(mut file) = file { + writeln!(file, "{}", ignored_path)?; + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{GIT_IGNORE}\x1b[0m."); + } + } else { + println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{GIT_IGNORE}\x1b[0m, not found.") + } + } + + /// Creates a new directory and all missing parent directories on the specified path + #[throws] + async fn create_directory_all<'a>(&self, path: &'a PathBuf) { + match path.exists() { + true => {} + false => { + fs::create_dir_all(path).await?; + } + }; + } + /// Creates directory with specified path + #[throws] + async fn create_directory<'a>(&self, path: &'a Path) { + match path.exists() { + true => {} + false => { + fs::create_dir(path).await?; + } + }; + } + /// Creates a new file with a given content on the specified path + /// Skip if file already exists + #[throws] + async fn create_file<'a>(&self, path: &'a Path, content: &str) { + let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); + + match path.exists() { + true => { + println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{file}\x1b[0m, already exists.") + } + false => { + fs::write(path, content).await?; + println!("\x1b[92mSuccesfully\x1b[0m created: \x1b[93m{file}\x1b[0m."); + } + }; + } + + /// Updates a file with a given content on the specified path + /// Skip if file does not exists + #[throws] + async fn update_file<'a>(&self, path: &'a Path, content: &str) { + let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); + match path.exists() { + true => { + fs::write(path, content).await?; + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{file}\x1b[0m."); + } + false => { + println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{file}\x1b[0m, does not exists."); + } + }; + } + + /// Adds programs to Cargo.toml as a dev dependencies to be able to be used in tests + #[throws] + async fn add_feature_to_dep(&self, dependency: &str, feature: &str) { + let cargo_toml_path = self.root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); + let rel_path = &cargo_toml_path + .strip_prefix(&self.root) + .unwrap() + .to_str() + .unwrap(); + let mut content: Value = fs::read_to_string(&cargo_toml_path).await?.parse()?; + let deps = content + .get_mut("dependencies") + .and_then(Value::as_table_mut) + .ok_or(Error::CannotParseCargoToml)?; + + let values = deps + .get_mut(dependency) + .and_then(|f| { + if f.is_table() { + f.as_table_mut() + } else if f.is_str() { + // if the value is only a string with version such as dependency = 0.0, create a new table with that version + let version = f.as_str().unwrap(); + let mut map = Map::new(); + let _ = map.insert("version".to_string(), Value::String(version.to_string())); + let t = Value::Table(map); + *f = t.to_owned(); + f.as_table_mut() + } else { + None + } + }) + .ok_or(Error::CannotParseCargoToml)?; + + let fuzzing = Value::String(feature.to_string()); + let value = Value::Array(vec![]); + let features = values.entry("features").or_insert(value); + if let Some(features) = features.as_array_mut() { + if !features.iter().any(|f| *f == fuzzing) { + features.push(fuzzing); + fs::write(&cargo_toml_path, content.to_string()).await?; + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{rel_path}\x1b[0m {feature} feature added."); + } else { + println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{rel_path}\x1b[0m, already contains {feature} feature.") + } + } + } + + #[throws] + async fn update_toml_dependencies(&self) { + let client_deps = self.root.join(PROGRAM_CLIENT_DIRECTORY).join("Cargo.toml"); + let test_deps = self + .root + .join(crate::constants::TESTS_WORKSPACE_DIRECTORY) + .join("Cargo.toml"); + + let mut client_toml_content: toml::Value = + fs::read_to_string(&client_deps).await?.parse()?; + let mut test_toml_content: toml::Value = fs::read_to_string(&test_deps).await?.parse()?; + + let client_toml_deps = client_toml_content + .get_mut("dependencies") + .and_then(toml::Value::as_table_mut) + .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; + + let test_toml_deps = test_toml_content + .get_mut("dependencies") + .and_then(toml::Value::as_table_mut) + .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; + + match &self.idl { + Some(idl) => { + // TODO Cannot be simplified ? + for program in idl.programs.iter() { + let dep_client: Value = format!( + r#"{} = {{ path = "../{}", features = ["no-entrypoint"] }}"#, + program.name.snake_case, + program.path.to_str().unwrap() + ) + .parse() + .unwrap(); + let dep_test: Value = format!( + r#"{} = {{ path = "../{}" }}"#, + program.name.snake_case, + program.path.to_str().unwrap() + ) + .parse() + .unwrap(); + + if let toml::Value::Table(table) = dep_client { + let (name, value) = table.into_iter().next().unwrap(); + client_toml_deps.entry(name).or_insert(value.clone()); + } + if let toml::Value::Table(table) = dep_test { + let (name, value) = table.into_iter().next().unwrap(); + test_toml_deps.entry(name).or_insert(value.clone()); + } + } + fs::write(client_deps, client_toml_content.to_string()).await?; + fs::write(test_deps, test_toml_content.to_string()).await?; + } + None => { + throw!(Error::NoProgramsFound) + } + } + } + + // Adds programs to Cargo.toml as a dependencies to be able to be used in tests and fuzz targets + // TODO may be used with program stubs + // #[throws] + // async fn add_invoked_program_deps(&self) { + // let cargo_toml_path = self.root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); + + // match &self.idl { + // Some(idl) => { + // let mut content: Value = fs::read_to_string(&cargo_toml_path).await?.parse()?; + // let deps: &mut Map = content + // .get_mut("dependencies") + // .and_then(Value::as_table_mut) + // .ok_or(Error::CannotParseCargoToml)?; + + // for program in idl.programs.iter() { + // for x in program.program_invocations.iter() { + // if PROCESS_INSTRUCTIONS.contains_key(x.as_str()) { + // let name = PROCESS_INSTRUCTIONS.get(x.as_str()).unwrap().2; + // let version = PROCESS_INSTRUCTIONS.get(x.as_str()).unwrap().3; + // let version = Value::String(version.to_string()); + // deps.entry(name).or_insert(version); + // } + // } + // } + // fs::write(cargo_toml_path, content.to_string()).await?; + // } + // None => { + // throw!(Error::NoProgramsFound) + // } + // } + // } + // pub fn new() -> Self { + // Self + // } + + // TODO may be used with program stubs + // #[throws] + // async fn update_program_stubs(&self) { + // let program_stubs_path = self + // .root + // .join(TESTS_WORKSPACE_DIRECTORY) + // .join(FUZZ_DIRECTORY) + // .join(PROGRAM_STUBS); + + // let program_stubs_content = include_str!(concat!( + // env!("CARGO_MANIFEST_DIR"), + // "/src/templates/trdelnik-tests/program_stubs.rs" + // )) + // .to_string(); + + // match &self.idl { + // Some(idl) => { + // let program_stubs_content = get_program_stubs_content(idl, program_stubs_content)?; + // self.update_file(&program_stubs_path, &program_stubs_content) + // .await?; + // } + // None => { + // throw!(Error::NoProgramsFound) + // } + // } + // } +} + +#[throws] +fn get_fuzz_test_content(idl: &Idl, content: String) -> String { + let name = &idl.programs.first().unwrap().name.snake_case; + let use_entry = format!("use {}::entry;\n", name); + let use_instructions = format!("use program_client::{}_instruction::*;\n", name); + let template = format!("{use_entry}{use_instructions}{content}"); + template.replace("###PROGRAM_NAME###", name) +} From 1d62d1a4eaabcdeb1d73b370f5672227503ab0de Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:29:32 +0100 Subject: [PATCH 17/57] =?UTF-8?q?=F0=9F=8E=A8=20changes=20to=20tests=20bas?= =?UTF-8?q?ed=20on=20updated=20implementations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/tests/test.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/crates/client/tests/test.rs b/crates/client/tests/test.rs index dff0ffe8..0e9c4fcf 100644 --- a/crates/client/tests/test.rs +++ b/crates/client/tests/test.rs @@ -20,9 +20,14 @@ pub async fn generate_program_client() { "/tests/test_data/expected_client_code.rs" )); - let program_idl = - trdelnik_client::idl::parse_to_idl_program("escrow".to_owned(), expanded_anchor_program) - .await?; + let root = std::path::Path::new("."); + + let program_idl = trdelnik_client::idl::parse_to_idl_program( + "escrow".to_owned(), + expanded_anchor_program, + root, + ) + .await?; let idl = trdelnik_client::idl::Idl { programs: vec![program_idl], @@ -30,7 +35,7 @@ pub async fn generate_program_client() { let use_modules: Vec = vec![syn::parse_quote! { use trdelnik_client::*; }]; let client_code = - trdelnik_client::program_client_generator::generate_source_code(idl, &use_modules); + trdelnik_client::program_client_generator::generate_source_code(&idl, &use_modules); let client_code = trdelnik_client::Commander::format_program_code(&client_code).await?; assert_str_eq!(client_code, expected_client_code); From 20630743098608bca77655455bd2ea7e4e01e655 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:30:04 +0100 Subject: [PATCH 18/57] =?UTF-8?q?=F0=9F=8E=A8=20trdelnik=20toml=20template?= =?UTF-8?q?=20with=20params=20supported=20within=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/templates/Trdelnik.toml.tmpl | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/crates/client/src/templates/Trdelnik.toml.tmpl b/crates/client/src/templates/Trdelnik.toml.tmpl index 023cf8a3..e6803594 100644 --- a/crates/client/src/templates/Trdelnik.toml.tmpl +++ b/crates/client/src/templates/Trdelnik.toml.tmpl @@ -2,10 +2,29 @@ validator_startup_timeout = 15000 -# set for default values +# contains default values [fuzz] +# Timeout in seconds (default: 10) timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) iterations = 0 +# 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) keep_output = false +# Disable ANSI console; use simple log output (default: false) verbose = false +# Exit upon seeing the first crash (default: false) exit_upon_crash = false +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false From d54dbf33ff741e32c6ce6590aa9cf50f9333907e Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:31:55 +0100 Subject: [PATCH 19/57] =?UTF-8?q?=F0=9F=8E=A8=20version=20of=20trdelnik=20?= =?UTF-8?q?hardcoded=20into=20template=20,=20probably=20not=20the=20greate?= =?UTF-8?q?st=20solution=20,=20however=20this=20version=20was?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/templates/trdelnik-tests/Cargo.toml.tmpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl index b43499cb..6a8bb99c 100644 --- a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl +++ b/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl @@ -5,9 +5,13 @@ description = "Created with Trdelnik" edition = "2021" [dependencies] -trdelnik-client = "0.5.0" assert_matches = "1.4.0" -program_client = { path = "../.program_client" } + +[dependencies.trdelnik-client] +version = "0.5.0" + +[dependencies.program_client] +path = "../.program_client" [dev-dependencies] fehler = "1.0.0" From 9873ced3056e23e4207d0088f6d4ca4fa5b022ff Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:32:38 +0100 Subject: [PATCH 20/57] =?UTF-8?q?=F0=9F=8E=A8=20trdelnik=20version=20also?= =?UTF-8?q?=20hardcoded=20into=20template=20for=20program=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/templates/program_client/Cargo.toml.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/client/src/templates/program_client/Cargo.toml.tmpl b/crates/client/src/templates/program_client/Cargo.toml.tmpl index 13dc1b86..7653cfc7 100644 --- a/crates/client/src/templates/program_client/Cargo.toml.tmpl +++ b/crates/client/src/templates/program_client/Cargo.toml.tmpl @@ -4,3 +4,4 @@ version = "0.1.0" edition = "2018" [dependencies] +trdelnik-client = "0.5.0" From 0b4267d7a02b567113b4ab0cdd7775f453d86dcb Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:33:28 +0100 Subject: [PATCH 21/57] =?UTF-8?q?=F0=9F=8E=A8=20escrow=20lib=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/escrow/.program_client/src/lib.rs | 94 +++++++++++----------- examples/escrow/Cargo.lock | 37 +++++++++ examples/escrow/trdelnik-tests/Cargo.toml | 14 ++-- 3 files changed, 92 insertions(+), 53 deletions(-) diff --git a/examples/escrow/.program_client/src/lib.rs b/examples/escrow/.program_client/src/lib.rs index 8724e038..741b0b16 100644 --- a/examples/escrow/.program_client/src/lib.rs +++ b/examples/escrow/.program_client/src/lib.rs @@ -1,4 +1,4 @@ -// DO NOT EDIT - automatically generated file +// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { use trdelnik_client::*; pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ @@ -10,15 +10,15 @@ pub mod escrow_instruction { client: &Client, i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_initializer: Pubkey, + a_initializer_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_escrow_account: Pubkey, + a_system_program: Pubkey, + a_token_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, escrow::instruction::InitializeEscrow { @@ -35,17 +35,17 @@ pub mod escrow_instruction { }, signers, ) - .await?) + .await } pub fn initialize_escrow_ix( i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_initializer: Pubkey, + a_initializer_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_escrow_account: Pubkey, + a_system_program: Pubkey, + a_token_program: Pubkey, ) -> Instruction { Instruction { program_id: PROGRAM_ID, @@ -67,14 +67,14 @@ pub mod escrow_instruction { } pub async fn cancel_escrow( client: &Client, - a_initializer: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_initializer: Pubkey, + a_pda_deposit_token_account: Pubkey, + a_pda_account: Pubkey, + a_escrow_account: Pubkey, + a_token_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, escrow::instruction::CancelEscrow {}, @@ -87,14 +87,14 @@ pub mod escrow_instruction { }, signers, ) - .await?) + .await } pub fn cancel_escrow_ix( - a_initializer: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_initializer: Pubkey, + a_pda_deposit_token_account: Pubkey, + a_pda_account: Pubkey, + a_escrow_account: Pubkey, + a_token_program: Pubkey, ) -> Instruction { Instruction { program_id: PROGRAM_ID, @@ -111,18 +111,18 @@ pub mod escrow_instruction { } pub async fn exchange( client: &Client, - a_taker: anchor_lang::solana_program::pubkey::Pubkey, - a_taker_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_taker_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_main_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_account: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_taker: Pubkey, + a_taker_deposit_token_account: Pubkey, + a_taker_receive_token_account: Pubkey, + a_pda_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_initializer_main_account: Pubkey, + a_escrow_account: Pubkey, + a_pda_account: Pubkey, + a_token_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, escrow::instruction::Exchange {}, @@ -139,18 +139,18 @@ pub mod escrow_instruction { }, signers, ) - .await?) + .await } pub fn exchange_ix( - a_taker: anchor_lang::solana_program::pubkey::Pubkey, - a_taker_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_taker_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - a_initializer_main_account: anchor_lang::solana_program::pubkey::Pubkey, - a_escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - a_pda_account: anchor_lang::solana_program::pubkey::Pubkey, - a_token_program: anchor_lang::solana_program::pubkey::Pubkey, + a_taker: Pubkey, + a_taker_deposit_token_account: Pubkey, + a_taker_receive_token_account: Pubkey, + a_pda_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_initializer_main_account: Pubkey, + a_escrow_account: Pubkey, + a_pda_account: Pubkey, + a_token_program: Pubkey, ) -> Instruction { Instruction { program_id: PROGRAM_ID, diff --git a/examples/escrow/Cargo.lock b/examples/escrow/Cargo.lock index 32384a9b..eaf5be28 100644 --- a/examples/escrow/Cargo.lock +++ b/examples/escrow/Cargo.lock @@ -1305,6 +1305,15 @@ dependencies = [ "subtle", ] +[[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" @@ -1315,6 +1324,18 @@ 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" @@ -2460,6 +2481,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[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.5.1" @@ -3386,6 +3413,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -4824,6 +4860,7 @@ dependencies = [ "serde", "serde_json", "serial_test", + "shellexpand", "solana-account-decoder", "solana-cli-output", "solana-sdk", diff --git a/examples/escrow/trdelnik-tests/Cargo.toml b/examples/escrow/trdelnik-tests/Cargo.toml index 0c3a7e5a..437ada3a 100644 --- a/examples/escrow/trdelnik-tests/Cargo.toml +++ b/examples/escrow/trdelnik-tests/Cargo.toml @@ -4,16 +4,18 @@ version = "0.1.0" description = "Created with Trdelnik" edition = "2021" -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" +[dependencies] anchor-spl = "0.28.0" -[dev-dependencies.trdelnik-client] +[dependencies.trdelnik-client] path = "../../../crates/client" -[dev-dependencies.program_client] +[dependencies.program_client] path = "../.program_client" -[dev-dependencies.escrow] +[dependencies.escrow] path = "../programs/escrow" + +[dev-dependencies] +fehler = "1.0.0" +rstest = "0.12.0" From 942e061f63d0c9b4200eddd0f61d73f530245fbe Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:34:20 +0100 Subject: [PATCH 22/57] =?UTF-8?q?=F0=9F=8E=A8=20also=20updated=20lib=20for?= =?UTF-8?q?=20fuzzer=20and=20new=20trdelnik=20toml=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/fuzzer/.program_client/Cargo.toml | 2 -- examples/fuzzer/.program_client/src/lib.rs | 28 ++++++++-------- examples/fuzzer/Cargo.lock | 37 ++++++++++++++++++++++ examples/fuzzer/Trdelnik.toml | 25 +++++++++++++-- 4 files changed, 74 insertions(+), 18 deletions(-) diff --git a/examples/fuzzer/.program_client/Cargo.toml b/examples/fuzzer/.program_client/Cargo.toml index c7a64bb8..f8ae750e 100644 --- a/examples/fuzzer/.program_client/Cargo.toml +++ b/examples/fuzzer/.program_client/Cargo.toml @@ -2,11 +2,9 @@ name = "program_client" version = "0.1.0" edition = "2018" - [dependencies.trdelnik-client] path = "../../../crates/client" - [dependencies.fuzzer] path = "../programs/fuzzer" features = ["no-entrypoint"] diff --git a/examples/fuzzer/.program_client/src/lib.rs b/examples/fuzzer/.program_client/src/lib.rs index 91d181dc..3c870404 100644 --- a/examples/fuzzer/.program_client/src/lib.rs +++ b/examples/fuzzer/.program_client/src/lib.rs @@ -8,12 +8,12 @@ pub mod fuzzer_instruction { ]); pub async fn initialize( client: &Client, - a_counter: anchor_lang::solana_program::pubkey::Pubkey, - a_user: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, + a_counter: Pubkey, + a_user: Pubkey, + a_system_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, fuzzer::instruction::Initialize {}, @@ -24,12 +24,12 @@ pub mod fuzzer_instruction { }, signers, ) - .await?) + .await } pub fn initialize_ix( - a_counter: anchor_lang::solana_program::pubkey::Pubkey, - a_user: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, + a_counter: Pubkey, + a_user: Pubkey, + a_system_program: Pubkey, ) -> Instruction { Instruction { program_id: PROGRAM_ID, @@ -46,11 +46,11 @@ pub mod fuzzer_instruction { client: &Client, i_input1: u8, i_input2: u8, - a_counter: anchor_lang::solana_program::pubkey::Pubkey, - a_authority: anchor_lang::solana_program::pubkey::Pubkey, + a_counter: Pubkey, + a_authority: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, fuzzer::instruction::Update { @@ -63,13 +63,13 @@ pub mod fuzzer_instruction { }, signers, ) - .await?) + .await } pub fn update_ix( i_input1: u8, i_input2: u8, - a_counter: anchor_lang::solana_program::pubkey::Pubkey, - a_authority: anchor_lang::solana_program::pubkey::Pubkey, + a_counter: Pubkey, + a_authority: Pubkey, ) -> Instruction { Instruction { program_id: PROGRAM_ID, diff --git a/examples/fuzzer/Cargo.lock b/examples/fuzzer/Cargo.lock index 4cb34ca8..cde39b7a 100644 --- a/examples/fuzzer/Cargo.lock +++ b/examples/fuzzer/Cargo.lock @@ -1368,6 +1368,15 @@ 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" @@ -1378,6 +1387,18 @@ 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" @@ -2649,6 +2670,12 @@ 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.5.1" @@ -3661,6 +3688,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5507,6 +5543,7 @@ dependencies = [ "serde", "serde_json", "serial_test", + "shellexpand", "solana-account-decoder", "solana-cli-output", "solana-program-test", diff --git a/examples/fuzzer/Trdelnik.toml b/examples/fuzzer/Trdelnik.toml index 357052e9..46021fae 100644 --- a/examples/fuzzer/Trdelnik.toml +++ b/examples/fuzzer/Trdelnik.toml @@ -1,9 +1,30 @@ [test] validator_startup_timeout = 15000 + +# contains default values [fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) iterations = 500 -timeout = 25 +# 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) keep_output = false +# Disable ANSI console; use simple log output (default: false) verbose = false -exit_upon_crash = true +# Exit upon seeing the first crash (default: false) +exit_upon_crash = false +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false From b2ed6e36f4644d2ccaa182bf4115250e1b43e196 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:35:00 +0100 Subject: [PATCH 23/57] =?UTF-8?q?=F0=9F=8E=A8=20updated=20lib=20for=20turn?= =?UTF-8?q?stile=20and=20also=20cargo=20in=20order=20to=20have=20them=20al?= =?UTF-8?q?l=20the=20same?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/turnstile/.program_client/src/lib.rs | 35 ++++++++----------- examples/turnstile/trdelnik-tests/Cargo.toml | 15 ++++---- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/examples/turnstile/.program_client/src/lib.rs b/examples/turnstile/.program_client/src/lib.rs index a945c54c..abbc63d1 100644 --- a/examples/turnstile/.program_client/src/lib.rs +++ b/examples/turnstile/.program_client/src/lib.rs @@ -8,12 +8,12 @@ pub mod turnstile_instruction { ]); pub async fn initialize( client: &Client, - a_state: anchor_lang::solana_program::pubkey::Pubkey, - a_user: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, + a_state: Pubkey, + a_user: Pubkey, + a_system_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, turnstile::instruction::Initialize {}, @@ -24,13 +24,9 @@ pub mod turnstile_instruction { }, signers, ) - .await?) + .await } - pub fn initialize_ix( - a_state: anchor_lang::solana_program::pubkey::Pubkey, - a_user: anchor_lang::solana_program::pubkey::Pubkey, - a_system_program: anchor_lang::solana_program::pubkey::Pubkey, - ) -> Instruction { + pub fn initialize_ix(a_state: Pubkey, a_user: Pubkey, a_system_program: Pubkey) -> Instruction { Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Initialize {}.data(), @@ -45,10 +41,10 @@ pub mod turnstile_instruction { pub async fn coin( client: &Client, i_dummy_arg: String, - a_state: anchor_lang::solana_program::pubkey::Pubkey, + a_state: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, turnstile::instruction::Coin { @@ -57,12 +53,9 @@ pub mod turnstile_instruction { turnstile::accounts::UpdateState { state: a_state }, signers, ) - .await?) + .await } - pub fn coin_ix( - i_dummy_arg: String, - a_state: anchor_lang::solana_program::pubkey::Pubkey, - ) -> Instruction { + pub fn coin_ix(i_dummy_arg: String, a_state: Pubkey) -> Instruction { Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Coin { @@ -74,19 +67,19 @@ pub mod turnstile_instruction { } pub async fn push( client: &Client, - a_state: anchor_lang::solana_program::pubkey::Pubkey, + a_state: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { - Ok(client + client .send_instruction( PROGRAM_ID, turnstile::instruction::Push {}, turnstile::accounts::UpdateState { state: a_state }, signers, ) - .await?) + .await } - pub fn push_ix(a_state: anchor_lang::solana_program::pubkey::Pubkey) -> Instruction { + pub fn push_ix(a_state: Pubkey) -> Instruction { Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Push {}.data(), diff --git a/examples/turnstile/trdelnik-tests/Cargo.toml b/examples/turnstile/trdelnik-tests/Cargo.toml index b5a67f86..5a4dd9df 100644 --- a/examples/turnstile/trdelnik-tests/Cargo.toml +++ b/examples/turnstile/trdelnik-tests/Cargo.toml @@ -3,16 +3,15 @@ name = "trdelnik-tests" version = "0.1.0" description = "Created with Trdelnik" edition = "2021" - -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" - -[dev-dependencies.trdelnik-client] +[dependencies.trdelnik-client] path = "../../../crates/client" -[dev-dependencies.program_client] +[dependencies.program_client] path = "../.program_client" -[dev-dependencies.turnstile] +[dependencies.turnstile] path = "../programs/turnstile" + +[dev-dependencies] +fehler = "1.0.0" +rstest = "0.12.0" From ef9cd6c91c2cafb8f7346ff66f852df5f9c0a9aa Mon Sep 17 00:00:00 2001 From: lukacan Date: Sun, 3 Dec 2023 21:35:38 +0100 Subject: [PATCH 24/57] =?UTF-8?q?=F0=9F=8E=A8=20forgotten=20cargo=20locks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 37 +++++++++++ examples/turnstile/Cargo.lock | 113 ++++++++++++++++++++++++++++++++-- 2 files changed, 145 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c409b2bf..7fe6a0ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1470,6 +1470,15 @@ 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" @@ -1480,6 +1489,18 @@ 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" @@ -2781,6 +2802,12 @@ 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.5.1" @@ -3834,6 +3861,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5709,6 +5745,7 @@ dependencies = [ "serde", "serde_json", "serial_test", + "shellexpand", "solana-account-decoder", "solana-cli-output", "solana-program-test", diff --git a/examples/turnstile/Cargo.lock b/examples/turnstile/Cargo.lock index d40fe16d..ef09f6c3 100644 --- a/examples/turnstile/Cargo.lock +++ b/examples/turnstile/Cargo.lock @@ -1327,6 +1327,15 @@ dependencies = [ "subtle", ] +[[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" @@ -1337,6 +1346,18 @@ 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" @@ -2478,6 +2499,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[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.4.1" @@ -3392,6 +3419,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -4800,6 +4836,7 @@ dependencies = [ "serde", "serde_json", "serial_test", + "shellexpand", "solana-account-decoder", "solana-cli-output", "solana-sdk", @@ -5163,12 +5200,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] @@ -5178,7 +5215,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -5187,21 +5233,42 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -5214,6 +5281,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -5226,6 +5299,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -5238,6 +5317,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -5250,12 +5335,24 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -5268,6 +5365,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "winreg" version = "0.10.1" From f42dba6ab05854c358f8db22487f93e863c050de Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 13 Dec 2023 17:52:32 +0100 Subject: [PATCH 25/57] =?UTF-8?q?=F0=9F=8E=A8=20bin=20target=20inside=20ca?= =?UTF-8?q?rgo=20toml=20+=20multiple=20targets=20so=20we=20can=20switch=20?= =?UTF-8?q?between=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 30 +++++++++++++++---- crates/client/src/lib.rs | 2 +- .../templates/program_client/Cargo.toml.tmpl | 2 +- .../templates/trdelnik-tests/Cargo.toml.tmpl | 8 +++++ crates/client/src/workspace_builder.rs | 1 - 5 files changed, 34 insertions(+), 9 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index d9b71374..e7654d75 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -251,23 +251,41 @@ impl Commander { #[throws] pub async fn run_fuzzer(target: String, root: String) { let root = Path::new(&root); + let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY).join(&target); + let cargo_toml = root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); + + if !cur_dir.try_exists()? { + throw!(Error::NotInitialized); + } + + let command = format!("s|fuzz_[0-9]*/fuzz_target\\.rs|{}/fuzz_target.rs|", target); + let _status = Command::new("sed") + .arg("-i") + .arg(&command) + .arg(&cargo_toml) + .output() + .await?; let config = Config::new(); let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); - let fuzz_args = config.get_fuzz_args(hfuzz_run_args); - let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); - if !cur_dir.try_exists()? { - throw!(Error::NotInitialized); - } + let mut hfuzz_workspace = target.to_owned(); + hfuzz_workspace.push('/'); + hfuzz_workspace.push_str(HFUZZ_WORKSPACE); + + // TODO this allows to specify your own workspace dir + let honggfuzz_workspace = std::env::var("HFUZZ_WORKSPACE").unwrap_or(hfuzz_workspace); + + let fuzz_args = config.get_fuzz_args(hfuzz_run_args); let mut child = Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) + .env("HFUZZ_WORKSPACE", honggfuzz_workspace) .current_dir(cur_dir) .arg("hfuzz") .arg("run") - .arg(target) + .arg("fuzz_target") .spawn()?; tokio::select! { diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 43a8127d..a9345f99 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -83,7 +83,7 @@ pub mod constants { pub const TEST_DIRECTORY: &str = "tests"; pub const TEST: &str = "test.rs"; - pub const FUZZ_DIRECTORY: &str = "src/bin"; + pub const FUZZ_DIRECTORY: &str = "fuzz_0"; pub const FUZZ: &str = "fuzz_target.rs"; pub const PROGRAM_STUBS: &str = "program_stubs.rs"; diff --git a/crates/client/src/templates/program_client/Cargo.toml.tmpl b/crates/client/src/templates/program_client/Cargo.toml.tmpl index 7653cfc7..7ac256a4 100644 --- a/crates/client/src/templates/program_client/Cargo.toml.tmpl +++ b/crates/client/src/templates/program_client/Cargo.toml.tmpl @@ -3,5 +3,5 @@ name = "program_client" version = "0.1.0" edition = "2018" -[dependencies] +[dependencies.trdelnik-client] trdelnik-client = "0.5.0" diff --git a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl index 6a8bb99c..367736be 100644 --- a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl +++ b/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl @@ -16,3 +16,11 @@ path = "../.program_client" [dev-dependencies] fehler = "1.0.0" rstest = "0.12.0" + +# this may be not optimal to store it here right away +# because we have also option to init without fuzzer +# on the other hand, without the option I found this OK + +[[bin]] +name = "fuzz_target" +path = "fuzz_0/fuzz_target.rs" diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 79245b32..b8afc79d 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -231,7 +231,6 @@ impl WorkspaceBuilder { self.create_file(&trdelnik_toml_path, trdelnik_toml_content) .await?; } - /// Adds `trdelnik-tests` workspace to the `root`'s `Cargo.toml` workspace members if needed. #[throws] async fn update_program_client(&self) { let lib_path = self.root.join(PROGRAM_CLIENT_DIRECTORY).join(SRC).join(LIB); From 34e34e3bd07c8a40b1cdf9b787d716511a13c43e Mon Sep 17 00:00:00 2001 From: lukacan Date: Fri, 15 Dec 2023 16:36:03 +0100 Subject: [PATCH 26/57] =?UTF-8?q?=F0=9F=8E=A8=20trdelnik-tests=20structure?= =?UTF-8?q?=20split=20into=20poc=20tests=20and=20fuzz=20tests=20/=20added?= =?UTF-8?q?=20support=20for=20adding=20new=20fuzz=20tests/=20updated=20tem?= =?UTF-8?q?plates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/build.rs | 2 +- crates/cli/src/command/fuzz.rs | 9 +- crates/client/src/commander.rs | 78 ++-- crates/client/src/idl.rs | 11 +- crates/client/src/lib.rs | 13 +- crates/client/src/reader.rs | 4 +- .../trdelnik-tests/Cargo_fuzz.toml.tmpl | 23 ++ .../trdelnik-tests/Cargo_poc.toml.tmpl | 17 + crates/client/src/workspace_builder.rs | 377 +++++++++++------- 9 files changed, 337 insertions(+), 197 deletions(-) create mode 100644 crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl create mode 100644 crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index 1e9c4a80..6e78c16a 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -7,7 +7,7 @@ pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] pub async fn build(root: String, arch: ProgramArch) { - // TODO root argument maybe not needed + // FIXME root argument maybe not needed let root = if let Some(r) = discover(TRDELNIK_TOML)? { r } else { diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 84c3c378..4a37dae7 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -3,6 +3,7 @@ use anyhow::{bail, Error}; use clap::Subcommand; use fehler::throws; use trdelnik_client::Commander; +use trdelnik_client::WorkspaceBuilder; use crate::discover; @@ -26,6 +27,8 @@ pub enum FuzzCommand { /// Path to the crash file crash_file_path: String, }, + // TODO make optional parameter target name that will create new fuzz test with specified name + Add, } #[throws] @@ -54,7 +57,7 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { if with_exit_code { Commander::run_fuzzer_with_exit_code(target, root).await?; } else { - Commander::run_fuzzer(target, root).await?; + Commander::run_fuzzer(target).await?; } } FuzzCommand::Run_Debug { @@ -63,5 +66,9 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { } => { Commander::run_fuzzer_debug(target, crash_file_path, root).await?; } + FuzzCommand::Add => { + let mut generator = WorkspaceBuilder::new_with_root(root); + generator.add_fuzz_test().await?; + } }; } diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index e7654d75..b839fb7f 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -48,6 +48,8 @@ pub enum Error { NotInitialized, #[error("the crash file does not exist")] CrashFileNotFound, + #[error("The Anchor project does not contain any programs")] + NoProgramsFound, } /// Localnet (the validator process) handle. @@ -119,7 +121,7 @@ impl Commander { .expect("Cargo.toml reading failed"); cargo_toml_data.packages.into_iter().filter(|package| { - // @TODO less error-prone test if the package is a _program_? + // TODO less error-prone test if the package is a _program_? // This will only consider Packages where path: // /home/xyz/xyz/trdelnik/trdelnik/examples/example_project/programs/package1 // NOTE we can obtain more important information here, only to remember @@ -130,15 +132,23 @@ impl Commander { }) } #[throws] - pub async fn obtain_program_idl(root: &Path) -> Option { - let idl_programs = Commander::program_packages().map(|package| async move { - let absolute_root = fs::canonicalize(root).await?; + pub async fn collect_packages() -> Option> { + let packages: Vec = Commander::program_packages().collect(); + if packages.is_empty() { + throw!(Error::NoProgramsFound) + } else { + Some(packages) + } + } - let name = package.name; + #[throws] + pub async fn obtain_program_idl(packages: &[Package]) -> Option { + let idl_programs = packages.iter().map(|package| async move { + let name = &package.name; let output = std::process::Command::new("cargo") .arg("+nightly") .arg("rustc") - .args(["--package", &name]) + .args(["--package", name]) .arg("--profile=check") .arg("--") .arg("-Zunpretty=expanded") @@ -146,14 +156,7 @@ impl Commander { .unwrap(); if output.status.success() { let code = String::from_utf8(output.stdout)?; - let path = package - .manifest_path - .parent() - .unwrap() - .strip_prefix(&absolute_root) - .unwrap() - .as_std_path(); - Ok(idl::parse_to_idl_program(name, &code, path).await?) + Ok(idl::parse_to_idl_program(name, &code).await?) } else { let error_text = String::from_utf8(output.stderr)?; Err(Error::ReadProgramCodeFailed(error_text)) @@ -165,18 +168,19 @@ impl Commander { } #[throws] pub async fn clean_anchor_target() { + // INFO perform anchor clean so no keys will be removed Command::new("anchor").arg("clean").spawn()?.wait().await?; } #[throws] pub async fn clean_hfuzz_target(root: &Path) { - let hfuzz_target_path = root.join(TESTS_WORKSPACE_DIRECTORY).join(HFUZZ_TARGET); + // INFO hfuzz target can be of course located somewhere else + // but as we leave it within the root, we also expect it within the root + + let hfuzz_target_path = root.join(HFUZZ_TARGET); if hfuzz_target_path.exists() { fs::remove_dir_all(hfuzz_target_path).await?; } else { - println!( - "skipping {}/{} directory: not found", - TESTS_WORKSPACE_DIRECTORY, HFUZZ_TARGET - ) + println!("skipping {} directory: not found", HFUZZ_TARGET) } } @@ -234,8 +238,13 @@ impl Commander { /// to allow you read `println` outputs in your terminal window. #[throws] pub async fn run_tests() { + // INFO we have to specify --package poc_tests in order to build + // only poc_tests and not fuzz tests also + // FIXME "ok" within the output in terminal is not green + // as it should be let success = Command::new("cargo") .arg("test") + .args(["--package", "poc_tests"]) .arg("--") .arg("--nocapture") .spawn()? @@ -249,43 +258,20 @@ impl Commander { /// Runs fuzzer on the given target. #[throws] - pub async fn run_fuzzer(target: String, root: String) { - let root = Path::new(&root); - let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY).join(&target); - let cargo_toml = root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); - - if !cur_dir.try_exists()? { - throw!(Error::NotInitialized); - } - - let command = format!("s|fuzz_[0-9]*/fuzz_target\\.rs|{}/fuzz_target.rs|", target); - let _status = Command::new("sed") - .arg("-i") - .arg(&command) - .arg(&cargo_toml) - .output() - .await?; - + pub async fn run_fuzzer(target: String) { + // INFO we do not check anything here , as we leave it on honggfuzz , simply + // if the target does not exists, honggfuzz will throw an error let config = Config::new(); let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); - let mut hfuzz_workspace = target.to_owned(); - hfuzz_workspace.push('/'); - hfuzz_workspace.push_str(HFUZZ_WORKSPACE); - - // TODO this allows to specify your own workspace dir - let honggfuzz_workspace = std::env::var("HFUZZ_WORKSPACE").unwrap_or(hfuzz_workspace); - let fuzz_args = config.get_fuzz_args(hfuzz_run_args); let mut child = Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) - .env("HFUZZ_WORKSPACE", honggfuzz_workspace) - .current_dir(cur_dir) .arg("hfuzz") .arg("run") - .arg("fuzz_target") + .arg(target) .spawn()?; tokio::select! { diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index be547a92..235441dc 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -96,7 +96,6 @@ use heck::{ToSnakeCase, ToUpperCamelCase}; use quote::ToTokens; -use std::path::{Path, PathBuf}; use thiserror::Error; static ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; @@ -123,7 +122,6 @@ pub struct IdlName { pub struct IdlProgram { pub name: IdlName, pub id: String, - pub path: PathBuf, pub instruction_account_pairs: Vec<(IdlInstruction, IdlAccountGroup)>, } @@ -139,11 +137,7 @@ pub struct IdlAccountGroup { pub accounts: Vec<(String, String)>, } -pub async fn parse_to_idl_program( - name: String, - code: &str, - path: &Path, -) -> Result { +pub async fn parse_to_idl_program(name: &String, code: &str) -> Result { let mut static_program_id = None::; let mut mod_private = None::; let mut mod_instruction = None::; @@ -466,9 +460,8 @@ pub async fn parse_to_idl_program( Ok(IdlProgram { name: IdlName { upper_camel_case: name.to_upper_camel_case(), - snake_case: name, + snake_case: name.to_string(), }, - path: path.to_path_buf(), id: program_id_bytes.into_token_stream().to_string(), instruction_account_pairs, }) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index a9345f99..5f339eb5 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -80,11 +80,16 @@ pub mod constants { pub const SRC: &str = "src"; pub const TESTS_WORKSPACE_DIRECTORY: &str = "trdelnik-tests"; - pub const TEST_DIRECTORY: &str = "tests"; - pub const TEST: &str = "test.rs"; + pub const POC_TEST_DIRECTORY: &str = "poc_tests"; + pub const TESTS: &str = "tests"; - pub const FUZZ_DIRECTORY: &str = "fuzz_0"; - pub const FUZZ: &str = "fuzz_target.rs"; + pub const FUZZ_TEST_DIRECTORY: &str = "fuzz_tests"; + + pub const POC_TEST: &str = "test.rs"; + pub const FUZZ_TEST: &str = "test_fuzz.rs"; + + // pub const FUZZ_DIRECTORY: &str = "fuzz_0"; + // pub const FUZZ: &str = "fuzz_target.rs"; pub const PROGRAM_STUBS: &str = "program_stubs.rs"; //pub const PROGRAM_STUBS_ENTRIES: &str = "// ### \"Entrypoints go above\" ###"; diff --git a/crates/client/src/reader.rs b/crates/client/src/reader.rs index d0854d0b..42f85124 100644 --- a/crates/client/src/reader.rs +++ b/crates/client/src/reader.rs @@ -28,7 +28,9 @@ pub struct Reader { impl Reader { /// Creates a new `Reader` instance with the default root `"../../"`. pub fn new() -> Self { - Self { root: "../".into() } + Self { + root: "../../".into(), + } } /// Creates a new `Reader` instance with the provided `root`. diff --git a/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl new file mode 100644 index 00000000..f2249e77 --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl @@ -0,0 +1,23 @@ +[package] +name = "fuzz_###FUZZ_ID###" +version = "0.1.0" +edition = "2018" + +# Dependencies specific to Fuzz test +[dependencies] +# ... your dependencies here +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + + +[dependencies.trdelnik-client] +version = "0.5.0" + +[dependencies.program_client] +path = "../../../.program_client" + + +[[bin]] +name = "fuzz_###FUZZ_ID###" +path = "test_fuzz.rs" diff --git a/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl new file mode 100644 index 00000000..13b549fc --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl @@ -0,0 +1,17 @@ +[package] +name = "poc_tests" +version = "0.1.0" +edition = "2018" + +# Dependencies specific to PoC test +# Dev-dependencies are used for compiling tests, +[dev-dependencies] +assert_matches = "1.4.0" +fehler = "1.0.0" +rstest = "0.12.0" + +[dev-dependencies.trdelnik-client] +version = "0.5.0" + +[dev-dependencies.program_client] +path = "../../.program_client" diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index b8afc79d..c1d2d1a0 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -1,5 +1,7 @@ use crate::commander::{Commander, Error as CommanderError}; +use cargo_metadata::Package; use fehler::{throw, throws}; +use pathdiff; use std::{ env, fs::OpenOptions, @@ -40,6 +42,7 @@ pub struct WorkspaceBuilder { root: PathBuf, idl: Option, use_tokens: Option>, + packages: Option>, } impl Default for WorkspaceBuilder { fn default() -> Self { @@ -52,6 +55,7 @@ impl WorkspaceBuilder { root: Path::new(&root).to_path_buf(), idl: None, use_tokens: None, + packages: None, } } #[throws] @@ -61,7 +65,7 @@ impl WorkspaceBuilder { // automatically generated so we should be ok with updating this self.update_program_client().await?; //self.update_program_stubs().await?; - self.update_toml_dependencies().await?; + //self.update_toml_dependencies().await?; //self.add_invoked_program_deps().await?; } #[throws] @@ -71,45 +75,44 @@ impl WorkspaceBuilder { } #[throws] pub async fn initialize_without_fuzzer(&mut self, arch: &str) { - // build first self.build_and_parse(arch).await?; self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; - self.create_trdelnik_tests().await?; - - self.update_toml_dependencies().await?; - + self.add_new_poc_test().await?; self.create_trdelnik_manifest().await?; - self.update_workspace_cargo().await?; } #[throws] pub async fn initialize_with_fuzzer(&mut self, arch: &str) { - // build first self.build_and_parse(arch).await?; self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; - self.create_trdelnik_tests().await?; - self.create_trdelnik_fuzz().await?; - - self.update_toml_dependencies().await?; - //self.add_invoked_program_deps().await?; + self.add_new_poc_test().await?; + self.add_new_fuzz_test().await?; self.create_trdelnik_manifest().await?; - self.update_workspace_cargo().await?; self.update_gitignore("hfuzz_target")?; } #[throws] async fn build_and_parse(&mut self, arch: &str) { + // build first , so we now that the programs are ok Commander::build_programs(arch).await?; + // this will already throws an error if no packages are found + self.packages = Commander::collect_packages().await?; - println!("--> Obtaining data from programs ... <--"); - self.idl = Commander::obtain_program_idl(&self.root).await?; + println!("--> Generating source codes ... <--"); + // FIXME try to be more creative with the terminal info + let packages = self.packages.as_ref().unwrap(); + self.idl = Commander::obtain_program_idl(packages).await?; self.use_tokens = Commander::parse_program_client_imports().await?; println!("\x1b[92mSuccesfully\x1b[0m obtained."); } - /// Creates .program_client folder, subfolders and files + #[throws] + pub async fn add_fuzz_test(&mut self) { + self.packages = Commander::collect_packages().await?; + self.add_new_fuzz_test().await?; + } #[throws] async fn create_program_client_crate(&self) { let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); @@ -125,6 +128,8 @@ impl WorkspaceBuilder { )); self.create_file(&cargo_path, cargo_toml_content).await?; + self.add_program_dependencies(&crate_path).await?; + let program_client = program_client_generator::generate_source_code( self.idl.as_ref().unwrap(), self.use_tokens.as_ref().unwrap(), @@ -133,94 +138,225 @@ impl WorkspaceBuilder { self.create_file(&lib_path, &program_client).await?; } - /// Creates trdelnik-tests crate #[throws] async fn create_trdelnik_tests_crate(&self) { let workspace_path = self.root.join(TESTS_WORKSPACE_DIRECTORY); - let cargo_toml_path = workspace_path.join(CARGO); - self.create_directory(&workspace_path).await?; - - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/Cargo.toml.tmpl" - )); - self.create_file(&cargo_toml_path, cargo_toml_content) - .await?; } #[throws] - async fn create_trdelnik_tests(&self) { - let tests_path = self + async fn add_new_fuzz_test(&self) { + // this check should be ensured within package collection , but + // we anyway have to unwrap option and doeble check wont hurt + let program_name = match &self.packages { + Some(packages) => &packages.first().unwrap().name, + None => { + throw!(Error::NoProgramsFound) + } + }; + + let fuzz_dir_path = self .root .join(TESTS_WORKSPACE_DIRECTORY) - .join(TEST_DIRECTORY); - let test_path = tests_path.join(TEST); + .join(FUZZ_TEST_DIRECTORY); + self.create_directory(&fuzz_dir_path).await?; - self.create_directory(&tests_path).await?; + let fuzz_tests_dir = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(FUZZ_TEST_DIRECTORY); - let test_content = include_str!(concat!( + let fuzz_id = if fuzz_tests_dir.read_dir()?.next().is_none() { + 0 + } else { + let mut directories: Vec<_> = fuzz_tests_dir + .read_dir() + .unwrap() + .map(|r| r.unwrap()) + .collect(); + directories.sort_by_key(|dir| dir.path()); + + // INFO this is kind of spaghetti, but esentially we are: + // taking last element from the sorted list + // splitting its name by '_' as this is expected delimeter + // for names such "poc_0", and then take the number and add 1, this should ensure + // that the name will be unique + String::from( + directories + .last() + .unwrap() + .file_name() + .to_str() + .unwrap() + .split('_') + .last() + .unwrap(), + ) + .parse::() + .unwrap() + + 1 + }; + + let new_fuzz_test = format!("fuzz_{fuzz_id}"); + + let new_fuzz_test_dir = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(FUZZ_TEST_DIRECTORY) + .join(&new_fuzz_test); + + self.create_directory(&new_fuzz_test_dir).await?; + + let cargo_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(FUZZ_TEST_DIRECTORY) + .join(&new_fuzz_test) + .join(CARGO); + + let cargo_toml_content = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/test.rs" + "/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl" )); + let cargo_content = cargo_toml_content.replace("###FUZZ_ID###", &fuzz_id.to_string()); - match &self.idl { - Some(idl) => { - let program_name = &idl.programs.first().unwrap().name.snake_case; - let test_content = test_content.replace("###PROGRAM_NAME###", program_name); - let use_instructions = - format!("use program_client::{}_instruction::*;\n", program_name); - let template = format!("{use_instructions}{test_content}"); + self.create_file(&cargo_path, &cargo_content).await?; - self.create_file(&test_path, &template).await?; - } - None => { - throw!(Error::NoProgramsFound) - } - } - } - /// Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file - #[throws] - async fn create_trdelnik_fuzz(&self) { - let fuzzer_path = self + let fuzz_test_path = self .root .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_DIRECTORY); - //let program_stubs_path = fuzzer_path.join(PROGRAM_STUBS); - let fuzzer_test_path = fuzzer_path.join(FUZZ); - - self.create_directory_all(&fuzzer_path).await?; + .join(FUZZ_TEST_DIRECTORY) + .join(&new_fuzz_test) + .join(FUZZ_TEST); let fuzz_test_content = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), "/src/templates/trdelnik-tests/fuzz_target.rs" + )); + + let use_entry = format!("use {}::entry;\n", program_name); + let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); + let mut template = format!("{use_entry}{use_instructions}{fuzz_test_content}"); + template = template.replace("###PROGRAM_NAME###", program_name); + + self.create_file(&fuzz_test_path, &template).await?; + + // add this new fuzz test to the workspace + self.add_workspace_member(&format!( + "{TESTS_WORKSPACE_DIRECTORY}/{FUZZ_TEST_DIRECTORY}/{new_fuzz_test}", )) - .to_string(); - - // let program_stubs_content = include_str!(concat!( - // env!("CARGO_MANIFEST_DIR"), - // "/src/templates/trdelnik-tests/program_stubs.rs" - // )) - // .to_string(); - - match &self.idl { - Some(idl) => { - let fuzz_test_content = get_fuzz_test_content(idl, fuzz_test_content)?; - self.create_file(&fuzzer_test_path, &fuzz_test_content) - .await?; - - // let program_stubs_content = get_program_stubs_content(idl, program_stubs_content)?; - // self.create_file(&program_stubs_path, &program_stubs_content) - // .await?; - } + .await?; + + // add program dependencies + self.add_program_dependencies(&new_fuzz_test_dir).await?; + + // add fuzzing feature + self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) + .await?; + } + #[throws] + async fn add_new_poc_test(&self) { + // INFO only one POC test file needed + // as we can implement multiple test paths so no need to create + // or add new test files, however can be added in the future + let program_name = match &self.packages { + Some(packages) => &packages.first().unwrap().name, None => { throw!(Error::NoProgramsFound) } - } + }; + + let poc_dir_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(POC_TEST_DIRECTORY); + + self.create_directory(&poc_dir_path).await?; + + let new_poc_test_dir = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(POC_TEST_DIRECTORY) + .join(TESTS); + + self.create_directory(&new_poc_test_dir).await?; + + let cargo_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(POC_TEST_DIRECTORY) + .join(CARGO); + + let cargo_toml_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl" + )); + + self.create_file(&cargo_path, cargo_toml_content).await?; + + let poc_test_path = self + .root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(POC_TEST_DIRECTORY) + .join(TESTS) + .join(POC_TEST); - self.add_feature_to_dep("trdelnik-client", "fuzzing") + let poc_test_content = include_str!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/templates/trdelnik-tests/test.rs" + )); + let test_content = poc_test_content.replace("###PROGRAM_NAME###", program_name); + let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); + let template = format!("{use_instructions}{test_content}"); + + self.create_file(&poc_test_path, &template).await?; + + self.add_workspace_member(&format!("{TESTS_WORKSPACE_DIRECTORY}/{POC_TEST_DIRECTORY}",)) .await?; } + // Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file + // #[throws] + // async fn create_trdelnik_tests_fuzz(&self) { + // let fuzzer_path = self + // .root + // .join(TESTS_WORKSPACE_DIRECTORY) + // .join(FUZZ_TEST_DIRECTORY); + // //let program_stubs_path = fuzzer_path.join(PROGRAM_STUBS); + // let fuzzer_test_path = fuzzer_path.join(FUZZ_TEST); + + // self.create_directory_all(&fuzzer_path).await?; + + // let fuzz_test_content = include_str!(concat!( + // env!("CARGO_MANIFEST_DIR"), + // "/src/templates/trdelnik-tests/fuzz_target.rs" + // )) + // .to_string(); + + // // let program_stubs_content = include_str!(concat!( + // // env!("CARGO_MANIFEST_DIR"), + // // "/src/templates/trdelnik-tests/program_stubs.rs" + // // )) + // // .to_string(); + + // match &self.idl { + // Some(idl) => { + // let fuzz_test_content = get_fuzz_test_content(idl, fuzz_test_content)?; + // self.create_file(&fuzzer_test_path, &fuzz_test_content) + // .await?; + + // // let program_stubs_content = get_program_stubs_content(idl, program_stubs_content)?; + // // self.create_file(&program_stubs_path, &program_stubs_content) + // // .await?; + // } + // None => { + // throw!(Error::NoProgramsFound) + // } + // } + + // self.add_feature_to_dep("trdelnik-client", "fuzzing") + // .await?; + // } + #[throws] async fn create_trdelnik_manifest(&self) { let trdelnik_toml_path = self.root.join(TRDELNIK); @@ -243,11 +379,13 @@ impl WorkspaceBuilder { self.update_file(&lib_path, &program_client).await?; } + #[throws] - async fn update_workspace_cargo(&self) { + async fn add_workspace_member(&self, member: &str) { let cargo = self.root.join(CARGO); let mut content: Value = fs::read_to_string(&cargo).await?.parse()?; - let test_workspace_value = Value::String(String::from(TESTS_WORKSPACE_DIRECTORY)); + let new_member = Value::String(String::from(member)); + let members = content .as_table_mut() .ok_or(Error::CannotParseCargoToml)? @@ -256,18 +394,19 @@ impl WorkspaceBuilder { .as_table_mut() .ok_or(Error::CannotParseCargoToml)? .entry("members") - .or_insert(Value::Array(vec![test_workspace_value.clone()])) + .or_insert(Value::Array(vec![new_member.clone()])) .as_array_mut() .ok_or(Error::CannotParseCargoToml)?; - match members.iter().find(|&x| x.eq(&test_workspace_value)) { + + match members.iter().find(|&x| x.eq(&new_member)) { Some(_) => { println!( - "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{CARGO}\x1b[0m, already contains trdelnik-tests." + "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{member}\x1b[0m, already contains trdelnik-tests." ) } None => { - members.push(test_workspace_value); - println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{CARGO}\x1b[0m."); + members.push(new_member); + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{member}\x1b[0m."); } }; fs::write(cargo, content.to_string()).await?; @@ -348,10 +487,10 @@ impl WorkspaceBuilder { }; } - /// Adds programs to Cargo.toml as a dev dependencies to be able to be used in tests #[throws] - async fn add_feature_to_dep(&self, dependency: &str, feature: &str) { - let cargo_toml_path = self.root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); + async fn add_feature_to_dep(&self, dependency: &str, feature: &str, cargo_dir: &Path) { + let cargo_toml_path = cargo_dir.join(CARGO); + // let cargo_toml_path = self.root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); let rel_path = &cargo_toml_path .strip_prefix(&self.root) .unwrap() @@ -397,57 +536,34 @@ impl WorkspaceBuilder { } #[throws] - async fn update_toml_dependencies(&self) { - let client_deps = self.root.join(PROGRAM_CLIENT_DIRECTORY).join("Cargo.toml"); - let test_deps = self - .root - .join(crate::constants::TESTS_WORKSPACE_DIRECTORY) - .join("Cargo.toml"); - - let mut client_toml_content: toml::Value = - fs::read_to_string(&client_deps).await?.parse()?; - let mut test_toml_content: toml::Value = fs::read_to_string(&test_deps).await?.parse()?; + async fn add_program_dependencies(&self, cargo_dir: &PathBuf) { + let cargo_path = cargo_dir.join(CARGO); + let mut cargo_toml_content: toml::Value = fs::read_to_string(&cargo_path).await?.parse()?; - let client_toml_deps = client_toml_content + let client_toml_deps = cargo_toml_content .get_mut("dependencies") .and_then(toml::Value::as_table_mut) .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; - let test_toml_deps = test_toml_content - .get_mut("dependencies") - .and_then(toml::Value::as_table_mut) - .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; - - match &self.idl { - Some(idl) => { - // TODO Cannot be simplified ? - for program in idl.programs.iter() { - let dep_client: Value = format!( - r#"{} = {{ path = "../{}", features = ["no-entrypoint"] }}"#, - program.name.snake_case, - program.path.to_str().unwrap() - ) - .parse() - .unwrap(); - let dep_test: Value = format!( - r#"{} = {{ path = "../{}" }}"#, - program.name.snake_case, - program.path.to_str().unwrap() + match &self.packages { + Some(packages) => { + for package in packages.iter() { + let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); + // INFO this will obtain relative path + let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); + let dep: Value = format!( + r#"{} = {{ path = "{}" }}"#, + package.name, + relative_path.to_str().unwrap() ) .parse() .unwrap(); - - if let toml::Value::Table(table) = dep_client { + if let toml::Value::Table(table) = dep { let (name, value) = table.into_iter().next().unwrap(); client_toml_deps.entry(name).or_insert(value.clone()); } - if let toml::Value::Table(table) = dep_test { - let (name, value) = table.into_iter().next().unwrap(); - test_toml_deps.entry(name).or_insert(value.clone()); - } } - fs::write(client_deps, client_toml_content.to_string()).await?; - fs::write(test_deps, test_toml_content.to_string()).await?; + fs::write(cargo_path, cargo_toml_content.to_string()).await?; } None => { throw!(Error::NoProgramsFound) @@ -517,12 +633,3 @@ impl WorkspaceBuilder { // } // } } - -#[throws] -fn get_fuzz_test_content(idl: &Idl, content: String) -> String { - let name = &idl.programs.first().unwrap().name.snake_case; - let use_entry = format!("use {}::entry;\n", name); - let use_instructions = format!("use program_client::{}_instruction::*;\n", name); - let template = format!("{use_entry}{use_instructions}{content}"); - template.replace("###PROGRAM_NAME###", name) -} From b2de46d5f470a32df481a40f9b73e2fdede6414b Mon Sep 17 00:00:00 2001 From: lukacan Date: Fri, 15 Dec 2023 18:37:31 +0100 Subject: [PATCH 27/57] =?UTF-8?q?=F0=9F=8E=A8=20updated=20escrow/turnstile?= =?UTF-8?q?/fuzzer=20based=20on=20previous=20changes=20,=20added=20options?= =?UTF-8?q?=20to=20the=20init=20for=20fuzz/poc/both=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 7 + crates/cli/src/command.rs | 2 +- crates/cli/src/command/init.rs | 86 +- crates/cli/src/lib.rs | 8 +- crates/client/Cargo.toml | 72 +- crates/client/src/workspace_builder.rs | 29 +- crates/client/tests/test.rs | 11 +- examples/escrow/.program_client/Cargo.toml | 1 - examples/escrow/Cargo.lock | 1065 ++++++++----- examples/escrow/Cargo.toml | 2 +- examples/escrow/Trdelnik.toml | 30 + examples/escrow/trdelnik-tests/Cargo.toml | 21 - .../trdelnik-tests/poc_tests/Cargo.toml | 19 + .../{ => poc_tests}/tests/test.rs | 3 +- examples/fuzzer/.program_client/Cargo.toml | 1 + examples/fuzzer/Cargo.lock | 1235 +++++++++------ examples/fuzzer/Cargo.toml | 2 +- examples/fuzzer/trdelnik-tests/Cargo.toml | 22 - .../fuzz_tests/fuzz_0/Cargo.toml | 23 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 73 + .../fuzz_tests/fuzz_1/Cargo.toml | 23 + .../fuzz_1/test_fuzz.rs} | 5 +- examples/fuzzer/trdelnik-tests/tests/test.rs | 45 - examples/turnstile/.program_client/Cargo.toml | 1 - examples/turnstile/Cargo.lock | 1402 ++++++++++------- examples/turnstile/Cargo.toml | 2 +- examples/turnstile/Trdelnik.toml | 28 + examples/turnstile/trdelnik-tests/Cargo.toml | 17 - .../trdelnik-tests/poc_tests/Cargo.toml | 18 + .../{ => poc_tests}/tests/test.rs | 10 +- 30 files changed, 2614 insertions(+), 1649 deletions(-) delete mode 100644 examples/escrow/trdelnik-tests/Cargo.toml create mode 100644 examples/escrow/trdelnik-tests/poc_tests/Cargo.toml rename examples/escrow/trdelnik-tests/{ => poc_tests}/tests/test.rs (99%) delete mode 100644 examples/fuzzer/trdelnik-tests/Cargo.toml create mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml create mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs create mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml rename examples/fuzzer/trdelnik-tests/{src/bin/fuzz_target.rs => fuzz_tests/fuzz_1/test_fuzz.rs} (99%) delete mode 100644 examples/fuzzer/trdelnik-tests/tests/test.rs delete mode 100644 examples/turnstile/trdelnik-tests/Cargo.toml create mode 100644 examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml rename examples/turnstile/trdelnik-tests/{ => poc_tests}/tests/test.rs (90%) diff --git a/Cargo.lock b/Cargo.lock index 7fe6a0ea..5d7a65c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2891,6 +2891,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.4.0" @@ -5737,6 +5743,7 @@ dependencies = [ "honggfuzz", "lazy_static", "log", + "pathdiff", "pretty_assertions", "quinn-proto", "quote 1.0.32", diff --git a/crates/cli/src/command.rs b/crates/cli/src/command.rs index 5a6f6729..a4a1a5af 100644 --- a/crates/cli/src/command.rs +++ b/crates/cli/src/command.rs @@ -17,7 +17,7 @@ mod explorer; pub use explorer::{explorer, ExplorerCommand}; mod init; -pub use init::init; +pub use init::{init, InitCommand}; mod clean; pub use clean::clean; diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index d6303a60..992975e2 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -1,4 +1,5 @@ use anyhow::{bail, Error}; +use clap::{Parser, ValueEnum}; use fehler::throws; use trdelnik_client::WorkspaceBuilder; @@ -7,28 +8,69 @@ use crate::{discover, ProgramArch}; pub const ANCHOR_TOML: &str = "Anchor.toml"; pub const CARGO_TOML: &str = "Cargo.toml"; +#[derive(ValueEnum, Parser, Clone, PartialEq, Eq, Debug)] +pub enum InitCommand { + Fuzz, + Poc, + Both, +} + #[throws] -pub async fn init(skip_fuzzer: bool, arch: ProgramArch) { +pub async fn init(template: InitCommand, arch: ProgramArch) { + match template { + InitCommand::Fuzz => { + let root = if let Some(r) = discover(ANCHOR_TOML)? { + r + } else { + bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); + }; + let mut generator = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + generator.initialize_fuzz(arch).await?; + } + InitCommand::Poc => { + let root = if let Some(r) = discover(CARGO_TOML)? { + r + } else { + bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); + }; + let mut generator = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + generator.initialize_poc(arch).await?; + } + InitCommand::Both => { + // INFO for both we need Anchor as it is stronger condition + let root = if let Some(r) = discover(ANCHOR_TOML)? { + r + } else { + bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); + }; + let mut generator = WorkspaceBuilder::new_with_root(root); + let arch = arch.build_subcommand(); + generator.initialize_both(arch).await?; + } + }; + // TODO maybe remove skip fuzzer option ? - if skip_fuzzer { - // if skipping fuzzer no need to look for anchor.toml - let root = if let Some(r) = discover(CARGO_TOML)? { - r - } else { - bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); - }; - let mut generator = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - generator.initialize_without_fuzzer(arch).await?; - } else { - // fuzzer only supported with anchor - let root = if let Some(r) = discover(ANCHOR_TOML)? { - r - } else { - bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); - }; - let mut generator = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - generator.initialize_with_fuzzer(arch).await?; - } + // if skip_fuzzer { + // // if skipping fuzzer no need to look for anchor.toml + // let root = if let Some(r) = discover(CARGO_TOML)? { + // r + // } else { + // bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); + // }; + // let mut generator = WorkspaceBuilder::new_with_root(root); + // let arch = arch.build_subcommand(); + // generator.initialize_without_fuzzer(arch).await?; + // } else { + // // fuzzer only supported with anchor + // let root = if let Some(r) = discover(ANCHOR_TOML)? { + // r + // } else { + // bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); + // }; + // let mut generator = WorkspaceBuilder::new_with_root(root); + // let arch = arch.build_subcommand(); + // generator.initialize_with_fuzzer(arch).await?; + // } } diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 675c3e16..826226fc 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -7,6 +7,7 @@ mod command; // bring nested subcommand enums into scope use command::ExplorerCommand; use command::FuzzCommand; +use command::InitCommand; use command::KeyPairCommand; #[derive(ValueEnum, Parser, Clone, PartialEq, Eq, Debug)] @@ -69,9 +70,8 @@ enum Command { }, /// Initialize test environment Init { - /// Flag to skip generating template for fuzzing and activating the fuzzing feature. - #[arg(short, long)] - skip_fuzzer: bool, + #[clap(value_enum, short, long, default_value = "both")] + template: InitCommand, #[clap(value_enum, short, long, default_value = "sbf")] arch: ProgramArch, }, @@ -90,7 +90,7 @@ pub async fn start() { Command::Fuzz { root, subcmd } => command::fuzz(root, subcmd).await?, Command::Localnet => command::localnet().await?, Command::Explorer { subcmd } => command::explorer(subcmd).await?, - Command::Init { skip_fuzzer, arch } => command::init(skip_fuzzer, arch).await?, + Command::Init { template, arch } => command::init(template, arch).await?, Command::Clean => command::clean().await?, } } diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index d4d34527..287ff07b 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -8,7 +8,12 @@ readme = "../../README.md" description = "The trdelnik_client crate helps you build and deploy an Anchor program to a local cluster and run a test suite against it." [features] -fuzzing = ["dep:solana-program-test", "dep:honggfuzz", "arbitrary/derive", "quinn-proto/arbitrary"] +fuzzing = [ + "dep:solana-program-test", + "dep:honggfuzz", + "arbitrary/derive", + "quinn-proto/arbitrary", +] [build-dependencies] anyhow = { version = "1.0.45", features = ["std"], default-features = false } @@ -17,36 +22,37 @@ anyhow = { version = "1.0.45", features = ["std"], default-features = false } pretty_assertions = "1.1.0" [dependencies] -trdelnik-test = { workspace = true } -solana-sdk = { workspace = true } -solana-cli-output = { workspace = true } -solana-transaction-status = { workspace = true } -solana-account-decoder = { workspace = true } -anchor-client = { workspace = true } -spl-token = { workspace = true } +trdelnik-test = { workspace = true } +solana-sdk = { workspace = true } +solana-cli-output = { workspace = true } +solana-transaction-status = { workspace = true } +solana-account-decoder = { workspace = true } +anchor-client = { workspace = true } +spl-token = { workspace = true } spl-associated-token-account = { workspace = true } -tokio = { workspace = true } -rand = { workspace = true } -serde_json = { workspace = true } -serde = { workspace = true } -bincode = { workspace = true } -borsh = { workspace = true } -futures = { workspace = true } -fehler = { workspace = true } -thiserror = { workspace = true } -ed25519-dalek = { workspace = true } -serial_test = { workspace = true } -anyhow = { workspace = true } -cargo_metadata = { workspace = true } -syn = { workspace = true } -quote = { workspace = true } -heck = { workspace = true } -toml = { workspace = true } -log = { workspace = true } -rstest = { workspace = true } -lazy_static = { workspace = true } -honggfuzz = { version = "0.5.55", optional = true } -arbitrary = { version = "1.3.0", optional = true } -solana-program-test = { version = "1.16.9", optional = true} -quinn-proto = { version = "0.9.4", optional = true} -shellexpand = { workspace = true } +tokio = { workspace = true } +rand = { workspace = true } +serde_json = { workspace = true } +serde = { workspace = true } +bincode = { workspace = true } +borsh = { workspace = true } +futures = { workspace = true } +fehler = { workspace = true } +thiserror = { workspace = true } +ed25519-dalek = { workspace = true } +serial_test = { workspace = true } +anyhow = { workspace = true } +cargo_metadata = { workspace = true } +syn = { workspace = true } +quote = { workspace = true } +heck = { workspace = true } +toml = { workspace = true } +log = { workspace = true } +rstest = { workspace = true } +lazy_static = { workspace = true } +honggfuzz = { version = "0.5.55", optional = true } +arbitrary = { version = "1.3.0", optional = true } +solana-program-test = { version = "1.16.9", optional = true } +quinn-proto = { version = "0.9.4", optional = true } +shellexpand = { workspace = true } +pathdiff = "0.2.1" diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index c1d2d1a0..ba03604c 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -74,7 +74,18 @@ impl WorkspaceBuilder { Commander::clean_hfuzz_target(&self.root).await?; } #[throws] - pub async fn initialize_without_fuzzer(&mut self, arch: &str) { + pub async fn initialize_fuzz(&mut self, arch: &str) { + self.build_and_parse(arch).await?; + + self.create_program_client_crate().await?; + self.create_trdelnik_tests_crate().await?; + self.add_new_fuzz_test().await?; + + self.create_trdelnik_manifest().await?; + self.update_gitignore("hfuzz_target")?; + } + #[throws] + pub async fn initialize_poc(&mut self, arch: &str) { self.build_and_parse(arch).await?; self.create_program_client_crate().await?; @@ -83,7 +94,7 @@ impl WorkspaceBuilder { self.create_trdelnik_manifest().await?; } #[throws] - pub async fn initialize_with_fuzzer(&mut self, arch: &str) { + pub async fn initialize_both(&mut self, arch: &str) { self.build_and_parse(arch).await?; self.create_program_client_crate().await?; @@ -128,7 +139,8 @@ impl WorkspaceBuilder { )); self.create_file(&cargo_path, cargo_toml_content).await?; - self.add_program_dependencies(&crate_path).await?; + self.add_program_dependencies(&crate_path, "dependencies") + .await?; let program_client = program_client_generator::generate_source_code( self.idl.as_ref().unwrap(), @@ -247,7 +259,8 @@ impl WorkspaceBuilder { .await?; // add program dependencies - self.add_program_dependencies(&new_fuzz_test_dir).await?; + self.add_program_dependencies(&new_fuzz_test_dir, "dependencies") + .await?; // add fuzzing feature self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) @@ -312,6 +325,9 @@ impl WorkspaceBuilder { self.add_workspace_member(&format!("{TESTS_WORKSPACE_DIRECTORY}/{POC_TEST_DIRECTORY}",)) .await?; + + self.add_program_dependencies(&poc_dir_path, "dev-dependencies") + .await?; } // Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file @@ -536,12 +552,12 @@ impl WorkspaceBuilder { } #[throws] - async fn add_program_dependencies(&self, cargo_dir: &PathBuf) { + async fn add_program_dependencies(&self, cargo_dir: &PathBuf, deps: &str) { let cargo_path = cargo_dir.join(CARGO); let mut cargo_toml_content: toml::Value = fs::read_to_string(&cargo_path).await?.parse()?; let client_toml_deps = cargo_toml_content - .get_mut("dependencies") + .get_mut(deps) .and_then(toml::Value::as_table_mut) .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; @@ -550,6 +566,7 @@ impl WorkspaceBuilder { for package in packages.iter() { let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); // INFO this will obtain relative path + // TODO fuzzer need no entry point feature here for program client cargo let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); let dep: Value = format!( r#"{} = {{ path = "{}" }}"#, diff --git a/crates/client/tests/test.rs b/crates/client/tests/test.rs index 0e9c4fcf..a42675c7 100644 --- a/crates/client/tests/test.rs +++ b/crates/client/tests/test.rs @@ -20,14 +20,9 @@ pub async fn generate_program_client() { "/tests/test_data/expected_client_code.rs" )); - let root = std::path::Path::new("."); - - let program_idl = trdelnik_client::idl::parse_to_idl_program( - "escrow".to_owned(), - expanded_anchor_program, - root, - ) - .await?; + let program_name = String::from("escrow"); + let program_idl = + trdelnik_client::idl::parse_to_idl_program(&program_name, expanded_anchor_program).await?; let idl = trdelnik_client::idl::Idl { programs: vec![program_idl], diff --git a/examples/escrow/.program_client/Cargo.toml b/examples/escrow/.program_client/Cargo.toml index 5792bd07..9e83bd19 100644 --- a/examples/escrow/.program_client/Cargo.toml +++ b/examples/escrow/.program_client/Cargo.toml @@ -7,4 +7,3 @@ path = "../../../crates/client" [dependencies.escrow] path = "../programs/escrow" -features = ["no-entrypoint"] diff --git a/examples/escrow/Cargo.lock b/examples/escrow/Cargo.lock index eaf5be28..7118aacb 100644 --- a/examples/escrow/Cargo.lock +++ b/examples/escrow/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -277,12 +286,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -461,7 +464,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.30", ] [[package]] @@ -506,9 +509,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.15" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "brotli", "flate2", @@ -529,9 +532,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -555,6 +558,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -596,9 +614,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitmaps" @@ -740,9 +758,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -751,9 +769,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -818,9 +836,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "camino" @@ -843,9 +861,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] @@ -882,13 +900,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", + "num-integer", "num-traits", "serde", "time 0.1.45", @@ -960,9 +978,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1014,9 +1032,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1024,9 +1042,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" @@ -1210,22 +1228,22 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -1252,9 +1270,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivation-path" @@ -1436,9 +1457,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -1484,23 +1505,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1519,9 +1529,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "feature-probe" @@ -1551,9 +1561,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1567,18 +1577,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1591,9 +1601,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1601,15 +1611,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1618,15 +1628,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -1635,15 +1645,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -1653,9 +1663,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1716,6 +1726,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" version = "0.3.1" @@ -1735,9 +1751,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1745,7 +1761,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.0.0", "slab", "tokio", "tokio-util", @@ -1859,9 +1875,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1870,9 +1886,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1887,9 +1903,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1914,7 +1930,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1923,29 +1939,30 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", - "rustls", + "rustls 0.21.10", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1965,9 +1982,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2011,9 +2028,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -2033,9 +2050,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" @@ -2106,6 +2123,17 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "libsecp256k1" version = "0.6.0" @@ -2156,9 +2184,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -2244,38 +2272,26 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -2288,15 +2304,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.2.1" @@ -2354,6 +2361,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -2424,6 +2442,15 @@ dependencies = [ "num_enum_derive 0.6.1", ] +[[package]] +name = "num_enum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", +] + [[package]] name = "num_enum_derive" version = "0.5.11" @@ -2448,12 +2475,33 @@ dependencies = [ "syn 2.0.28", ] +[[package]] +name = "num_enum_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", +] + [[package]] name = "number_prefix" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -2489,20 +2537,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "os_str_bytes" -version = "6.5.1" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "parking_lot" @@ -2511,21 +2548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2547,6 +2570,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.4.0" @@ -2576,9 +2605,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -2591,9 +2620,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2624,6 +2653,19 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "poc_tests" +version = "0.1.0" +dependencies = [ + "anchor-spl", + "assert_matches", + "escrow", + "fehler", + "program_client", + "rstest 0.12.0", + "trdelnik-client", +] + [[package]] name = "polyval" version = "0.5.3" @@ -2638,9 +2680,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -2719,7 +2767,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls", + "rustls 0.20.9", "thiserror", "tokio", "tracing", @@ -2728,15 +2776,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls", + "rustls 0.20.9", "rustls-native-certs", "slab", "thiserror", @@ -2753,7 +2801,7 @@ checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ "libc", "quinn-proto", - "socket2", + "socket2 0.4.9", "tracing", "windows-sys 0.42.0", ] @@ -2885,37 +2933,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.25", + "ring 0.16.20", + "time 0.3.30", "yasna", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.10", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -2950,15 +2998,15 @@ checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "relative-path" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" +checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "async-compression", "base64 0.21.2", @@ -2978,20 +3026,21 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.10", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.3", "winreg", ] @@ -3004,21 +3053,35 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3036,9 +3099,9 @@ dependencies = [ [[package]] name = "rstest" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b96577ca10cb3eade7b337eb46520108a67ca2818a24d0b63f41fd62bc9651c" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ "futures", "futures-timer", @@ -3048,9 +3111,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e674cf31712b8bb15fdbca3ec0c1b9d825c5a24407ff2b7e005fb6a29ba03" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" dependencies = [ "cfg-if", "glob", @@ -3065,12 +3128,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3105,11 +3168,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.6" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee020b1716f0a80e2ace9b03441a749e402e86712f15f16fe8a8f75afac732f" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", @@ -3118,16 +3181,28 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.3", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -3142,13 +3217,23 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.3", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -3198,12 +3283,12 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] @@ -3240,9 +3325,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.181" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3e73c93c3240c0bda063c239298e633114c69a888c3e37ca8bb33f343e9890" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -3258,9 +3343,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.181" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be02f6cb0cd3a5ec20bbcfbcbd749f57daddb1a0882dc2e46a6c236c90b977ed" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -3314,9 +3399,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ "indexmap 2.0.0", "itoa", @@ -3335,7 +3420,7 @@ dependencies = [ "futures", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot", "serial_test_derive", ] @@ -3449,9 +3534,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3472,11 +3557,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "solana-account-decoder" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abdbb3f97298a86fd5a885eac55786a5853885817e5e9f3c427ee3651a81636d" +checksum = "850d5d9dc8fa6ea42f4e61c78e296bbbce5a3531ff4cb3c58ef36ee31781049c" dependencies = [ "Inflector", "base64 0.21.2", @@ -3498,14 +3593,14 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282e7e0a459a3461f8dd83eb0609006ec8decf53e6a0cdbc2f2502fe4dc29e97" +checksum = "8a7f867cde478a078d4c4ceb113f4f9ac7e29c2efea98f80a2b30cdcd7be83c5" dependencies = [ "bincode", "bytemuck", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -3519,9 +3614,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33aa7ffd67c78e34c982c5cd0be7a8f9c4caec21ef1c38adc732c61cd38cef36" +checksum = "c3c99636da9a4acad58d0e8142e36395ece48fc41c396e297e702b6a789b190f" dependencies = [ "chrono", "clap 2.34.0", @@ -3537,9 +3632,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332057b0777bbb8c16181e19bbfdd0e36a6db7ee23182493a8a193a89b2f5e06" +checksum = "7ae4ba224e834b5d71c884a356bf1e23b5999ef4edd8996a42a8ac0dd680315b" dependencies = [ "dirs-next", "lazy_static", @@ -3553,9 +3648,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef678df03487a0b3895fcffb930bd49871f2b7dd6bb8002baece3b7b6967be94" +checksum = "56d56e77a341047880483438de34a5dea76eb79449ea9f969422710fb7f932b6" dependencies = [ "Inflector", "base64 0.21.2", @@ -3575,14 +3670,14 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "solana-vote-program", - "spl-memo", + "spl-memo 3.0.1", ] [[package]] name = "solana-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5bbde351def5eb2df5fbb4903d5f8e891eaa643c63f654b4a9eb6fa08e88d7" +checksum = "acc7a437165d8fcfac3c63963e394f0ea497b5d2a75159bb3a1ed75dbeb36a7e" dependencies = [ "async-trait", "bincode", @@ -3613,9 +3708,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d4fb0fa3a1714da0b03befc861aa851bb2d7b446c4eb0a3a55db2f3d47fa3b" +checksum = "d6f9f2201c7e526581511fa6525e281518be5cabaee82bd5b29fe4b78744148d" dependencies = [ "bincode", "chrono", @@ -3627,9 +3722,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313fd8693ddfff8848b00993b4e7d785c9e5dd11e4ef65c20445b86ffc789d90" +checksum = "3ee52de352e10e53b252df0815d685a9c6f3e8d3baa0f65e214dfcd247db0e21" dependencies = [ "async-trait", "bincode", @@ -3648,9 +3743,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33ec119dc1bb0395b50d389d31ee6015cc81570d31f19cb3dca0ffff5f8f117" +checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" dependencies = [ "ahash 0.8.3", "blake3", @@ -3681,9 +3776,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1feba80a564f52092da4c8a93bebc66f39665ebefd02d93bd54ef10453f179d" +checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -3693,9 +3788,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853aab82ead804a201f0edb036e5ff73b9bc8e97d9c1b9b91aeee2f6435073a2" +checksum = "c00faf7aa6a3f47c542bd45d2d7f13af9a382d993e647976a676fe1b0eec4eb2" dependencies = [ "env_logger", "lazy_static", @@ -3704,9 +3799,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9baba2de183b0f53e7ef67514a621598a4f83e438223b7d6a98118a0c8785e52" +checksum = "0e19c6e1b35df3c212619a7995ae3576fa92ab15ecfc065899f21385cbe45c95" dependencies = [ "log", "solana-sdk", @@ -3714,9 +3809,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354797e12eb6e93514074210e905ddd77faecf3ea3fdf414aac18a8290c3e5bb" +checksum = "10e62760a5f87d836169eb3bb446bae174181db07d2c8016be36de49c04fd432" dependencies = [ "crossbeam-channel", "gethostname", @@ -3728,9 +3823,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6666d2ab4fa92f26cfda1407f5a893237eebb3e71b475816d348b36991ad0f42" +checksum = "308c4c36c634d418589cf1df121d143819feff81932de81640de3d64878934eb" dependencies = [ "bincode", "clap 3.2.25", @@ -3740,7 +3835,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_derive", - "socket2", + "socket2 0.4.9", "solana-logger", "solana-sdk", "solana-version", @@ -3750,9 +3845,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdd389a7bbf6850ef8e0c391aeb5fdcd3e1017578087dc01b1f7b8b9a68a32" +checksum = "a4d44a4998ba6d9b37e89399d9ce2812e84489dd4665df619fb23366e1c2ec1b" dependencies = [ "ahash 0.8.3", "bincode", @@ -3777,9 +3872,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afaa80737c3f26927df136e46b568525709371a5e161e1f490f1dd5defe9698" +checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" dependencies = [ "ark-bn254", "ark-ec", @@ -3791,6 +3886,7 @@ dependencies = [ "bitflags 1.3.2", "blake3", "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -3807,9 +3903,9 @@ dependencies = [ "log", "memoffset 0.9.0", "num-bigint 0.4.3", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -3831,9 +3927,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1856d8d16b0cabb912c3a71f6579efcc2a918d9325b27d62a45a38a8958fe3a" +checksum = "05813d4d2e141ab4449cf684cc5b05512dfaabb7251561c5bb1ccf1e4221b210" dependencies = [ "base64 0.21.2", "bincode", @@ -3842,7 +3938,7 @@ dependencies = [ "itertools", "libc", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "percentage", "rand 0.7.3", @@ -3859,9 +3955,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca89d4d7faa19562747e7a7cad85abf089ba3c6e00c16196c3627e17b7f5e6" +checksum = "7cd0753cdde1710f50d58bd40a45e58f5368a25dabff6b18ba635c3d6959a558" dependencies = [ "crossbeam-channel", "futures-util", @@ -3884,9 +3980,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a348eaf9aa4a5cb0139c6af7a09e49a326c25e95a14b3fb9a7d755d47cf7fc0a" +checksum = "212d96abde446eaa903d16961cfd3a6e98dc0d680b9edd61c39938c61548d53e" dependencies = [ "async-mutex", "async-trait", @@ -3898,7 +3994,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rcgen", - "rustls", + "rustls 0.20.9", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -3912,9 +4008,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b098bb5f50ee2d6eefa38c908a390cc6c52e08421c745186264fd67cb7bb1b" +checksum = "82ab62fc62458271d746678a3f5625e1654e3cb42a8f318ef4f1ea25991bb085" dependencies = [ "lazy_static", "num_cpus", @@ -3922,16 +4018,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65dc97db0e3fad44e840711fb6a0f2b81d8f4a09611528b3cb177cebedad22bf" +checksum = "863f10b8c2a893d1ec85b3ae8020c714512a67302b80c24dde0016eea4034a7c" dependencies = [ "console", "dialoguer", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -3941,9 +4037,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8644c6d89367636e7361dd04703ab16bb7ec1f1470d632f957cc30b83beeb7f8" +checksum = "df04998cef2d0fe1291599b69acafc7f8cd87305d7f1525c8ae10aef1cc5411c" dependencies = [ "async-trait", "base64 0.21.2", @@ -3967,9 +4063,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d44573a6fc4d2467e1434b065641d5b8019b35f671538a9425982cf7fddc421" +checksum = "5e2912ddbff841fbce1e30b0b9a420993c63b6cc7866e5f0af3740fcd6d85bb8" dependencies = [ "base64 0.21.2", "bs58 0.4.0", @@ -3989,9 +4085,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9252b4f5b0ad3c0cb79d30afb59019ca26ed8ce1f954c59df198a1e9431156" +checksum = "d31100f6cc340dd322f57d00a334fa0a96f628ba86b04fcda1f84307deb14c31" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4002,9 +4098,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f53c6ffc2ce2fd2594f6dc1eb1e459843b5f9b008aae10e1cb3d6fef58e63706" +checksum = "621e6973766420162541b26e7974783d32d5471571610da30c5bb0b6263046c9" dependencies = [ "assert_matches", "base64 0.21.2", @@ -4027,7 +4123,7 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "pbkdf2 0.11.0", @@ -4055,9 +4151,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e11e29d859ffa265e1abb6f7aa12afe6c34b64c75b56a80b777f8f957074ac" +checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.66", @@ -4068,9 +4164,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3098885b67cadc7b83aab0acd3a476fb24c3c637747ba5eed32dd511b86d9150" +checksum = "3942a60afb0282b07ef0f3c32078145ab7545cbed2cac98f1ec4b9f63016df62" dependencies = [ "async-channel", "bytes", @@ -4090,7 +4186,7 @@ dependencies = [ "quinn-udp", "rand 0.7.3", "rcgen", - "rustls", + "rustls 0.20.9", "solana-metrics", "solana-perf", "solana-sdk", @@ -4101,9 +4197,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98c7fa5b031439428a35158d69c131e75805d20f61aea1196706822bc14ac90" +checksum = "d712aaf7701a4504521fc09f1743c647edf596e3852a64f6d66b2e5a822388f8" dependencies = [ "bincode", "log", @@ -4116,9 +4212,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c2ff3d859aea2a175a77b612127b13a969430900b64e865ee39b03c0b4170" +checksum = "48cb32f7443f80cb45e244d514a706b030b5a71ef86b0436c1d39cbfff5491b4" dependencies = [ "async-trait", "bincode", @@ -4141,9 +4237,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6590fe4ed93087f6fbd069659d89bacc5edee9493b95e23e016d30aad3dcd059" +checksum = "8aed485ddb4268b4e4ec64012016cd54ba3a4142377a99706fc3ab7768eb2bea" dependencies = [ "Inflector", "base64 0.21.2", @@ -4159,7 +4255,7 @@ dependencies = [ "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account 1.1.3", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "spl-token-2022 0.6.1", "thiserror", @@ -4167,9 +4263,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1e4d8b26360621b08d899b306db9c855fed7c3b7e325bd585e62ba068b2ba2" +checksum = "0c92798affef44c1ae2a694006209608044e99106b7945966d53586f5a95d9e2" dependencies = [ "async-trait", "solana-connection-cache", @@ -4182,9 +4278,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c563989feb6af907aada46d81680dd5982511f6fc793cdf09a674d69725b5bb0" +checksum = "a80a20dfea2afed91761ab3fecc8f96b973a742dc7728f3e343711efe6e8e05f" dependencies = [ "log", "rustc_version", @@ -4198,13 +4294,13 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4509784e34e7f85458108370b7f80c2a67f8e8415468201791e8ab8676a6f03c" +checksum = "ab8b719e077cc9e42b8965dd06ff6b5f09fa2a436f2297efdcf471c05d187a6c" dependencies = [ "bincode", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -4220,9 +4316,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dec0724d3b8c469aafe87c97703ed1f9ddde5ce5df1419fd3d7018d3a41486e" +checksum = "61aabdec9fe1b311dce5d21fa5bd58fbaa985e8003e0d0aedf3795113aacc1ea" dependencies = [ "aes-gcm-siv", "base64 0.21.2", @@ -4234,7 +4330,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive", + "num-derive 0.3.3", "num-traits", "rand 0.7.3", "serde", @@ -4249,9 +4345,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" dependencies = [ "byteorder", "combine", @@ -4272,6 +4368,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.5.4" @@ -4290,7 +4392,7 @@ checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", "borsh 0.9.3", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program", "spl-token 3.5.0", @@ -4300,17 +4402,17 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02693d7b36cea2b45318b87f22406909879226963296f31f4ebb0fc7f6e1aeb3" +checksum = "477696277857a7b2c17a6f7f3095e835850ad1c0f11637b5bd2693ca777d8546" dependencies = [ "assert_matches", "borsh 0.10.3", - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-token 4.0.0", - "spl-token-2022 0.7.0", + "spl-token-2022 0.8.0", "thiserror", ] @@ -4327,9 +4429,9 @@ dependencies = [ [[package]] name = "spl-discriminator-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fa8f409b5c5e0ac571df17c981ae1424b204743daa4428430627d38717caf5" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" dependencies = [ "quote 1.0.32", "spl-discriminator-syn", @@ -4338,13 +4440,13 @@ dependencies = [ [[package]] name = "spl-discriminator-syn" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21968d7da2f0a624c509f24580c3fee70b364a6886d90709e679e64f572eca2f" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "solana-program", + "sha2 0.10.7", "syn 2.0.28", "thiserror", ] @@ -4358,13 +4460,35 @@ dependencies = [ "solana-program", ] +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + [[package]] name = "spl-program-error" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af92f74cd3b0fdfda59fef4b571a92123e4df0f67cc43f73163975d31118ef82" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-program-error-derive", @@ -4373,24 +4497,26 @@ dependencies = [ [[package]] name = "spl-program-error-derive" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173f3cc506847882189b3a5b67299f617fed2f9730f122dd197b82e1e213dee5" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", + "sha2 0.10.7", "syn 2.0.28", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82149a5a06b5f158d03904066375eaf0c8a2422557cc3d5a25d277260d9a3b16" +checksum = "7960b1e1a41e4238807fca0865e72a341b668137a3f2ddcd770d04fd1b374c96" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", "spl-type-length-value", ] @@ -4403,7 +4529,7 @@ checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", @@ -4418,7 +4544,7 @@ checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "solana-program", @@ -4433,71 +4559,81 @@ checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24ac5786a3fefbf59f5606312c61abf87b23154e7a717e5d18216fbea4711db" +checksum = "84fc0c7a763c3f53fa12581d07ed324548a771bb648a1217e4f330b1d0a59331" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.4.1", "num-traits", - "num_enum 0.6.1", + "num_enum 0.7.1", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 4.0.0", + "spl-pod", "spl-token 4.0.0", + "spl-token-metadata-interface", "spl-transfer-hook-interface", + "spl-type-length-value", "thiserror", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + [[package]] name = "spl-transfer-hook-interface" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2326852adf88716fbac7f54cd6ee2c8a0b5a14ede24db3b4519c4ff13df04b" +checksum = "f7489940049417ae5ce909314bead0670e2a5ea5c82d43ab96dc15c8fcbbccba" dependencies = [ "arrayref", "bytemuck", - "num-derive", - "num-traits", - "num_enum 0.6.1", "solana-program", "spl-discriminator", + "spl-pod", + "spl-program-error", "spl-tlv-account-resolution", "spl-type-length-value", - "thiserror", ] [[package]] name = "spl-type-length-value" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d085f426b33b8365fb98383d1b8b3925e21bdfe579c851ceaa7f511dbec191" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.8.0" @@ -4561,11 +4697,32 @@ dependencies = [ "unicode-xid 0.2.4", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", @@ -4631,12 +4788,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -4644,15 +4802,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -4693,33 +4851,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.14.1" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.4", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -4728,16 +4885,26 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -4752,19 +4919,19 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.20.9", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -4809,11 +4976,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4821,9 +4987,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -4832,9 +4998,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] @@ -4854,9 +5020,10 @@ dependencies = [ "heck 0.4.1", "lazy_static", "log", + "pathdiff", "quote 1.0.32", "rand 0.8.5", - "rstest 0.18.1", + "rstest 0.18.2", "serde", "serde_json", "serial_test", @@ -4865,7 +5032,7 @@ dependencies = [ "solana-cli-output", "solana-sdk", "solana-transaction-status", - "spl-associated-token-account 2.0.0", + "spl-associated-token-account 2.1.0", "spl-token 4.0.0", "syn 1.0.109", "thiserror", @@ -4884,23 +5051,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "trdelnik-tests" -version = "0.1.0" -dependencies = [ - "anchor-spl", - "escrow", - "fehler", - "program_client", - "rstest 0.12.0", - "trdelnik-client", -] - [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -4915,13 +5070,13 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.20.9", "sha-1", "thiserror", "url", "utf-8", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -4932,9 +5087,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -4959,9 +5114,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -4996,9 +5151,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -5006,6 +5161,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -5018,9 +5179,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -5156,12 +5317,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] @@ -5173,6 +5334,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "winapi" version = "0.3.9" @@ -5205,10 +5372,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "af6041b3f84485c21b57acdc0fee4f4f0c93f426053dc05fa5d6fc262537bbff" dependencies = [ "windows-targets 0.48.1", ] @@ -5246,6 +5413,15 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -5276,6 +5452,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5288,6 +5479,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5300,6 +5497,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5312,6 +5515,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5324,6 +5533,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5336,6 +5551,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5348,6 +5569,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -5360,6 +5587,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.5.3" @@ -5371,11 +5604,12 @@ dependencies = [ [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -5393,7 +5627,7 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.30", ] [[package]] @@ -5402,7 +5636,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.25", + "time 0.3.30", ] [[package]] @@ -5446,11 +5680,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/examples/escrow/Cargo.toml b/examples/escrow/Cargo.toml index fbe457ec..bd2c6b66 100644 --- a/examples/escrow/Cargo.toml +++ b/examples/escrow/Cargo.toml @@ -1,2 +1,2 @@ [workspace] -members = ["programs/*", "trdelnik-tests"] +members = ["programs/*", "trdelnik-tests/poc_tests"] diff --git a/examples/escrow/Trdelnik.toml b/examples/escrow/Trdelnik.toml index e69de29b..e6803594 100644 --- a/examples/escrow/Trdelnik.toml +++ b/examples/escrow/Trdelnik.toml @@ -0,0 +1,30 @@ +[test] +validator_startup_timeout = 15000 + + +# contains default values +[fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) +iterations = 0 +# 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) +keep_output = false +# Disable ANSI console; use simple log output (default: false) +verbose = false +# Exit upon seeing the first crash (default: false) +exit_upon_crash = false +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false diff --git a/examples/escrow/trdelnik-tests/Cargo.toml b/examples/escrow/trdelnik-tests/Cargo.toml deleted file mode 100644 index 437ada3a..00000000 --- a/examples/escrow/trdelnik-tests/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "trdelnik-tests" -version = "0.1.0" -description = "Created with Trdelnik" -edition = "2021" - -[dependencies] -anchor-spl = "0.28.0" - -[dependencies.trdelnik-client] -path = "../../../crates/client" - -[dependencies.program_client] -path = "../.program_client" - -[dependencies.escrow] -path = "../programs/escrow" - -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" diff --git a/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml b/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml new file mode 100644 index 00000000..6083c8da --- /dev/null +++ b/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "poc_tests" +version = "0.1.0" +edition = "2018" + +[dev-dependencies] +assert_matches = "1.4.0" +fehler = "1.0.0" +anchor-spl = "0.28.0" +rstest = "0.12.0" + +[dev-dependencies.trdelnik-client] +path = "../../../../crates/client" + +[dev-dependencies.program_client] +path = "../../.program_client" + +[dev-dependencies.escrow] +path = "../../programs/escrow" diff --git a/examples/escrow/trdelnik-tests/tests/test.rs b/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs similarity index 99% rename from examples/escrow/trdelnik-tests/tests/test.rs rename to examples/escrow/trdelnik-tests/poc_tests/tests/test.rs index 8d466af7..c7e3b090 100644 --- a/examples/escrow/trdelnik-tests/tests/test.rs +++ b/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs @@ -1,7 +1,6 @@ use anchor_spl::token; use fehler::throws; -use program_client::*; -// use program_client::escrow_instruction; +use program_client::escrow_instruction; use trdelnik_client::{anyhow::Result, *}; #[throws] diff --git a/examples/fuzzer/.program_client/Cargo.toml b/examples/fuzzer/.program_client/Cargo.toml index f8ae750e..1125d193 100644 --- a/examples/fuzzer/.program_client/Cargo.toml +++ b/examples/fuzzer/.program_client/Cargo.toml @@ -5,6 +5,7 @@ edition = "2018" [dependencies.trdelnik-client] path = "../../../crates/client" + [dependencies.fuzzer] path = "../programs/fuzzer" features = ["no-entrypoint"] diff --git a/examples/fuzzer/Cargo.lock b/examples/fuzzer/Cargo.lock index cde39b7a..ebbe3fc4 100644 --- a/examples/fuzzer/Cargo.lock +++ b/examples/fuzzer/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -270,12 +279,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -302,9 +305,9 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" dependencies = [ "derive_arbitrary", ] @@ -463,7 +466,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.30", ] [[package]] @@ -508,9 +511,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.15" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "brotli", "flate2", @@ -531,9 +534,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -557,6 +560,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -598,9 +616,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitmaps" @@ -742,9 +760,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -753,9 +771,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -820,9 +838,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2" @@ -866,9 +884,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] @@ -905,13 +923,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", + "num-integer", "num-traits", "serde", "time 0.1.45", @@ -992,9 +1010,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1046,9 +1064,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1056,9 +1074,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" @@ -1253,22 +1271,22 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -1295,9 +1313,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivation-path" @@ -1318,9 +1339,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -1487,9 +1508,9 @@ dependencies = [ [[package]] name = "educe" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079044df30bb07de7d846d41a184c4b00e66ebdac93ee459253474f3a47e50ae" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ "enum-ordinalize", "proc-macro2 1.0.66", @@ -1511,9 +1532,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -1540,9 +1561,9 @@ dependencies = [ [[package]] name = "enum-ordinalize" -version = "3.1.13" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f76552f53cefc9a7f64987c3701b99d982f7690606fd67de1d09712fbf52f1" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ "num-bigint 0.4.3", "num-traits", @@ -1572,23 +1593,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1599,9 +1609,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "feature-probe" @@ -1631,21 +1641,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1659,18 +1669,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1683,9 +1693,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1693,15 +1703,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1710,15 +1720,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -1727,15 +1737,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -1745,9 +1755,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1761,6 +1771,30 @@ dependencies = [ "slab", ] +[[package]] +name = "fuzz_0" +version = "0.1.0" +dependencies = [ + "arbitrary", + "assert_matches", + "fuzzer", + "honggfuzz", + "program_client", + "trdelnik-client", +] + +[[package]] +name = "fuzz_1" +version = "0.1.0" +dependencies = [ + "arbitrary", + "assert_matches", + "fuzzer", + "honggfuzz", + "program_client", + "trdelnik-client", +] + [[package]] name = "fuzzer" version = "0.1.0" @@ -1815,6 +1849,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" version = "0.3.1" @@ -1834,9 +1874,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1844,10 +1884,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", - "tokio-util 0.7.2", + "tokio-util 0.7.10", "tracing", ] @@ -1889,9 +1929,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -1973,9 +2013,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1984,9 +2024,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -2028,7 +2068,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -2037,29 +2077,30 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", - "rustls", + "rustls 0.21.10", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -2079,9 +2120,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2105,9 +2146,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9d968042a4902e08810946fc7cd5851eb75e80301342305af755ca06cb82ce" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" [[package]] name = "indexmap" @@ -2121,19 +2162,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -2153,9 +2194,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" @@ -2222,9 +2263,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] [[package]] name = "libsecp256k1" @@ -2276,9 +2328,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -2393,24 +2445,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] @@ -2436,16 +2477,15 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -2458,15 +2498,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.2.1" @@ -2524,6 +2555,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -2594,6 +2636,15 @@ dependencies = [ "num_enum_derive 0.6.1", ] +[[package]] +name = "num_enum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", +] + [[package]] name = "num_enum_derive" version = "0.5.11" @@ -2618,12 +2669,33 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "num_enum_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +dependencies = [ + "proc-macro-crate 2.0.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + [[package]] name = "number_prefix" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -2678,9 +2750,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "os_str_bytes" -version = "6.5.1" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "ouroboros" @@ -2705,17 +2777,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -2723,21 +2784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2759,6 +2806,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.4.0" @@ -2788,9 +2841,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -2823,9 +2876,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2870,9 +2923,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -2902,7 +2961,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -2975,7 +3044,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls", + "rustls 0.20.9", "thiserror", "tokio", "tracing", @@ -2984,16 +3053,16 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "arbitrary", "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls", + "rustls 0.20.9", "rustls-native-certs", "slab", "thiserror", @@ -3010,7 +3079,7 @@ checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ "libc", "quinn-proto", - "socket2", + "socket2 0.4.10", "tracing", "windows-sys 0.42.0", ] @@ -3142,37 +3211,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.25", + "ring 0.16.20", + "time 0.3.30", "yasna", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.10", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] @@ -3213,9 +3282,9 @@ checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "async-compression", "base64 0.21.2", @@ -3235,20 +3304,21 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.10", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", - "tokio-rustls", - "tokio-util 0.7.2", + "tokio-rustls 0.24.1", + "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.3", "winreg", ] @@ -3261,34 +3331,35 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] [[package]] -name = "rpassword" -version = "7.2.0" +name = "ring" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ + "cc", + "getrandom 0.2.10", "libc", - "rtoolbox", - "winapi", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", ] [[package]] -name = "rstest" -version = "0.12.0" +name = "rpassword" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d912f35156a3f99a66ee3e11ac2e0b3f34ac85a07e05263d05a7e2c8810d616f" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ - "cfg-if", - "proc-macro2 1.0.66", - "quote 1.0.33", - "rustc_version", - "syn 1.0.109", + "libc", + "rtoolbox", + "windows-sys 0.48.0", ] [[package]] @@ -3322,12 +3393,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3362,29 +3433,41 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -3399,13 +3482,23 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -3464,12 +3557,12 @@ dependencies = [ [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -3506,9 +3599,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.185" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -3524,9 +3617,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -3580,11 +3673,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -3597,11 +3690,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ - "dashmap 5.5.0", + "dashmap 5.5.3", "futures", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot", "serial_test_derive", ] @@ -3675,9 +3768,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -3724,9 +3817,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3739,19 +3832,29 @@ checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "solana-account-decoder" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c387acc1a8ce38f65fe35690a5afd16f0d4c943067cf2db133e7120a38a1c423" +checksum = "850d5d9dc8fa6ea42f4e61c78e296bbbce5a3531ff4cb3c58ef36ee31781049c" dependencies = [ "Inflector", "base64 0.21.2", @@ -3773,14 +3876,14 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f011a61ab6a61f5e6eec41d862e1451d2e0937e2829429f75a17c460858b1" +checksum = "8a7f867cde478a078d4c4ceb113f4f9ac7e29c2efea98f80a2b30cdcd7be83c5" dependencies = [ "bincode", "bytemuck", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -3794,9 +3897,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526d5731217a0702eecbb49a4a0a9f106d72e5077e658ef57688b3d9efe6e3f5" +checksum = "a46f22d9f8a0b253165260f44c360dd6a2a49b2731f18cbfda818e3ae0ad9112" dependencies = [ "borsh 0.10.3", "futures", @@ -3811,9 +3914,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f92c8e8baddeb229acbe96be4a919d7f186e05c8f8fc2ad51d0b634816a5c9b" +checksum = "068d206e9fb611684b61c95b7692d099a89b28e6e376fa0f17620198539de371" dependencies = [ "serde", "solana-sdk", @@ -3822,9 +3925,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad49dc8e38a9f4cced3f297a4242a1eea325cf5de9d8f7af8c1fe951d348cd8" +checksum = "4e04de401b9177ef6016f24693b871e9f7c47b49a98e3ee1b794f2ae2cfa2438" dependencies = [ "bincode", "crossbeam-channel", @@ -3841,9 +3944,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476efcec2fd6899d1a8b3378bd4e4420d248cd4369217012129efcff528da691" +checksum = "1eaf42dbfe8a42b80e24f2c087a3935d6e7bb49886313b006d88fb04fdc2a02f" dependencies = [ "bincode", "byteorder", @@ -3860,9 +3963,9 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3faa5818fcdf97f58a75ff20a06ce51cf40e3593b3db6fd08a42f8539e18ddc" +checksum = "e050e58ea0c422f9db10d987b2a10992f103209454f70d54f6208b14ec5546a0" dependencies = [ "bv", "log", @@ -3877,9 +3980,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1752e9fe9fb659ab0318cb6aef6b2aa7e0317be5fe7f4e3f74e09c42a4572ec5" +checksum = "c3c99636da9a4acad58d0e8142e36395ece48fc41c396e297e702b6a789b190f" dependencies = [ "chrono", "clap 2.34.0", @@ -3895,9 +3998,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e11f44bc4e5d722f536b94765cfaa0ee1222169fcb172535f519d33fa675b5c" +checksum = "7ae4ba224e834b5d71c884a356bf1e23b5999ef4edd8996a42a8ac0dd680315b" dependencies = [ "dirs-next", "lazy_static", @@ -3911,9 +4014,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fddec6e6e80282ac6f5948cb269e554edc74d1d1024d5a3d94be1b0e029bafa" +checksum = "56d56e77a341047880483438de34a5dea76eb79449ea9f969422710fb7f932b6" dependencies = [ "Inflector", "base64 0.21.2", @@ -3933,14 +4036,14 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "solana-vote-program", - "spl-memo", + "spl-memo 3.0.1", ] [[package]] name = "solana-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e17610496b75585f40b4a26b2a54b07a468d62f09f22c18ed966e6a9006cd74" +checksum = "acc7a437165d8fcfac3c63963e394f0ea497b5d2a75159bb3a1ed75dbeb36a7e" dependencies = [ "async-trait", "bincode", @@ -3971,9 +4074,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9c9031bbf2a774ace3ec991f6b0019134a30e7dafb50b3ede4f2df32c85d5a" +checksum = "98c90fdaafdc41a4ba0a760af5491bd79f02d1d1eae6926b7796561681c843e4" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -3981,9 +4084,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a707c726e0f1a6764f11fd6c25e129d1fe16dc14a641b7d5f23ab6a1c1f583" +checksum = "d6f9f2201c7e526581511fa6525e281518be5cabaee82bd5b29fe4b78744148d" dependencies = [ "bincode", "chrono", @@ -3995,9 +4098,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6024d0046d3672476cafc1d302599b936b9efb69ce1c41efc98b6a9554d07af" +checksum = "3ee52de352e10e53b252df0815d685a9c6f3e8d3baa0f65e214dfcd247db0e21" dependencies = [ "async-trait", "bincode", @@ -4016,9 +4119,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89ed0a4ba426c461866700f082a00d490e4bde6d27d2d88e129acb3fde79054" +checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" dependencies = [ "ahash 0.8.3", "blake3", @@ -4049,9 +4152,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69dd83d2d675cad4ed0f0086a7d0c669dc407213b4bc916555ed329ea93f531" +checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -4061,9 +4164,9 @@ dependencies = [ [[package]] name = "solana-loader-v4-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b058e4cad9057315272cda2d2693ab39d49a1448ad4e8c3211b7389c61678c47" +checksum = "a4f1e56ce753307a1b169ad2ef3b9af024c93d4db6f6cd6659794c57635f32ff" dependencies = [ "log", "rand 0.7.3", @@ -4075,9 +4178,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2d34ee6f40d1be05852e9e442b7b3ead2c2ec6fef567079c1c0a4b3d3b8eb3" +checksum = "c00faf7aa6a3f47c542bd45d2d7f13af9a382d993e647976a676fe1b0eec4eb2" dependencies = [ "env_logger", "lazy_static", @@ -4086,9 +4189,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848131da616377ecef14f84424f5c28cbffbd0018148452a278d8bc9e5c91399" +checksum = "0e19c6e1b35df3c212619a7995ae3576fa92ab15ecfc065899f21385cbe45c95" dependencies = [ "log", "solana-sdk", @@ -4096,9 +4199,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24707f323c8fcbd3f05b6353ec917188aff73ade879dd9bfdaec18f13dde24a" +checksum = "10e62760a5f87d836169eb3bb446bae174181db07d2c8016be36de49c04fd432" dependencies = [ "crossbeam-channel", "gethostname", @@ -4110,9 +4213,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec117234c551f3b93c7710e800b1786a5226cd62ce80f935b5a43f3a2c9d3" +checksum = "308c4c36c634d418589cf1df121d143819feff81932de81640de3d64878934eb" dependencies = [ "bincode", "clap 3.2.25", @@ -4122,7 +4225,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_derive", - "socket2", + "socket2 0.4.10", "solana-logger", "solana-sdk", "solana-version", @@ -4132,9 +4235,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27fb0d9be450228c6eb03808a3e87fb7df61f7d96a042d9967f921a6caea2fe6" +checksum = "a4d44a4998ba6d9b37e89399d9ce2812e84489dd4665df619fb23366e1c2ec1b" dependencies = [ "ahash 0.8.3", "bincode", @@ -4159,9 +4262,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38a798723409541aae8ddc9b69c4c78b798e6c219e3e526b5bd4280974a5f29" +checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" dependencies = [ "ark-bn254", "ark-ec", @@ -4190,9 +4293,9 @@ dependencies = [ "log", "memoffset 0.9.0", "num-bigint 0.4.3", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -4214,9 +4317,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2f1803db91cd46bef3b84c5fceff2b5278b0daa651be20c5ec81a37cbccf4d" +checksum = "05813d4d2e141ab4449cf684cc5b05512dfaabb7251561c5bb1ccf1e4221b210" dependencies = [ "base64 0.21.2", "bincode", @@ -4225,7 +4328,7 @@ dependencies = [ "itertools", "libc", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "percentage", "rand 0.7.3", @@ -4242,9 +4345,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a557d319cecaed9a68b88f20c558103b7c43f1e797fc3f11127951c1b62038" +checksum = "ff9f8e67fdf7306ae8ff3bb546534ecf064e6ed38e0489fee3579fa1016bd645" dependencies = [ "assert_matches", "async-trait", @@ -4269,9 +4372,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "591cc19e71fca27a344cb08ae6e906f8b2e8cfa10e9cc74a0676044b157e3506" +checksum = "7cd0753cdde1710f50d58bd40a45e58f5368a25dabff6b18ba635c3d6959a558" dependencies = [ "crossbeam-channel", "futures-util", @@ -4294,9 +4397,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05db835947c6623c86ef3b21baf388ea016e03039252fcf20a2789fce4962eb1" +checksum = "212d96abde446eaa903d16961cfd3a6e98dc0d680b9edd61c39938c61548d53e" dependencies = [ "async-mutex", "async-trait", @@ -4308,7 +4411,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rcgen", - "rustls", + "rustls 0.20.9", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -4322,9 +4425,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111747d986e2d968084de753a8034d486471c6a6192a16c31ec1c2eee95b2d47" +checksum = "82ab62fc62458271d746678a3f5625e1654e3cb42a8f318ef4f1ea25991bb085" dependencies = [ "lazy_static", "num_cpus", @@ -4332,16 +4435,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e71075e996f5b9ac83f6fb068361fd2f4bcd7319832b3eea1ef2f705d84942b" +checksum = "863f10b8c2a893d1ec85b3ae8020c714512a67302b80c24dde0016eea4034a7c" dependencies = [ "console", "dialoguer", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -4351,9 +4454,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d9c7a14b02ace2d22838a2656512fd91003ebac59301fd898dcec4fcb87737" +checksum = "df04998cef2d0fe1291599b69acafc7f8cd87305d7f1525c8ae10aef1cc5411c" dependencies = [ "async-trait", "base64 0.21.2", @@ -4377,9 +4480,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7a807372d7b3e9b4b70189d311a3d7c734c9354d604befc5d099a097803192" +checksum = "5e2912ddbff841fbce1e30b0b9a420993c63b6cc7866e5f0af3740fcd6d85bb8" dependencies = [ "base64 0.21.2", "bs58 0.4.0", @@ -4399,9 +4502,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557b43c6fa4e364e9334900afb026998ec1d3a20f4471138f4744aa35abd7fb5" +checksum = "d31100f6cc340dd322f57d00a334fa0a96f628ba86b04fcda1f84307deb14c31" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4412,9 +4515,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b736ed27efa42c3baad5ab25fa1e53fa49f52855cb7f6aeee3a7168fc403bc" +checksum = "ebf6db318fd94457b1e69a481dcf43c6fd4f44e264b35f2489f0a1c6f7736e50" dependencies = [ "arrayref", "bincode", @@ -4437,7 +4540,7 @@ dependencies = [ "lz4", "memmap2", "modular-bitfield", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_cpus", "num_enum 0.6.1", @@ -4481,9 +4584,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce456629674fdba5556ab109baac6ef5fc4caf5d42e375a1e3c4413807f3e81c" +checksum = "621e6973766420162541b26e7974783d32d5471571610da30c5bb0b6263046c9" dependencies = [ "assert_matches", "base64 0.21.2", @@ -4506,7 +4609,7 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "pbkdf2 0.11.0", @@ -4534,9 +4637,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e5a8c7e9e91c7d35f24ffd47a04221f76edb9aba968d79ee10e1cb26f16d2f" +checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.66", @@ -4547,9 +4650,9 @@ dependencies = [ [[package]] name = "solana-send-transaction-service" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30194bffc07760335352d6fec3a8d65ab17ac653e2f60709a11099722d6f0fe" +checksum = "9f275f96dd61f421bda5c9cde7698d85348824f7fa2a8c4544ad24692ac50cd8" dependencies = [ "crossbeam-channel", "log", @@ -4563,9 +4666,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1716d64627a098bf7fc0807ac9a5dc616fe8ade48168f49f80c30c96b2009240" +checksum = "5421decf09671329c4786ed209acfe986bb51272f91e13e4744b13a69c800680" dependencies = [ "bincode", "log", @@ -4578,9 +4681,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54302d45994b8054f0a86f91684d11343de6dd1007919f8465b74845831012aa" +checksum = "3942a60afb0282b07ef0f3c32078145ab7545cbed2cac98f1ec4b9f63016df62" dependencies = [ "async-channel", "bytes", @@ -4600,7 +4703,7 @@ dependencies = [ "quinn-udp", "rand 0.7.3", "rcgen", - "rustls", + "rustls 0.20.9", "solana-metrics", "solana-perf", "solana-sdk", @@ -4611,9 +4714,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b322cdb3118f20472bca12ceb65c29d86f8dedd504591859eb30a904f2ea1c4" +checksum = "6101d189dc10a96388c695ca1d9f23f74f0fd96330f6adefafd7d6999a20ff6e" dependencies = [ "bincode", "log", @@ -4625,9 +4728,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ef9e0b5c06c4f573c7b8615dc5fefd55d8b7dbfded6fdf66bd45c0bac975ed" +checksum = "d712aaf7701a4504521fc09f1743c647edf596e3852a64f6d66b2e5a822388f8" dependencies = [ "bincode", "log", @@ -4640,9 +4743,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508f295dd72b0a2040322083ed88468a8ab6e5b51caaa34a8054b66452fac39a" +checksum = "48cb32f7443f80cb45e244d514a706b030b5a71ef86b0436c1d39cbfff5491b4" dependencies = [ "async-trait", "bincode", @@ -4665,9 +4768,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b24b10eecf139b2a47b6ccae13685e3c41458e871c57670f9963afe461659f8" +checksum = "8aed485ddb4268b4e4ec64012016cd54ba3a4142377a99706fc3ab7768eb2bea" dependencies = [ "Inflector", "base64 0.21.2", @@ -4683,7 +4786,7 @@ dependencies = [ "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account 1.1.3", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "spl-token-2022 0.6.1", "thiserror", @@ -4691,9 +4794,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01e752329901acdc2a788044253cdb9439c924832bca8a9c23112429477fd20" +checksum = "0c92798affef44c1ae2a694006209608044e99106b7945966d53586f5a95d9e2" dependencies = [ "async-trait", "solana-connection-cache", @@ -4706,9 +4809,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976a54918e3e5516e53825d1bfc5f728b97fada082e2cc2e203bd29f9b5640e7" +checksum = "a80a20dfea2afed91761ab3fecc8f96b973a742dc7728f3e343711efe6e8e05f" dependencies = [ "log", "rustc_version", @@ -4722,13 +4825,13 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8394fd700d24cd8505233fbf1cdb85fa6de1f40b3a48992ea8b3ee7b7dd28c97" +checksum = "ab8b719e077cc9e42b8965dd06ff6b5f09fa2a436f2297efdcf471c05d187a6c" dependencies = [ "bincode", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -4744,13 +4847,13 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9be05a31cac0e0fad15e198ac95e9c3f1bcce26c7834bcdfaefbead9c5ff2f" +checksum = "5404829f9236ac760a943a4e2f16be6f180ce4a07e1bbb9d538dcfa62b98888c" dependencies = [ "bytemuck", "getrandom 0.1.16", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program-runtime", "solana-sdk", @@ -4759,9 +4862,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.9" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de66fbc7bd6cc3177270cb6c157722fb33f8f2cd2c5c3ad555c6f558705678c4" +checksum = "61aabdec9fe1b311dce5d21fa5bd58fbaa985e8003e0d0aedf3795113aacc1ea" dependencies = [ "aes-gcm-siv", "base64 0.21.2", @@ -4773,7 +4876,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive", + "num-derive 0.3.3", "num-traits", "rand 0.7.3", "serde", @@ -4788,9 +4891,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" dependencies = [ "byteorder", "combine", @@ -4811,6 +4914,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.5.4" @@ -4829,7 +4938,7 @@ checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", "borsh 0.9.3", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program", "spl-token 3.5.0", @@ -4839,17 +4948,17 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02693d7b36cea2b45318b87f22406909879226963296f31f4ebb0fc7f6e1aeb3" +checksum = "477696277857a7b2c17a6f7f3095e835850ad1c0f11637b5bd2693ca777d8546" dependencies = [ "assert_matches", "borsh 0.10.3", - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-token 4.0.0", - "spl-token-2022 0.7.0", + "spl-token-2022 0.8.0", "thiserror", ] @@ -4866,9 +4975,9 @@ dependencies = [ [[package]] name = "spl-discriminator-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fa8f409b5c5e0ac571df17c981ae1424b204743daa4428430627d38717caf5" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" dependencies = [ "quote 1.0.33", "spl-discriminator-syn", @@ -4877,13 +4986,13 @@ dependencies = [ [[package]] name = "spl-discriminator-syn" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21968d7da2f0a624c509f24580c3fee70b364a6886d90709e679e64f572eca2f" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", - "solana-program", + "sha2 0.10.7", "syn 2.0.29", "thiserror", ] @@ -4897,13 +5006,35 @@ dependencies = [ "solana-program", ] +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + [[package]] name = "spl-program-error" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af92f74cd3b0fdfda59fef4b571a92123e4df0f67cc43f73163975d31118ef82" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-program-error-derive", @@ -4912,24 +5043,26 @@ dependencies = [ [[package]] name = "spl-program-error-derive" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173f3cc506847882189b3a5b67299f617fed2f9730f122dd197b82e1e213dee5" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", + "sha2 0.10.7", "syn 2.0.29", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82149a5a06b5f158d03904066375eaf0c8a2422557cc3d5a25d277260d9a3b16" +checksum = "7960b1e1a41e4238807fca0865e72a341b668137a3f2ddcd770d04fd1b374c96" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", "spl-type-length-value", ] @@ -4942,7 +5075,7 @@ checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", @@ -4957,7 +5090,7 @@ checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "solana-program", @@ -4972,62 +5105,78 @@ checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24ac5786a3fefbf59f5606312c61abf87b23154e7a717e5d18216fbea4711db" +checksum = "84fc0c7a763c3f53fa12581d07ed324548a771bb648a1217e4f330b1d0a59331" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.4.1", "num-traits", - "num_enum 0.6.1", + "num_enum 0.7.1", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 4.0.0", + "spl-pod", "spl-token 4.0.0", + "spl-token-metadata-interface", "spl-transfer-hook-interface", + "spl-type-length-value", "thiserror", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + [[package]] name = "spl-transfer-hook-interface" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2326852adf88716fbac7f54cd6ee2c8a0b5a14ede24db3b4519c4ff13df04b" +checksum = "f7489940049417ae5ce909314bead0670e2a5ea5c82d43ab96dc15c8fcbbccba" dependencies = [ "arrayref", "bytemuck", - "num-derive", - "num-traits", - "num_enum 0.6.1", "solana-program", "spl-discriminator", + "spl-pod", + "spl-program-error", "spl-tlv-account-resolution", "spl-type-length-value", - "thiserror", ] [[package]] name = "spl-type-length-value" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d085f426b33b8365fb98383d1b8b3925e21bdfe579c851ceaa7f511dbec191" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", ] @@ -5128,6 +5277,27 @@ dependencies = [ "unicode-xid 0.2.4", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tar" version = "0.4.40" @@ -5176,22 +5346,22 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -5254,12 +5424,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -5267,15 +5438,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -5316,33 +5487,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.14.1" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.5", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -5351,11 +5521,21 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + [[package]] name = "tokio-serde" version = "0.8.0" @@ -5374,9 +5554,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -5391,12 +5571,12 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.20.9", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5416,9 +5596,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -5446,11 +5626,22 @@ checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "toml_datetime", "winnow", ] @@ -5463,11 +5654,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -5476,9 +5666,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.33", @@ -5487,9 +5677,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -5510,9 +5700,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "sharded-slab", "thread_local", @@ -5536,10 +5726,11 @@ dependencies = [ "honggfuzz", "lazy_static", "log", + "pathdiff", "quinn-proto", "quote 1.0.33", "rand 0.8.5", - "rstest 0.18.2", + "rstest", "serde", "serde_json", "serial_test", @@ -5549,7 +5740,7 @@ dependencies = [ "solana-program-test", "solana-sdk", "solana-transaction-status", - "spl-associated-token-account 2.0.0", + "spl-associated-token-account 2.1.0", "spl-token 4.0.0", "syn 1.0.109", "thiserror", @@ -5568,23 +5759,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "trdelnik-tests" -version = "0.1.0" -dependencies = [ - "assert_matches", - "fehler", - "fuzzer", - "program_client", - "rstest 0.12.0", - "trdelnik-client", -] - [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -5599,13 +5778,13 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.20.9", "sha-1", "thiserror", "url", "utf-8", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -5616,9 +5795,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -5643,9 +5822,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -5680,9 +5859,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -5690,6 +5869,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -5702,9 +5887,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -5743,9 +5928,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -5856,12 +6041,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -5873,6 +6058,12 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "winapi" version = "0.3.9" @@ -5891,9 +6082,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -5905,10 +6096,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets 0.48.5", ] @@ -5946,6 +6137,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -5976,6 +6176,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5988,6 +6203,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -6000,6 +6221,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -6012,6 +6239,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -6024,6 +6257,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -6036,6 +6275,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -6048,6 +6293,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -6060,22 +6311,29 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -6093,16 +6351,18 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.25", + "time 0.3.30", ] [[package]] name = "xattr" -version = "1.0.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "a7dae5072fe1f8db8f8d29059189ac175196e410e40ba42d5d4684ae2f750995" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] @@ -6111,7 +6371,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.25", + "time 0.3.30", ] [[package]] @@ -6155,11 +6415,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/examples/fuzzer/Cargo.toml b/examples/fuzzer/Cargo.toml index 0f494a20..684a5d85 100644 --- a/examples/fuzzer/Cargo.toml +++ b/examples/fuzzer/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["programs/*", "trdelnik-tests"] +members = ["programs/*", "trdelnik-tests/fuzz_tests/fuzz_0", "trdelnik-tests/fuzz_tests/fuzz_1"] [profile.release] overflow-checks = true lto = "fat" diff --git a/examples/fuzzer/trdelnik-tests/Cargo.toml b/examples/fuzzer/trdelnik-tests/Cargo.toml deleted file mode 100644 index 82cd75c4..00000000 --- a/examples/fuzzer/trdelnik-tests/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "trdelnik-tests" -version = "0.1.0" -description = "Created with Trdelnik" -edition = "2021" - -[dependencies] -assert_matches = "1.4.0" - -[dependencies.trdelnik-client] -path = "../../../crates/client" -features = ["fuzzing"] - -[dependencies.program_client] -path = "../.program_client" - -[dependencies.fuzzer] -path = "../programs/fuzzer" - -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml new file mode 100644 index 00000000..ed495ad9 --- /dev/null +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml @@ -0,0 +1,23 @@ +[[bin]] +name = "fuzz_0" +path = "test_fuzz.rs" + +[package] +name = "fuzz_0" +version = "0.1.0" +edition = "2018" + +[dependencies] +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + +[dependencies.trdelnik-client] +path = "../../../../../crates/client" +features = ["fuzzing"] + +[dependencies.program_client] +path = "../../../.program_client" + +[dependencies.fuzzer] +path = "../../../programs/fuzzer" diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs new file mode 100644 index 00000000..846ffea4 --- /dev/null +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -0,0 +1,73 @@ +use fuzzer::entry; +use program_client::fuzzer_instruction::*; +use assert_matches::*; +use trdelnik_client::fuzzing::*; + +const PROGRAM_NAME: &str = "fuzzer"; + +#[derive(Arbitrary)] +pub struct FuzzData { + param1: u8, + param2: u8, +} + +fn main() { + loop { + fuzz!(|fuzz_data: FuzzData| { + Runtime::new().unwrap().block_on(async { + let program_test = ProgramTest::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)); + + let mut ctx = program_test.start_with_context().await; + + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let init_ix = init_dummy_ix(); + let mut transaction = + Transaction::new_with_payer(&[init_ix], Some(&ctx.payer.pubkey().clone())); + + transaction.sign(&[&ctx.payer], ctx.last_blockhash); + let res = ctx.banks_client.process_transaction(transaction).await; + assert_matches!(res, Ok(())); + + let res = fuzz_ix( + &fuzz_data, + &mut ctx.banks_client, + &ctx.payer, + ctx.last_blockhash, + ) + .await; + assert_matches!(res, Ok(())); + }); + }); + } +} + +async fn fuzz_ix( + fuzz_data: &FuzzData, + banks_client: &mut BanksClient, + payer: &Keypair, + blockhash: Hash, +) -> core::result::Result<(), BanksClientError> { + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let update_ix = update_dummy_ix(fuzz_data.param1, fuzz_data.param2); + + let mut transaction = Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); + transaction.sign(&[payer], blockhash); + + banks_client.process_transaction(transaction).await +} + +fn init_dummy_ix() -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: vec![], + accounts: vec![], + } +} + +fn update_dummy_ix(param1: u8, param2: u8) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: vec![param1, param2], + accounts: vec![], + } +} diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml new file mode 100644 index 00000000..3fa7ca71 --- /dev/null +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml @@ -0,0 +1,23 @@ +[[bin]] +name = "fuzz_1" +path = "test_fuzz.rs" + +[package] +name = "fuzz_1" +version = "0.1.0" +edition = "2018" + +[dependencies] +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + +[dependencies.trdelnik-client] +path = "../../../../../crates/client" +features = ["fuzzing"] + +[dependencies.program_client] +path = "../../../.program_client" + +[dependencies.fuzzer] +path = "../../../programs/fuzzer" diff --git a/examples/fuzzer/trdelnik-tests/src/bin/fuzz_target.rs b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs similarity index 99% rename from examples/fuzzer/trdelnik-tests/src/bin/fuzz_target.rs rename to examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs index f52e83cb..48f676e3 100644 --- a/examples/fuzzer/trdelnik-tests/src/bin/fuzz_target.rs +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs @@ -1,9 +1,10 @@ +use assert_matches::*; use fuzzer::entry; use program_client::fuzzer_instruction::*; -const PROGRAM_NAME: &str = "fuzzer"; -use assert_matches::*; use trdelnik_client::fuzzing::*; +const PROGRAM_NAME: &str = "fuzzer"; + #[derive(Arbitrary)] pub struct FuzzData { param1: u8, diff --git a/examples/fuzzer/trdelnik-tests/tests/test.rs b/examples/fuzzer/trdelnik-tests/tests/test.rs deleted file mode 100644 index 37931717..00000000 --- a/examples/fuzzer/trdelnik-tests/tests/test.rs +++ /dev/null @@ -1,45 +0,0 @@ -use fehler::throws; -use program_client; -use trdelnik_client::{anyhow::Result, *}; -// @todo: do not forget to import your program crate (also in the ../Cargo.toml) - -// @todo: create and deploy your fixture -#[throws] -#[fixture] -async fn init_fixture() -> Fixture { - let mut fixture = Fixture::new(); - // @todo: here you can call your ::initialize instruction - fixture.deploy().await?; - fixture -} - -#[trdelnik_test] -async fn test_happy_path(#[future] init_fixture: Result) { - // @todo: add your happy path test scenario and the other test cases - let default_fixture = Fixture::new(); - let fixture = init_fixture.await?; - assert_eq!(fixture.program, default_fixture.program); -} - -// @todo: design and implement all the logic you need for your fixture(s) -struct Fixture { - client: Client, - program: Keypair, - state: Keypair, -} -impl Fixture { - fn new() -> Self { - Fixture { - client: Client::new(system_keypair(0)), - program: program_keypair(1), - state: keypair(42), - } - } - - #[throws] - async fn deploy(&mut self) { - self.client - .airdrop(self.client.payer().pubkey(), 5_000_000_000) - .await?; - } -} diff --git a/examples/turnstile/.program_client/Cargo.toml b/examples/turnstile/.program_client/Cargo.toml index e36b8b9e..e5bec949 100644 --- a/examples/turnstile/.program_client/Cargo.toml +++ b/examples/turnstile/.program_client/Cargo.toml @@ -7,4 +7,3 @@ path = "../../../crates/client" [dependencies.turnstile] path = "../programs/turnstile" -features = ["no-entrypoint"] diff --git a/examples/turnstile/Cargo.lock b/examples/turnstile/Cargo.lock index ef09f6c3..c244e9f2 100644 --- a/examples/turnstile/Cargo.lock +++ b/examples/turnstile/Cargo.lock @@ -12,6 +12,15 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -56,9 +65,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom 0.2.10", "once_cell", @@ -442,7 +451,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.14", + "time 0.3.30", ] [[package]] @@ -487,9 +496,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.14" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" dependencies = [ "brotli", "flate2", @@ -510,9 +519,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -536,6 +545,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -556,9 +580,9 @@ checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "base64ct" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bincode" @@ -575,6 +599,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bitmaps" version = "2.1.0" @@ -715,9 +745,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -726,9 +756,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -793,15 +823,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "camino" -version = "1.0.7" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] @@ -818,9 +848,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] @@ -865,7 +895,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time 0.1.43", + "time 0.1.45", "wasm-bindgen", "winapi", ] @@ -887,7 +917,7 @@ checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -896,12 +926,12 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_lex", "indexmap 1.9.3", "once_cell", @@ -919,16 +949,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "combine" version = "3.8.1" @@ -944,9 +964,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -998,9 +1018,9 @@ checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1008,9 +1028,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" @@ -1123,50 +1143,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cxx" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2 1.0.66", - "quote 1.0.32", - "scratch", - "syn 1.0.109", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" -dependencies = [ - "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 1.0.109", -] - [[package]] name = "darling" version = "0.13.4" @@ -1246,14 +1222,14 @@ dependencies = [ "cfg-if", "hashbrown 0.12.3", "lock_api", - "parking_lot_core 0.9.3", + "parking_lot_core", ] [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -1278,6 +1254,15 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] + [[package]] name = "derivation-path" version = "0.2.0" @@ -1371,13 +1356,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -1411,9 +1396,9 @@ checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" [[package]] name = "ed25519" -version = "1.4.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "signature", ] @@ -1458,9 +1443,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -1504,6 +1489,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -1512,12 +1507,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "1.7.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "feature-probe" @@ -1547,9 +1539,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1563,18 +1555,18 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -1587,9 +1579,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -1597,15 +1589,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -1614,15 +1606,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -1631,15 +1623,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -1649,9 +1641,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -1712,6 +1704,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" version = "0.3.1" @@ -1731,9 +1729,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.13" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -1741,7 +1739,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -1763,7 +1761,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.7", ] [[package]] @@ -1783,9 +1781,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" @@ -1798,9 +1796,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1855,9 +1853,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1866,9 +1864,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1883,9 +1881,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1895,9 +1893,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1910,7 +1908,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1919,39 +1917,39 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", - "rustls", + "rustls 0.21.10", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1962,9 +1960,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1998,19 +1996,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -2030,9 +2028,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" @@ -2100,6 +2098,17 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "libsecp256k1" version = "0.6.0" @@ -2149,13 +2158,10 @@ dependencies = [ ] [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "linux-raw-sys" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -2232,9 +2238,9 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -2244,47 +2250,35 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.7.14" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", ] [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", "pin-utils", - "static_assertions", ] [[package]] @@ -2297,15 +2291,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.2.1" @@ -2363,6 +2348,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -2433,13 +2429,22 @@ dependencies = [ "num_enum_derive 0.6.1", ] +[[package]] +name = "num_enum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", +] + [[package]] name = "num_enum_derive" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", "quote 1.0.32", "syn 1.0.109", @@ -2451,19 +2456,22 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", "quote 1.0.32", "syn 2.0.28", ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "num_enum_derive" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ - "libc", + "proc-macro-crate 2.0.1", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", ] [[package]] @@ -2472,6 +2480,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.6.1" @@ -2507,20 +2524,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - -[[package]] -name = "parking_lot" -version = "0.11.2" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", -] +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "parking_lot" @@ -2529,21 +2535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2554,7 +2546,7 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "smallvec", "windows-sys 0.36.1", ] @@ -2565,6 +2557,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + [[package]] name = "pbkdf2" version = "0.4.0" @@ -2594,9 +2592,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -2609,9 +2607,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2630,12 +2628,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + [[package]] name = "plain" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +[[package]] +name = "poc_tests" +version = "0.1.0" +dependencies = [ + "assert_matches", + "fehler", + "program_client", + "rstest 0.12.0", + "trdelnik-client", + "turnstile", +] + [[package]] name = "polyval" version = "0.5.3" @@ -2650,9 +2666,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.2" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" @@ -2677,12 +2699,22 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ - "thiserror", - "toml", + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -2731,7 +2763,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls", + "rustls 0.20.9", "thiserror", "tokio", "tracing", @@ -2740,15 +2772,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls", + "rustls 0.20.9", "rustls-native-certs", "slab", "thiserror", @@ -2765,7 +2797,7 @@ checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" dependencies = [ "libc", "quinn-proto", - "socket2", + "socket2 0.4.9", "tracing", "windows-sys 0.42.0", ] @@ -2897,8 +2929,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.14", + "ring 0.16.20", + "time 0.3.30", "yasna", ] @@ -2908,17 +2940,35 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom 0.2.10", - "redox_syscall", + "libredox", "thiserror", ] @@ -2953,24 +3003,15 @@ checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "relative-path" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "async-compression", "base64 0.21.2", @@ -2990,20 +3031,21 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.10", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.3", "winreg", ] @@ -3016,21 +3058,35 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] [[package]] -name = "rpassword" -version = "7.2.0" +name = "ring" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" dependencies = [ + "cc", + "getrandom 0.2.10", "libc", - "rtoolbox", - "winapi", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", ] [[package]] @@ -3048,9 +3104,9 @@ dependencies = [ [[package]] name = "rstest" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b96577ca10cb3eade7b337eb46520108a67ca2818a24d0b63f41fd62bc9651c" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ "futures", "futures-timer", @@ -3060,9 +3116,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e674cf31712b8bb15fdbca3ec0c1b9d825c5a24407ff2b7e005fb6a29ba03" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" dependencies = [ "cfg-if", "glob", @@ -3077,19 +3133,19 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -3115,23 +3171,48 @@ dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "0.38.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.3", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -3141,11 +3222,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.13.0", + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] @@ -3162,12 +3253,11 @@ checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.48.0", ] [[package]] @@ -3176,12 +3266,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - [[package]] name = "scroll" version = "0.11.0" @@ -3193,32 +3277,32 @@ dependencies = [ [[package]] name = "scroll_derive" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] name = "security-framework" -version = "2.6.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3227,9 +3311,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3246,9 +3330,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.180" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -3264,9 +3348,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -3320,11 +3404,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -3341,7 +3425,7 @@ dependencies = [ "futures", "lazy_static", "log", - "parking_lot 0.12.0", + "parking_lot", "serial_test_derive", ] @@ -3358,9 +3442,9 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", @@ -3430,18 +3514,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "sized-chunks" @@ -3455,9 +3539,12 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" @@ -3475,11 +3562,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "solana-account-decoder" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abdbb3f97298a86fd5a885eac55786a5853885817e5e9f3c427ee3651a81636d" +checksum = "850d5d9dc8fa6ea42f4e61c78e296bbbce5a3531ff4cb3c58ef36ee31781049c" dependencies = [ "Inflector", "base64 0.21.2", @@ -3501,14 +3598,14 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282e7e0a459a3461f8dd83eb0609006ec8decf53e6a0cdbc2f2502fe4dc29e97" +checksum = "8a7f867cde478a078d4c4ceb113f4f9ac7e29c2efea98f80a2b30cdcd7be83c5" dependencies = [ "bincode", "bytemuck", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -3522,9 +3619,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33aa7ffd67c78e34c982c5cd0be7a8f9c4caec21ef1c38adc732c61cd38cef36" +checksum = "c3c99636da9a4acad58d0e8142e36395ece48fc41c396e297e702b6a789b190f" dependencies = [ "chrono", "clap 2.34.0", @@ -3540,9 +3637,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332057b0777bbb8c16181e19bbfdd0e36a6db7ee23182493a8a193a89b2f5e06" +checksum = "7ae4ba224e834b5d71c884a356bf1e23b5999ef4edd8996a42a8ac0dd680315b" dependencies = [ "dirs-next", "lazy_static", @@ -3556,9 +3653,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef678df03487a0b3895fcffb930bd49871f2b7dd6bb8002baece3b7b6967be94" +checksum = "56d56e77a341047880483438de34a5dea76eb79449ea9f969422710fb7f932b6" dependencies = [ "Inflector", "base64 0.21.2", @@ -3578,14 +3675,14 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "solana-vote-program", - "spl-memo", + "spl-memo 3.0.1", ] [[package]] name = "solana-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5bbde351def5eb2df5fbb4903d5f8e891eaa643c63f654b4a9eb6fa08e88d7" +checksum = "acc7a437165d8fcfac3c63963e394f0ea497b5d2a75159bb3a1ed75dbeb36a7e" dependencies = [ "async-trait", "bincode", @@ -3616,9 +3713,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d4fb0fa3a1714da0b03befc861aa851bb2d7b446c4eb0a3a55db2f3d47fa3b" +checksum = "d6f9f2201c7e526581511fa6525e281518be5cabaee82bd5b29fe4b78744148d" dependencies = [ "bincode", "chrono", @@ -3630,9 +3727,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313fd8693ddfff8848b00993b4e7d785c9e5dd11e4ef65c20445b86ffc789d90" +checksum = "3ee52de352e10e53b252df0815d685a9c6f3e8d3baa0f65e214dfcd247db0e21" dependencies = [ "async-trait", "bincode", @@ -3651,9 +3748,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33ec119dc1bb0395b50d389d31ee6015cc81570d31f19cb3dca0ffff5f8f117" +checksum = "361cc834e5fbbe1a73f1d904fcb8ab052a665e5be6061bd1ba7ab478d7d17c9c" dependencies = [ "ahash 0.8.3", "blake3", @@ -3684,9 +3781,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1feba80a564f52092da4c8a93bebc66f39665ebefd02d93bd54ef10453f179d" +checksum = "575d875dc050689f9f88c542e292e295e2f081d4e96e0df297981e45cbad8824" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", @@ -3696,9 +3793,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853aab82ead804a201f0edb036e5ff73b9bc8e97d9c1b9b91aeee2f6435073a2" +checksum = "c00faf7aa6a3f47c542bd45d2d7f13af9a382d993e647976a676fe1b0eec4eb2" dependencies = [ "env_logger", "lazy_static", @@ -3707,9 +3804,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9baba2de183b0f53e7ef67514a621598a4f83e438223b7d6a98118a0c8785e52" +checksum = "0e19c6e1b35df3c212619a7995ae3576fa92ab15ecfc065899f21385cbe45c95" dependencies = [ "log", "solana-sdk", @@ -3717,9 +3814,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354797e12eb6e93514074210e905ddd77faecf3ea3fdf414aac18a8290c3e5bb" +checksum = "10e62760a5f87d836169eb3bb446bae174181db07d2c8016be36de49c04fd432" dependencies = [ "crossbeam-channel", "gethostname", @@ -3731,19 +3828,19 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6666d2ab4fa92f26cfda1407f5a893237eebb3e71b475816d348b36991ad0f42" +checksum = "308c4c36c634d418589cf1df121d143819feff81932de81640de3d64878934eb" dependencies = [ "bincode", - "clap 3.2.23", + "clap 3.2.25", "crossbeam-channel", "log", "nix", "rand 0.7.3", "serde", "serde_derive", - "socket2", + "socket2 0.4.9", "solana-logger", "solana-sdk", "solana-version", @@ -3753,9 +3850,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdd389a7bbf6850ef8e0c391aeb5fdcd3e1017578087dc01b1f7b8b9a68a32" +checksum = "a4d44a4998ba6d9b37e89399d9ce2812e84489dd4665df619fb23366e1c2ec1b" dependencies = [ "ahash 0.8.3", "bincode", @@ -3780,9 +3877,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afaa80737c3f26927df136e46b568525709371a5e161e1f490f1dd5defe9698" +checksum = "9863ff5c6e828015bec331c26fb53e48352a264a9be682e7e078d2c3b3e93b46" dependencies = [ "ark-bn254", "ark-ec", @@ -3791,9 +3888,10 @@ dependencies = [ "array-bytes", "base64 0.21.2", "bincode", - "bitflags", + "bitflags 1.3.2", "blake3", "borsh 0.10.3", + "borsh 0.9.3", "bs58 0.4.0", "bv", "bytemuck", @@ -3810,9 +3908,9 @@ dependencies = [ "log", "memoffset 0.9.0", "num-bigint 0.4.3", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.0", + "parking_lot", "rand 0.7.3", "rand_chacha 0.2.2", "rustc_version", @@ -3834,9 +3932,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1856d8d16b0cabb912c3a71f6579efcc2a918d9325b27d62a45a38a8958fe3a" +checksum = "05813d4d2e141ab4449cf684cc5b05512dfaabb7251561c5bb1ccf1e4221b210" dependencies = [ "base64 0.21.2", "bincode", @@ -3845,7 +3943,7 @@ dependencies = [ "itertools", "libc", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "percentage", "rand 0.7.3", @@ -3862,9 +3960,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca89d4d7faa19562747e7a7cad85abf089ba3c6e00c16196c3627e17b7f5e6" +checksum = "7cd0753cdde1710f50d58bd40a45e58f5368a25dabff6b18ba635c3d6959a558" dependencies = [ "crossbeam-channel", "futures-util", @@ -3887,9 +3985,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a348eaf9aa4a5cb0139c6af7a09e49a326c25e95a14b3fb9a7d755d47cf7fc0a" +checksum = "212d96abde446eaa903d16961cfd3a6e98dc0d680b9edd61c39938c61548d53e" dependencies = [ "async-mutex", "async-trait", @@ -3901,7 +3999,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rcgen", - "rustls", + "rustls 0.20.9", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -3915,9 +4013,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b098bb5f50ee2d6eefa38c908a390cc6c52e08421c745186264fd67cb7bb1b" +checksum = "82ab62fc62458271d746678a3f5625e1654e3cb42a8f318ef4f1ea25991bb085" dependencies = [ "lazy_static", "num_cpus", @@ -3925,16 +4023,16 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65dc97db0e3fad44e840711fb6a0f2b81d8f4a09611528b3cb177cebedad22bf" +checksum = "863f10b8c2a893d1ec85b3ae8020c714512a67302b80c24dde0016eea4034a7c" dependencies = [ "console", "dialoguer", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", - "parking_lot 0.12.0", + "parking_lot", "qstring", "semver", "solana-sdk", @@ -3944,9 +4042,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8644c6d89367636e7361dd04703ab16bb7ec1f1470d632f957cc30b83beeb7f8" +checksum = "df04998cef2d0fe1291599b69acafc7f8cd87305d7f1525c8ae10aef1cc5411c" dependencies = [ "async-trait", "base64 0.21.2", @@ -3970,9 +4068,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d44573a6fc4d2467e1434b065641d5b8019b35f671538a9425982cf7fddc421" +checksum = "5e2912ddbff841fbce1e30b0b9a420993c63b6cc7866e5f0af3740fcd6d85bb8" dependencies = [ "base64 0.21.2", "bs58 0.4.0", @@ -3992,9 +4090,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9252b4f5b0ad3c0cb79d30afb59019ca26ed8ce1f954c59df198a1e9431156" +checksum = "d31100f6cc340dd322f57d00a334fa0a96f628ba86b04fcda1f84307deb14c31" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4005,14 +4103,14 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f53c6ffc2ce2fd2594f6dc1eb1e459843b5f9b008aae10e1cb3d6fef58e63706" +checksum = "621e6973766420162541b26e7974783d32d5471571610da30c5bb0b6263046c9" dependencies = [ "assert_matches", "base64 0.21.2", "bincode", - "bitflags", + "bitflags 1.3.2", "borsh 0.10.3", "bs58 0.4.0", "bytemuck", @@ -4030,7 +4128,7 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "pbkdf2 0.11.0", @@ -4058,9 +4156,9 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e11e29d859ffa265e1abb6f7aa12afe6c34b64c75b56a80b777f8f957074ac" +checksum = "bd177a74fb3a0a362f1292c027d668eff609ac189f08b78158324587a0a4f8d1" dependencies = [ "bs58 0.4.0", "proc-macro2 1.0.66", @@ -4071,9 +4169,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3098885b67cadc7b83aab0acd3a476fb24c3c637747ba5eed32dd511b86d9150" +checksum = "3942a60afb0282b07ef0f3c32078145ab7545cbed2cac98f1ec4b9f63016df62" dependencies = [ "async-channel", "bytes", @@ -4093,7 +4191,7 @@ dependencies = [ "quinn-udp", "rand 0.7.3", "rcgen", - "rustls", + "rustls 0.20.9", "solana-metrics", "solana-perf", "solana-sdk", @@ -4104,9 +4202,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98c7fa5b031439428a35158d69c131e75805d20f61aea1196706822bc14ac90" +checksum = "d712aaf7701a4504521fc09f1743c647edf596e3852a64f6d66b2e5a822388f8" dependencies = [ "bincode", "log", @@ -4119,9 +4217,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c2ff3d859aea2a175a77b612127b13a969430900b64e865ee39b03c0b4170" +checksum = "48cb32f7443f80cb45e244d514a706b030b5a71ef86b0436c1d39cbfff5491b4" dependencies = [ "async-trait", "bincode", @@ -4144,9 +4242,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6590fe4ed93087f6fbd069659d89bacc5edee9493b95e23e016d30aad3dcd059" +checksum = "8aed485ddb4268b4e4ec64012016cd54ba3a4142377a99706fc3ab7768eb2bea" dependencies = [ "Inflector", "base64 0.21.2", @@ -4162,7 +4260,7 @@ dependencies = [ "solana-address-lookup-table-program", "solana-sdk", "spl-associated-token-account 1.1.3", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "spl-token-2022 0.6.1", "thiserror", @@ -4170,9 +4268,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1e4d8b26360621b08d899b306db9c855fed7c3b7e325bd585e62ba068b2ba2" +checksum = "0c92798affef44c1ae2a694006209608044e99106b7945966d53586f5a95d9e2" dependencies = [ "async-trait", "solana-connection-cache", @@ -4185,9 +4283,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c563989feb6af907aada46d81680dd5982511f6fc793cdf09a674d69725b5bb0" +checksum = "a80a20dfea2afed91761ab3fecc8f96b973a742dc7728f3e343711efe6e8e05f" dependencies = [ "log", "rustc_version", @@ -4201,13 +4299,13 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4509784e34e7f85458108370b7f80c2a67f8e8415468201791e8ab8676a6f03c" +checksum = "ab8b719e077cc9e42b8965dd06ff6b5f09fa2a436f2297efdcf471c05d187a6c" dependencies = [ "bincode", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc_version", "serde", @@ -4223,9 +4321,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.16.6" +version = "1.16.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dec0724d3b8c469aafe87c97703ed1f9ddde5ce5df1419fd3d7018d3a41486e" +checksum = "61aabdec9fe1b311dce5d21fa5bd58fbaa985e8003e0d0aedf3795113aacc1ea" dependencies = [ "aes-gcm-siv", "base64 0.21.2", @@ -4237,7 +4335,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive", + "num-derive 0.3.3", "num-traits", "rand 0.7.3", "serde", @@ -4252,9 +4350,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3082ec3a1d4ef7879eb5b84916d5acde057abd59733eec3647e0ab8885283ef" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" dependencies = [ "byteorder", "combine", @@ -4275,6 +4373,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.5.4" @@ -4293,7 +4397,7 @@ checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" dependencies = [ "assert_matches", "borsh 0.9.3", - "num-derive", + "num-derive 0.3.3", "num-traits", "solana-program", "spl-token 3.5.0", @@ -4303,17 +4407,17 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02693d7b36cea2b45318b87f22406909879226963296f31f4ebb0fc7f6e1aeb3" +checksum = "477696277857a7b2c17a6f7f3095e835850ad1c0f11637b5bd2693ca777d8546" dependencies = [ "assert_matches", "borsh 0.10.3", - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-token 4.0.0", - "spl-token-2022 0.7.0", + "spl-token-2022 0.8.0", "thiserror", ] @@ -4330,9 +4434,9 @@ dependencies = [ [[package]] name = "spl-discriminator-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fa8f409b5c5e0ac571df17c981ae1424b204743daa4428430627d38717caf5" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" dependencies = [ "quote 1.0.32", "spl-discriminator-syn", @@ -4341,13 +4445,13 @@ dependencies = [ [[package]] name = "spl-discriminator-syn" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21968d7da2f0a624c509f24580c3fee70b364a6886d90709e679e64f572eca2f" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "solana-program", + "sha2 0.10.7", "syn 2.0.28", "thiserror", ] @@ -4361,13 +4465,35 @@ dependencies = [ "solana-program", ] +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + [[package]] name = "spl-program-error" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af92f74cd3b0fdfda59fef4b571a92123e4df0f67cc43f73163975d31118ef82" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ - "num-derive", + "num-derive 0.4.1", "num-traits", "solana-program", "spl-program-error-derive", @@ -4376,24 +4502,26 @@ dependencies = [ [[package]] name = "spl-program-error-derive" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173f3cc506847882189b3a5b67299f617fed2f9730f122dd197b82e1e213dee5" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", + "sha2 0.10.7", "syn 2.0.28", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82149a5a06b5f158d03904066375eaf0c8a2422557cc3d5a25d277260d9a3b16" +checksum = "7960b1e1a41e4238807fca0865e72a341b668137a3f2ddcd770d04fd1b374c96" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", "spl-type-length-value", ] @@ -4406,7 +4534,7 @@ checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", @@ -4421,7 +4549,7 @@ checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.6.1", "solana-program", @@ -4436,71 +4564,81 @@ checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.3.3", "num-traits", "num_enum 0.5.11", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 3.0.1", "spl-token 3.5.0", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24ac5786a3fefbf59f5606312c61abf87b23154e7a717e5d18216fbea4711db" +checksum = "84fc0c7a763c3f53fa12581d07ed324548a771bb648a1217e4f330b1d0a59331" dependencies = [ "arrayref", "bytemuck", - "num-derive", + "num-derive 0.4.1", "num-traits", - "num_enum 0.6.1", + "num_enum 0.7.1", "solana-program", "solana-zk-token-sdk", - "spl-memo", + "spl-memo 4.0.0", + "spl-pod", "spl-token 4.0.0", + "spl-token-metadata-interface", "spl-transfer-hook-interface", + "spl-type-length-value", "thiserror", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + [[package]] name = "spl-transfer-hook-interface" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2326852adf88716fbac7f54cd6ee2c8a0b5a14ede24db3b4519c4ff13df04b" +checksum = "f7489940049417ae5ce909314bead0670e2a5ea5c82d43ab96dc15c8fcbbccba" dependencies = [ "arrayref", "bytemuck", - "num-derive", - "num-traits", - "num_enum 0.6.1", "solana-program", "spl-discriminator", + "spl-pod", + "spl-program-error", "spl-tlv-account-resolution", "spl-type-length-value", - "thiserror", ] [[package]] name = "spl-type-length-value" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d085f426b33b8365fb98383d1b8b3925e21bdfe579c851ceaa7f511dbec191" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", "spl-discriminator", + "spl-pod", "spl-program-error", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.8.0" @@ -4564,25 +4702,45 @@ dependencies = [ "unicode-xid 0.2.3", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.3.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix", + "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -4624,31 +4782,43 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] [[package]] name = "time" -version = "0.3.14" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ + "deranged", "itoa", - "libc", - "num_threads", + "powerfmt", + "serde", + "time-core", "time-macros", ] +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + [[package]] name = "time-macros" -version = "0.2.4" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] [[package]] name = "tiny-bip39" @@ -4686,33 +4856,32 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.14.1" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d0183f6f6001549ab68f8c7585093bb732beefbcf6d23a10b9b95c73a1dd49" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", - "parking_lot 0.11.2", + "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.4", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.7.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -4721,16 +4890,26 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -4745,19 +4924,19 @@ checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.20.9", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -4777,19 +4956,46 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4797,22 +5003,22 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.32", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -4827,12 +5033,13 @@ dependencies = [ "ed25519-dalek", "fehler", "futures", - "heck 0.4.0", + "heck 0.4.1", "lazy_static", "log", + "pathdiff", "quote 1.0.32", "rand 0.8.5", - "rstest 0.18.1", + "rstest 0.18.2", "serde", "serde_json", "serial_test", @@ -4841,7 +5048,7 @@ dependencies = [ "solana-cli-output", "solana-sdk", "solana-transaction-status", - "spl-associated-token-account 2.0.0", + "spl-associated-token-account 2.1.0", "spl-token 4.0.0", "syn 1.0.109", "thiserror", @@ -4860,22 +5067,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "trdelnik-tests" -version = "0.1.0" -dependencies = [ - "fehler", - "program_client", - "rstest 0.12.0", - "trdelnik-client", - "turnstile", -] - [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -4890,13 +5086,13 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.20.9", "sha-1", "thiserror", "url", "utf-8", "webpki", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] @@ -4914,9 +5110,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -4941,9 +5137,9 @@ checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -4978,9 +5174,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2024452afd3874bf539695e04af6732ba06517424dbf958fdb16a01f3bef6c" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -4988,6 +5184,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -5000,9 +5202,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -5035,11 +5237,10 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -5049,6 +5250,12 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -5082,9 +5289,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.30" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -5133,23 +5340,29 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.3", + "untrusted 0.9.0", ] [[package]] name = "webpki-roots" -version = "0.22.3" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "winapi" version = "0.3.9" @@ -5168,9 +5381,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -5181,6 +5394,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.36.1" @@ -5227,6 +5449,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -5257,6 +5488,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5269,6 +5515,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -5287,6 +5539,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -5305,6 +5563,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -5323,6 +5587,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -5341,6 +5611,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5353,6 +5629,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -5371,13 +5653,29 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -5395,16 +5693,16 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.14", + "time 0.3.30", ] [[package]] name = "yasna" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346d34a236c9d3e5f3b9b74563f238f955bbd05fa0b8b4efa53c130c43982f4c" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.14", + "time 0.3.30", ] [[package]] @@ -5449,10 +5747,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", + "pkg-config", ] diff --git a/examples/turnstile/Cargo.toml b/examples/turnstile/Cargo.toml index fbe457ec..bd2c6b66 100644 --- a/examples/turnstile/Cargo.toml +++ b/examples/turnstile/Cargo.toml @@ -1,2 +1,2 @@ [workspace] -members = ["programs/*", "trdelnik-tests"] +members = ["programs/*", "trdelnik-tests/poc_tests"] diff --git a/examples/turnstile/Trdelnik.toml b/examples/turnstile/Trdelnik.toml index 0428ca65..e6803594 100644 --- a/examples/turnstile/Trdelnik.toml +++ b/examples/turnstile/Trdelnik.toml @@ -1,2 +1,30 @@ [test] validator_startup_timeout = 15000 + + +# contains default values +[fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) +iterations = 0 +# 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) +keep_output = false +# Disable ANSI console; use simple log output (default: false) +verbose = false +# Exit upon seeing the first crash (default: false) +exit_upon_crash = false +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false diff --git a/examples/turnstile/trdelnik-tests/Cargo.toml b/examples/turnstile/trdelnik-tests/Cargo.toml deleted file mode 100644 index 5a4dd9df..00000000 --- a/examples/turnstile/trdelnik-tests/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "trdelnik-tests" -version = "0.1.0" -description = "Created with Trdelnik" -edition = "2021" -[dependencies.trdelnik-client] -path = "../../../crates/client" - -[dependencies.program_client] -path = "../.program_client" - -[dependencies.turnstile] -path = "../programs/turnstile" - -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" diff --git a/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml b/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml new file mode 100644 index 00000000..fba8eae4 --- /dev/null +++ b/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "poc_tests" +version = "0.1.0" +edition = "2018" + +[dev-dependencies] +assert_matches = "1.4.0" +fehler = "1.0.0" +rstest = "0.12.0" + +[dev-dependencies.trdelnik-client] +path = "../../../../crates/client" + +[dev-dependencies.program_client] +path = "../../.program_client" + +[dev-dependencies.turnstile] +path = "../../programs/turnstile" diff --git a/examples/turnstile/trdelnik-tests/tests/test.rs b/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs similarity index 90% rename from examples/turnstile/trdelnik-tests/tests/test.rs rename to examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs index 4e698718..729dd077 100644 --- a/examples/turnstile/trdelnik-tests/tests/test.rs +++ b/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs @@ -1,5 +1,5 @@ use fehler::throws; -use program_client::turnstile_instruction; +use program_client::turnstile_instruction::*; use trdelnik_client::{anyhow::Result, *}; #[throws] @@ -31,7 +31,7 @@ async fn init_fixture() -> Fixture { .await?; // init instruction call - turnstile_instruction::initialize( + initialize( &fixture.client, fixture.state.pubkey(), fixture.user_initializer.pubkey(), @@ -48,7 +48,7 @@ async fn test_happy_path(#[future] init_fixture: Result) { let fixture = init_fixture.await?; // coin instruction call - turnstile_instruction::coin( + coin( &fixture.client, "dummy_string".to_owned(), fixture.state.pubkey(), @@ -56,7 +56,7 @@ async fn test_happy_path(#[future] init_fixture: Result) { ) .await?; // push instruction call - turnstile_instruction::push(&fixture.client, fixture.state.pubkey(), None).await?; + push(&fixture.client, fixture.state.pubkey(), None).await?; // check the test result let state = fixture.get_state().await?; @@ -72,7 +72,7 @@ async fn test_unhappy_path(#[future] init_fixture: Result) { let fixture = init_fixture.await?; // pushing without prior coin insertion - turnstile_instruction::push(&fixture.client, fixture.state.pubkey(), None).await?; + push(&fixture.client, fixture.state.pubkey(), None).await?; // check the test result let state = fixture.get_state().await?; From b1b5c6e289215169e298c6891dd28e35af6858f3 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sat, 16 Dec 2023 10:29:07 +0100 Subject: [PATCH 28/57] =?UTF-8?q?=F0=9F=90=9B=20updated=20--with-exit-code?= =?UTF-8?q?=20option=20directories=20discovery=20so=20that=20it=20works=20?= =?UTF-8?q?with=20the=20current=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/fuzz.rs | 1 + crates/client/src/commander.rs | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 4a37dae7..afb4b40f 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -37,6 +37,7 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { // we look for Trdelnik.toml but toml can exist but fuzzer is not initialized // Moreover fuzzer should be main goal of framework, so would remove skip_fuzzer // option + // FIXME is the root option necessarry ? let root = match root { Some(r) => r, _ => { diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index b839fb7f..dfadc24f 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -308,14 +308,14 @@ impl Commander { } } - let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); - if !cur_dir.try_exists()? { - throw!(Error::NotInitialized); - } - + // TODO We already checked if the trdelnik init is initialized, furthermore + // we can leave this on honggfuzz side , so + // let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); + // if !cur_dir.try_exists()? { + // throw!(Error::NotInitialized); + // } let mut child = Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) - .current_dir(cur_dir) .arg("hfuzz") .arg("run") .arg(target) @@ -428,12 +428,14 @@ fn get_crash_dir_and_ext( .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); let crash_path = if let Some(dir) = crash_dir { - Path::new(root).join(TESTS_WORKSPACE_DIRECTORY).join(dir) + Path::new(root).join(dir) + // Path::new(root).join(TESTS_WORKSPACE_DIRECTORY).join(dir) } else { - Path::new(root) - .join(TESTS_WORKSPACE_DIRECTORY) - .join(HFUZZ_WORKSPACE) - .join(target) + Path::new(root).join(HFUZZ_WORKSPACE).join(target) + // Path::new(root) + // .join(TESTS_WORKSPACE_DIRECTORY) + // .join(HFUZZ_WORKSPACE) + // .join(target) }; (crash_path, extension) From aab19237705959f4b5c4d88e2a41fa13580bd84b Mon Sep 17 00:00:00 2001 From: lukacan Date: Sat, 16 Dec 2023 10:34:41 +0100 Subject: [PATCH 29/57] =?UTF-8?q?=F0=9F=90=9B=20fixed=20paths=20so=20tests?= =?UTF-8?q?=20will=20pass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index dfadc24f..266bb8e1 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -586,10 +586,7 @@ mod tests { fn test_get_crash_dir_and_ext() { let root = Path::new("/home/fuzz"); let target = "target"; - let default_crash_path = Path::new(root) - .join(TESTS_WORKSPACE_DIRECTORY) - .join(HFUZZ_WORKSPACE) - .join(target); + let default_crash_path = Path::new(root).join(HFUZZ_WORKSPACE).join(target); let (crash_dir, ext) = get_crash_dir_and_ext(root, target, ""); @@ -624,14 +621,14 @@ mod tests { // test relative path let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W ../crash -e crash"); - let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + let expected_crash_path = root.join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // test relative path let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash ../crash -e crash"); - let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + let expected_crash_path = root.join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); @@ -639,7 +636,7 @@ mod tests { let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash ../crash -W /workspace -e crash"); - let expected_crash_path = root.join(TESTS_WORKSPACE_DIRECTORY).join("../crash"); + let expected_crash_path = root.join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); } From 951773959231c2e743cf2038d069ab18d0547408 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sat, 16 Dec 2023 10:36:13 +0100 Subject: [PATCH 30/57] =?UTF-8?q?=F0=9F=9A=A8=20fixed=20unused=20code=20wa?= =?UTF-8?q?rnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/build.rs | 2 +- crates/cli/src/command/test.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index 6e78c16a..41c776b7 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -6,7 +6,7 @@ use trdelnik_client::*; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] -pub async fn build(root: String, arch: ProgramArch) { +pub async fn build(_root: String, arch: ProgramArch) { // FIXME root argument maybe not needed let root = if let Some(r) = discover(TRDELNIK_TOML)? { r diff --git a/crates/cli/src/command/test.rs b/crates/cli/src/command/test.rs index ed1c259e..1c31412d 100644 --- a/crates/cli/src/command/test.rs +++ b/crates/cli/src/command/test.rs @@ -7,7 +7,7 @@ use crate::discover; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] -pub async fn test(root: String) { +pub async fn test(_root: String) { // TODO root argument maybe not needed match discover(TRDELNIK_TOML)? { From 6fc19c56ea7d1d47fe267933926d482cfa32e1a6 Mon Sep 17 00:00:00 2001 From: lukacan Date: Sat, 16 Dec 2023 11:24:48 +0100 Subject: [PATCH 31/57] =?UTF-8?q?=F0=9F=92=A1=20added=20some=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/fuzz.rs | 4 --- crates/cli/src/command/init.rs | 25 +------------- crates/client/src/commander.rs | 2 +- crates/client/src/workspace_builder.rs | 48 +++++++++++++++++++++----- 4 files changed, 41 insertions(+), 38 deletions(-) diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index afb4b40f..59b23b7a 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -33,10 +33,6 @@ pub enum FuzzCommand { #[throws] pub async fn fuzz(root: Option, subcmd: FuzzCommand) { - // TODO also think about skip_fuzzer within the init option, because here - // we look for Trdelnik.toml but toml can exist but fuzzer is not initialized - // Moreover fuzzer should be main goal of framework, so would remove skip_fuzzer - // option // FIXME is the root option necessarry ? let root = match root { Some(r) => r, diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index 992975e2..2a52e175 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -39,7 +39,7 @@ pub async fn init(template: InitCommand, arch: ProgramArch) { generator.initialize_poc(arch).await?; } InitCommand::Both => { - // INFO for both we need Anchor as it is stronger condition + // INFO for both we need Anchor as it is stronger condition of fuzzer let root = if let Some(r) = discover(ANCHOR_TOML)? { r } else { @@ -50,27 +50,4 @@ pub async fn init(template: InitCommand, arch: ProgramArch) { generator.initialize_both(arch).await?; } }; - - // TODO maybe remove skip fuzzer option ? - // if skip_fuzzer { - // // if skipping fuzzer no need to look for anchor.toml - // let root = if let Some(r) = discover(CARGO_TOML)? { - // r - // } else { - // bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); - // }; - // let mut generator = WorkspaceBuilder::new_with_root(root); - // let arch = arch.build_subcommand(); - // generator.initialize_without_fuzzer(arch).await?; - // } else { - // // fuzzer only supported with anchor - // let root = if let Some(r) = discover(ANCHOR_TOML)? { - // r - // } else { - // bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); - // }; - // let mut generator = WorkspaceBuilder::new_with_root(root); - // let arch = arch.build_subcommand(); - // generator.initialize_with_fuzzer(arch).await?; - // } } diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 266bb8e1..011a24f5 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -309,7 +309,7 @@ impl Commander { } // TODO We already checked if the trdelnik init is initialized, furthermore - // we can leave this on honggfuzz side , so + // we can leave this on honggfuzz // let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); // if !cur_dir.try_exists()? { // throw!(Error::NotInitialized); diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index ba03604c..adb1623f 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -65,7 +65,6 @@ impl WorkspaceBuilder { // automatically generated so we should be ok with updating this self.update_program_client().await?; //self.update_program_stubs().await?; - //self.update_toml_dependencies().await?; //self.add_invoked_program_deps().await?; } #[throws] @@ -73,6 +72,12 @@ impl WorkspaceBuilder { Commander::clean_anchor_target().await?; Commander::clean_hfuzz_target(&self.root).await?; } + /// Initializes template for FUZZ Tests + /// - builds current project + /// - generates program client + /// - generates fuzz template + /// - generates Trdelnik manifest file + /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_fuzz(&mut self, arch: &str) { self.build_and_parse(arch).await?; @@ -84,6 +89,11 @@ impl WorkspaceBuilder { self.create_trdelnik_manifest().await?; self.update_gitignore("hfuzz_target")?; } + /// Initializes template for PoC Tests + /// - builds current project + /// - generates program client + /// - generates PoC template + /// - generates Trdelnik manifest file #[throws] pub async fn initialize_poc(&mut self, arch: &str) { self.build_and_parse(arch).await?; @@ -93,6 +103,13 @@ impl WorkspaceBuilder { self.add_new_poc_test().await?; self.create_trdelnik_manifest().await?; } + /// Initializes template for FUZZ and PoC Tests + /// - builds current project + /// - generates program client + /// - generates Fuzz template + /// - generates PoC template + /// - generates Trdelnik manifest file + /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_both(&mut self, arch: &str) { self.build_and_parse(arch).await?; @@ -105,6 +122,9 @@ impl WorkspaceBuilder { self.create_trdelnik_manifest().await?; self.update_gitignore("hfuzz_target")?; } + /// - builds current project + /// - obtains program names and paths + /// - obtains data for generating program client #[throws] async fn build_and_parse(&mut self, arch: &str) { // build first , so we now that the programs are ok @@ -119,11 +139,14 @@ impl WorkspaceBuilder { self.use_tokens = Commander::parse_program_client_imports().await?; println!("\x1b[92mSuccesfully\x1b[0m obtained."); } + /// - adds new Fuzz test template to the trdelnik-tests folder #[throws] pub async fn add_fuzz_test(&mut self) { self.packages = Commander::collect_packages().await?; self.add_new_fuzz_test().await?; } + /// - creates program client folder + /// - generates program client soruce code #[throws] async fn create_program_client_crate(&self) { let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); @@ -150,11 +173,13 @@ impl WorkspaceBuilder { self.create_file(&lib_path, &program_client).await?; } + /// - create trdelnik-test folder #[throws] async fn create_trdelnik_tests_crate(&self) { let workspace_path = self.root.join(TESTS_WORKSPACE_DIRECTORY); self.create_directory(&workspace_path).await?; } + /// - generates new folder and contents for new Fuzz test Template #[throws] async fn add_new_fuzz_test(&self) { // this check should be ensured within package collection , but @@ -190,7 +215,7 @@ impl WorkspaceBuilder { // INFO this is kind of spaghetti, but esentially we are: // taking last element from the sorted list // splitting its name by '_' as this is expected delimeter - // for names such "poc_0", and then take the number and add 1, this should ensure + // for names such "fuzz_0", and then take the number and add 1, this should ensure // that the name will be unique String::from( directories @@ -266,10 +291,12 @@ impl WorkspaceBuilder { self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) .await?; } + + /// - generates new folder and contents for new PoC test Template #[throws] async fn add_new_poc_test(&self) { // INFO only one POC test file needed - // as we can implement multiple test paths so no need to create + // as we can implement multiple test paths within one file so no need to create // or add new test files, however can be added in the future let program_name = match &self.packages { Some(packages) => &packages.first().unwrap().name, @@ -373,6 +400,7 @@ impl WorkspaceBuilder { // .await?; // } + /// - creates Trdelnik manifest from template #[throws] async fn create_trdelnik_manifest(&self) { let trdelnik_toml_path = self.root.join(TRDELNIK); @@ -383,6 +411,7 @@ impl WorkspaceBuilder { self.create_file(&trdelnik_toml_path, trdelnik_toml_content) .await?; } + /// - updates program client generated source code #[throws] async fn update_program_client(&self) { let lib_path = self.root.join(PROGRAM_CLIENT_DIRECTORY).join(SRC).join(LIB); @@ -395,7 +424,7 @@ impl WorkspaceBuilder { self.update_file(&lib_path, &program_client).await?; } - + /// - add workspace member to the project root Cargo.toml #[throws] async fn add_workspace_member(&self, member: &str) { let cargo = self.root.join(CARGO); @@ -417,12 +446,12 @@ impl WorkspaceBuilder { match members.iter().find(|&x| x.eq(&new_member)) { Some(_) => { println!( - "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{member}\x1b[0m, already contains trdelnik-tests." + "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{CARGO}\x1b[0m, already contains {member}." ) } None => { members.push(new_member); - println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{member}\x1b[0m."); + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{CARGO}\x1b[0m with \x1b[93m{member}\x1b[0m."); } }; fs::write(cargo, content.to_string()).await?; @@ -435,7 +464,7 @@ impl WorkspaceBuilder { let file = File::open(&file_path)?; for line in io::BufReader::new(file).lines().flatten() { if line == ignored_path { - // TODO do not add the ignored path again if it is already in the .gitignore file + // INFO do not add the ignored path again if it is already in the .gitignore file return; } } @@ -506,7 +535,6 @@ impl WorkspaceBuilder { #[throws] async fn add_feature_to_dep(&self, dependency: &str, feature: &str, cargo_dir: &Path) { let cargo_toml_path = cargo_dir.join(CARGO); - // let cargo_toml_path = self.root.join(TESTS_WORKSPACE_DIRECTORY).join(CARGO); let rel_path = &cargo_toml_path .strip_prefix(&self.root) .unwrap() @@ -551,6 +579,8 @@ impl WorkspaceBuilder { } } + /// - adds program dependency to specified Cargo.toml + /// for example, we need to use program entry within the fuzzer #[throws] async fn add_program_dependencies(&self, cargo_dir: &PathBuf, deps: &str) { let cargo_path = cargo_dir.join(CARGO); @@ -566,7 +596,7 @@ impl WorkspaceBuilder { for package in packages.iter() { let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); // INFO this will obtain relative path - // TODO fuzzer need no entry point feature here for program client cargo + // TODO fuzzer need no entry point feature here for program client cargo.toml let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); let dep: Value = format!( r#"{} = {{ path = "{}" }}"#, From 2fd6bb04cdf1a82a5f3a0ce31e1b4405df677cfb Mon Sep 17 00:00:00 2001 From: lukacan Date: Mon, 18 Dec 2023 19:18:33 +0100 Subject: [PATCH 32/57] =?UTF-8?q?=E2=9C=A8=20added=20something=20like=20pr?= =?UTF-8?q?ogress=20bar=20to=20cargo=20+nightly=20=20command=20so=20we=20a?= =?UTF-8?q?t=20least=20know=20something=20is=20happening=20+=20removed=20o?= =?UTF-8?q?ptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/Cargo.toml | 1 + crates/client/src/commander.rs | 92 +++++++++++++------ crates/client/src/idl.rs | 25 +++--- crates/client/src/lib.rs | 3 - crates/client/src/workspace_builder.rs | 118 ++++++++++++------------- crates/client/tests/test.rs | 2 +- 6 files changed, 137 insertions(+), 104 deletions(-) diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 287ff07b..0d1fef56 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -56,3 +56,4 @@ solana-program-test = { version = "1.16.9", optional = true } quinn-proto = { version = "0.9.4", optional = true } shellexpand = { workspace = true } pathdiff = "0.2.1" +indicatif="0.17.7" diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 011a24f5..0116b48e 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -5,7 +5,6 @@ use crate::{ }; use cargo_metadata::{MetadataCommand, Package}; use fehler::{throw, throws}; -use futures::future::try_join_all; use log::debug; use solana_sdk::signer::keypair::Keypair; use std::{io, os::unix::process::CommandExt, path::Path, process::Stdio, string::FromUtf8Error}; @@ -19,7 +18,7 @@ use tokio::{ // ----- use crate::constants::*; - +use indicatif::{ProgressBar, ProgressStyle}; #[derive(Error, Debug)] pub enum Error { #[error("{0:?}")] @@ -132,39 +131,76 @@ impl Commander { }) } #[throws] - pub async fn collect_packages() -> Option> { + pub async fn collect_packages() -> Vec { let packages: Vec = Commander::program_packages().collect(); if packages.is_empty() { throw!(Error::NoProgramsFound) } else { - Some(packages) + packages } } #[throws] - pub async fn obtain_program_idl(packages: &[Package]) -> Option { - let idl_programs = packages.iter().map(|package| async move { + pub async fn obtain_program_idl(packages: &[Package]) -> Idl { + let connections = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + for package in packages.iter() { + let is_running = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); + let is_running_for_thread = std::sync::Arc::clone(&is_running); + + let name = package.name.clone(); + let conn = connections.clone(); + let cargo_thread = std::thread::spawn(move || -> Result<(), Error> { + let output = std::process::Command::new("cargo") + .arg("+nightly") + .arg("rustc") + .args(["--package", &name]) + .arg("--profile=check") + .arg("--") + .arg("-Zunpretty=expanded") + .output() + .unwrap(); + + if output.status.success() { + let code = String::from_utf8(output.stdout).unwrap(); + let idl_program = idl::parse_to_idl_program(&name, &code).unwrap(); + let mut vec = conn.lock().unwrap(); + vec.push(idl_program); + is_running_for_thread.store(false, std::sync::atomic::Ordering::SeqCst); + Ok(()) + } else { + let error_text = String::from_utf8(output.stderr).unwrap(); + is_running_for_thread.store(false, std::sync::atomic::Ordering::SeqCst); + Err(Error::ReadProgramCodeFailed(error_text)) + } + }); + + let progress_bar = ProgressBar::new_spinner(); + progress_bar.set_style( + ProgressStyle::default_spinner() + .template("{spinner} {wide_msg}") + .unwrap(), + ); + let name = &package.name; - let output = std::process::Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", name]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - .unwrap(); - if output.status.success() { - let code = String::from_utf8(output.stdout)?; - Ok(idl::parse_to_idl_program(name, &code).await?) - } else { - let error_text = String::from_utf8(output.stderr)?; - Err(Error::ReadProgramCodeFailed(error_text)) + let msg = format!("Expanding macros for {name}..."); + progress_bar.set_message(msg); + while is_running.load(std::sync::atomic::Ordering::SeqCst) { + progress_bar.inc(1); + std::thread::sleep(std::time::Duration::from_millis(100)); } - }); - Some(Idl { - programs: try_join_all(idl_programs).await?, - }) + + progress_bar.finish_and_clear(); + cargo_thread.join().unwrap()?; + } + let idl_programs = connections.lock().unwrap().to_vec(); + + if idl_programs.is_empty() { + throw!(Error::NoProgramsFound); + } else { + Idl { + programs: idl_programs, + } + } } #[throws] pub async fn clean_anchor_target() { @@ -190,7 +226,7 @@ impl Commander { /// the user. // TODO is this relevant when program_client should not be changed by user ? #[throws] - pub async fn parse_program_client_imports() -> Option> { + pub async fn parse_program_client_imports() -> Vec { let output = std::process::Command::new("cargo") .arg("+nightly") .arg("rustc") @@ -222,13 +258,13 @@ impl Commander { if use_modules.is_empty() { use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) } - Some(use_modules) + use_modules } else { let mut use_modules: Vec = vec![]; if use_modules.is_empty() { use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) } - Some(use_modules) + use_modules } } diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index 235441dc..f275d6e2 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -97,6 +97,7 @@ use heck::{ToSnakeCase, ToUpperCamelCase}; use quote::ToTokens; use thiserror::Error; + static ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; #[derive(Error, Debug)] @@ -107,51 +108,53 @@ pub enum Error { MissingOrInvalidProgramItems(&'static str), } -#[derive(Debug)] +#[derive(Debug, Clone, Default)] pub struct Idl { pub programs: Vec, } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct IdlName { pub snake_case: String, pub upper_camel_case: String, } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct IdlProgram { pub name: IdlName, pub id: String, pub instruction_account_pairs: Vec<(IdlInstruction, IdlAccountGroup)>, } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct IdlInstruction { pub name: IdlName, pub parameters: Vec<(String, String)>, } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct IdlAccountGroup { pub name: IdlName, pub accounts: Vec<(String, String)>, } -pub async fn parse_to_idl_program(name: &String, code: &str) -> Result { +pub fn parse_to_idl_program(name: &String, code: &str) -> Result { let mut static_program_id = None::; let mut mod_private = None::; let mut mod_instruction = None::; let mut account_mods = Vec::::new(); - for item in syn::parse_file(code)?.items.into_iter() { + let items = syn::parse_file(code)?.items; + + for item in items.iter() { match item { syn::Item::Static(item_static) if item_static.ident == "ID" => { - static_program_id = Some(item_static); + static_program_id = Some(item_static.clone()); } syn::Item::Mod(item_mod) => match item_mod.ident.to_string().as_str() { - "__private" => mod_private = Some(item_mod), - "instruction" => mod_instruction = Some(item_mod), - _ => set_account_modules(&mut account_mods, item_mod), + "__private" => mod_private = Some(item_mod.clone()), + "instruction" => mod_instruction = Some(item_mod.clone()), + _ => set_account_modules(&mut account_mods, item_mod.clone()), }, _ => (), } diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 5f339eb5..31c27727 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -88,11 +88,8 @@ pub mod constants { pub const POC_TEST: &str = "test.rs"; pub const FUZZ_TEST: &str = "test_fuzz.rs"; - // pub const FUZZ_DIRECTORY: &str = "fuzz_0"; - // pub const FUZZ: &str = "fuzz_target.rs"; pub const PROGRAM_STUBS: &str = "program_stubs.rs"; - //pub const PROGRAM_STUBS_ENTRIES: &str = "// ### \"Entrypoints go above\" ###"; pub const HFUZZ_TARGET: &str = "hfuzz_target"; pub const HFUZZ_WORKSPACE: &str = "hfuzz_workspace"; diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index adb1623f..162d7294 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -40,9 +40,9 @@ pub enum Error { pub struct WorkspaceBuilder { root: PathBuf, - idl: Option, - use_tokens: Option>, - packages: Option>, + idl: Idl, + use_tokens: Vec, + packages: Vec, } impl Default for WorkspaceBuilder { fn default() -> Self { @@ -53,15 +53,18 @@ impl WorkspaceBuilder { pub fn new_with_root(root: String) -> Self { Self { root: Path::new(&root).to_path_buf(), - idl: None, - use_tokens: None, - packages: None, + idl: Idl::default(), + use_tokens: vec![], + packages: vec![], } } #[throws] pub async fn build(&mut self, arch: &str) { - self.build_and_parse(arch).await?; + self.extract_data(arch).await?; + // FIXME have to think about this because if we have structure + // with multiple cargo manifests we probably cannot update + // here every cargo. // automatically generated so we should be ok with updating this self.update_program_client().await?; //self.update_program_stubs().await?; @@ -80,7 +83,7 @@ impl WorkspaceBuilder { /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_fuzz(&mut self, arch: &str) { - self.build_and_parse(arch).await?; + self.extract_data(arch).await?; self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; @@ -96,7 +99,7 @@ impl WorkspaceBuilder { /// - generates Trdelnik manifest file #[throws] pub async fn initialize_poc(&mut self, arch: &str) { - self.build_and_parse(arch).await?; + self.extract_data(arch).await?; self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; @@ -112,7 +115,7 @@ impl WorkspaceBuilder { /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_both(&mut self, arch: &str) { - self.build_and_parse(arch).await?; + self.extract_data(arch).await?; self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; @@ -126,18 +129,16 @@ impl WorkspaceBuilder { /// - obtains program names and paths /// - obtains data for generating program client #[throws] - async fn build_and_parse(&mut self, arch: &str) { - // build first , so we now that the programs are ok - Commander::build_programs(arch).await?; + async fn extract_data(&mut self, _arch: &str) { + // FIXME we do not need to build + // however maybe consider using anchor build ? + // it is required for PoC tests + // Commander::build_programs(arch).await?; // this will already throws an error if no packages are found self.packages = Commander::collect_packages().await?; - - println!("--> Generating source codes ... <--"); - // FIXME try to be more creative with the terminal info - let packages = self.packages.as_ref().unwrap(); - self.idl = Commander::obtain_program_idl(packages).await?; - self.use_tokens = Commander::parse_program_client_imports().await?; - println!("\x1b[92mSuccesfully\x1b[0m obtained."); + self.idl = Commander::obtain_program_idl(&self.packages).await?; + // FIXME do we actually need this ? + //self.use_tokens = Commander::parse_program_client_imports().await?; } /// - adds new Fuzz test template to the trdelnik-tests folder #[throws] @@ -165,10 +166,8 @@ impl WorkspaceBuilder { self.add_program_dependencies(&crate_path, "dependencies") .await?; - let program_client = program_client_generator::generate_source_code( - self.idl.as_ref().unwrap(), - self.use_tokens.as_ref().unwrap(), - ); + let program_client = + program_client_generator::generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.create_file(&lib_path, &program_client).await?; @@ -184,11 +183,10 @@ impl WorkspaceBuilder { async fn add_new_fuzz_test(&self) { // this check should be ensured within package collection , but // we anyway have to unwrap option and doeble check wont hurt - let program_name = match &self.packages { - Some(packages) => &packages.first().unwrap().name, - None => { - throw!(Error::NoProgramsFound) - } + let program_name = if !&self.packages.is_empty() { + &self.packages.first().unwrap().name + } else { + throw!(Error::NoProgramsFound) }; let fuzz_dir_path = self @@ -298,11 +296,10 @@ impl WorkspaceBuilder { // INFO only one POC test file needed // as we can implement multiple test paths within one file so no need to create // or add new test files, however can be added in the future - let program_name = match &self.packages { - Some(packages) => &packages.first().unwrap().name, - None => { - throw!(Error::NoProgramsFound) - } + let program_name = if !&self.packages.is_empty() { + &self.packages.first().unwrap().name + } else { + throw!(Error::NoProgramsFound) }; let poc_dir_path = self @@ -414,12 +411,14 @@ impl WorkspaceBuilder { /// - updates program client generated source code #[throws] async fn update_program_client(&self) { + let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); let lib_path = self.root.join(PROGRAM_CLIENT_DIRECTORY).join(SRC).join(LIB); - let program_client = program_client_generator::generate_source_code( - self.idl.as_ref().unwrap(), - self.use_tokens.as_ref().unwrap(), - ); + self.add_program_dependencies(&crate_path, "dependencies") + .await?; + + let program_client = + program_client_generator::generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.update_file(&lib_path, &program_client).await?; @@ -451,7 +450,7 @@ impl WorkspaceBuilder { } None => { members.push(new_member); - println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{CARGO}\x1b[0m with \x1b[93m{member}\x1b[0m."); + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{CARGO}\x1b[0m with \x1b[93m{member}\x1b[0m member."); } }; fs::write(cargo, content.to_string()).await?; @@ -591,30 +590,27 @@ impl WorkspaceBuilder { .and_then(toml::Value::as_table_mut) .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; - match &self.packages { - Some(packages) => { - for package in packages.iter() { - let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); - // INFO this will obtain relative path - // TODO fuzzer need no entry point feature here for program client cargo.toml - let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); - let dep: Value = format!( - r#"{} = {{ path = "{}" }}"#, - package.name, - relative_path.to_str().unwrap() - ) - .parse() - .unwrap(); - if let toml::Value::Table(table) = dep { - let (name, value) = table.into_iter().next().unwrap(); - client_toml_deps.entry(name).or_insert(value.clone()); - } + if !&self.packages.is_empty() { + for package in self.packages.iter() { + let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); + // INFO this will obtain relative path + // TODO fuzzer need no entry point feature here for program client cargo.toml + let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); + let dep: Value = format!( + r#"{} = {{ path = "{}" }}"#, + package.name, + relative_path.to_str().unwrap() + ) + .parse() + .unwrap(); + if let toml::Value::Table(table) = dep { + let (name, value) = table.into_iter().next().unwrap(); + client_toml_deps.entry(name).or_insert(value.clone()); } - fs::write(cargo_path, cargo_toml_content.to_string()).await?; - } - None => { - throw!(Error::NoProgramsFound) } + fs::write(cargo_path, cargo_toml_content.to_string()).await?; + } else { + throw!(Error::NoProgramsFound) } } diff --git a/crates/client/tests/test.rs b/crates/client/tests/test.rs index a42675c7..6e164300 100644 --- a/crates/client/tests/test.rs +++ b/crates/client/tests/test.rs @@ -22,7 +22,7 @@ pub async fn generate_program_client() { let program_name = String::from("escrow"); let program_idl = - trdelnik_client::idl::parse_to_idl_program(&program_name, expanded_anchor_program).await?; + trdelnik_client::idl::parse_to_idl_program(&program_name, expanded_anchor_program)?; let idl = trdelnik_client::idl::Idl { programs: vec![program_idl], From 40058ff311e50ef7f0f8ccf1620975f08780bad5 Mon Sep 17 00:00:00 2001 From: lukacan Date: Tue, 19 Dec 2023 10:54:51 +0100 Subject: [PATCH 33/57] =?UTF-8?q?=F0=9F=90=9B=20function=20needed=20as=20i?= =?UTF-8?q?t=20at=20least=20addds=20default=20use=20statement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/workspace_builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 162d7294..63a8c67d 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -17,7 +17,6 @@ use toml::{ Value, }; -//---- use crate::constants::*; use crate::idl::Idl; use crate::program_client_generator; @@ -131,6 +130,7 @@ impl WorkspaceBuilder { #[throws] async fn extract_data(&mut self, _arch: &str) { // FIXME we do not need to build + // if we do not build , arch maybe unnecessary // however maybe consider using anchor build ? // it is required for PoC tests // Commander::build_programs(arch).await?; @@ -138,7 +138,7 @@ impl WorkspaceBuilder { self.packages = Commander::collect_packages().await?; self.idl = Commander::obtain_program_idl(&self.packages).await?; // FIXME do we actually need this ? - //self.use_tokens = Commander::parse_program_client_imports().await?; + self.use_tokens = Commander::parse_program_client_imports().await?; } /// - adds new Fuzz test template to the trdelnik-tests folder #[throws] @@ -594,7 +594,7 @@ impl WorkspaceBuilder { for package in self.packages.iter() { let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); // INFO this will obtain relative path - // TODO fuzzer need no entry point feature here for program client cargo.toml + // TODO fuzzer needs no entry point feature here for program client cargo.toml let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); let dep: Value = format!( r#"{} = {{ path = "{}" }}"#, From a1343d686c11d1e66249cd26e7ebe8fe4a577681 Mon Sep 17 00:00:00 2001 From: andrej Date: Fri, 22 Dec 2023 12:35:15 +0100 Subject: [PATCH 34/57] =?UTF-8?q?=F0=9F=8E=A8=20Grouped=20poc=20imports=20?= =?UTF-8?q?within=20poctesting=20module,=20some=20deps=20can=20be=20option?= =?UTF-8?q?al=20now,=20added=20references=20within=20the=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/Cargo.toml | 13 +- crates/client/src/client.rs | 401 ++++++++------ crates/client/src/commander.rs | 212 +++---- crates/client/src/idl.rs | 522 +++++++++--------- crates/client/src/keys.rs | 23 +- crates/client/src/lib.rs | 81 +-- crates/client/src/program_client_generator.rs | 18 +- crates/client/src/temp_clone.rs | 7 +- .../templates/trdelnik-tests/Cargo.toml.tmpl | 26 - .../trdelnik-tests/Cargo_fuzz.toml.tmpl | 1 + .../trdelnik-tests/Cargo_poc.toml.tmpl | 4 +- .../templates/trdelnik-tests/fuzz_target.rs | 71 --- .../trdelnik-tests/fuzz_test.tmpl.rs | 80 +++ .../{test.rs => poc_test.tmpl.rs} | 11 +- crates/client/src/workspace_builder.rs | 24 +- crates/client/tests/test.rs | 10 +- .../tests/test_data/expected_client_code.rs | 212 +++---- crates/test/src/lib.rs | 10 +- crates/test/tests/expand/basic.expanded.rs | 10 +- .../test/tests/expand/with_root.expanded.rs | 10 +- examples/escrow/.program_client/src/lib.rs | 212 +++---- .../trdelnik-tests/poc_tests/Cargo.toml | 4 +- .../trdelnik-tests/poc_tests/tests/test.rs | 145 ++--- examples/fuzzer/.program_client/src/lib.rs | 79 +-- .../fuzz_tests/fuzz_0/test_fuzz.rs | 67 ++- .../fuzz_tests/fuzz_1/test_fuzz.rs | 70 ++- examples/turnstile/.program_client/src/lib.rs | 89 +-- .../trdelnik-tests/poc_tests/Cargo.toml | 3 +- .../trdelnik-tests/poc_tests/tests/test.rs | 28 +- 29 files changed, 1303 insertions(+), 1140 deletions(-) delete mode 100644 crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl delete mode 100644 crates/client/src/templates/trdelnik-tests/fuzz_target.rs create mode 100644 crates/client/src/templates/trdelnik-tests/fuzz_test.tmpl.rs rename crates/client/src/templates/trdelnik-tests/{test.rs => poc_test.tmpl.rs} (79%) diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 0d1fef56..fdc7c2b4 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -14,6 +14,7 @@ fuzzing = [ "arbitrary/derive", "quinn-proto/arbitrary", ] +poctesting = ["dep:rstest", "dep:serial_test","dep:trdelnik-test"] [build-dependencies] anyhow = { version = "1.0.45", features = ["std"], default-features = false } @@ -22,16 +23,15 @@ anyhow = { version = "1.0.45", features = ["std"], default-features = false } pretty_assertions = "1.1.0" [dependencies] -trdelnik-test = { workspace = true } solana-sdk = { workspace = true } solana-cli-output = { workspace = true } solana-transaction-status = { workspace = true } solana-account-decoder = { workspace = true } anchor-client = { workspace = true } +anchor-lang = {version = "0.28.0"} spl-token = { workspace = true } spl-associated-token-account = { workspace = true } tokio = { workspace = true } -rand = { workspace = true } serde_json = { workspace = true } serde = { workspace = true } bincode = { workspace = true } @@ -40,7 +40,6 @@ futures = { workspace = true } fehler = { workspace = true } thiserror = { workspace = true } ed25519-dalek = { workspace = true } -serial_test = { workspace = true } anyhow = { workspace = true } cargo_metadata = { workspace = true } syn = { workspace = true } @@ -48,12 +47,14 @@ quote = { workspace = true } heck = { workspace = true } toml = { workspace = true } log = { workspace = true } -rstest = { workspace = true } -lazy_static = { workspace = true } + +trdelnik-test = { workspace = true,optional = true } +serial_test = { version = "2.0.0", optional = true } +rstest = { version = "0.18.2", optional = true } honggfuzz = { version = "0.5.55", optional = true } arbitrary = { version = "1.3.0", optional = true } solana-program-test = { version = "1.16.9", optional = true } quinn-proto = { version = "0.9.4", optional = true } shellexpand = { workspace = true } pathdiff = "0.2.1" -indicatif="0.17.7" +indicatif = "0.17.7" diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 0ddef422..eb7a562a 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -1,63 +1,47 @@ -use crate::{config::Config, Reader, TempClone}; -use anchor_client::{ - anchor_lang::{ - prelude::System, solana_program::program_pack::Pack, AccountDeserialize, Id, - InstructionData, ToAccountMetas, - }, - solana_client::rpc_config::RpcTransactionConfig, - solana_sdk::{ - account::Account, - bpf_loader, - commitment_config::CommitmentConfig, - instruction::Instruction, - loader_instruction, - pubkey::Pubkey, - signature::read_keypair_file, - signer::{keypair::Keypair, Signer}, - system_instruction, - transaction::Transaction, - }, - Client as AnchorClient, ClientError as Error, Cluster, Program, -}; - -use borsh::BorshDeserialize; +use crate::{constants::*, Config, Reader, TempClone}; + +use anchor_client; +use anchor_client::ClientError as Error; +// TODO maybe can deleted +use borsh; use fehler::{throw, throws}; -use futures::stream::{self, StreamExt}; -use log::debug; -use serde::de::DeserializeOwned; -use solana_account_decoder::parse_token::UiTokenAmount; -use solana_cli_output::display::println_transaction; -use solana_transaction_status::{EncodedConfirmedTransactionWithStatusMeta, UiTransactionEncoding}; -use spl_associated_token_account::get_associated_token_address; -use spl_associated_token_account::instruction::create_associated_token_account; -use std::{mem, rc::Rc}; -use std::{thread::sleep, time::Duration}; +use solana_sdk::program_pack::Pack; +use solana_sdk::signer::Signer; +// TODO maybe can deleted +use futures::{self, StreamExt}; +use log; +// TODO maybe can deleted +use serde; +// TODO maybe can deleted +use solana_account_decoder; +// TODO maybe can deleted +use solana_cli_output; +use solana_transaction_status; +use spl_associated_token_account; // @TODO: Make compatible with the latest Anchor deps. // https://github.com/project-serum/anchor/pull/1307#issuecomment-1022592683 -const RETRY_LOCALNET_EVERY_MILLIS: u64 = 500; -const DEFAULT_KEYPAIR_PATH: &str = "~/.config/solana/id.json"; - -type Payer = Rc; +type Payer = std::rc::Rc; /// `Client` allows you to send typed RPC requests to a Solana cluster. pub struct Client { - payer: Keypair, - anchor_client: AnchorClient, + payer: solana_sdk::signer::keypair::Keypair, + anchor_client: anchor_client::Client, } /// Implement Default trait for Client, which reads keypair from default path for `solana-keygen new` impl Default for Client { fn default() -> Self { - let payer = read_keypair_file(&*shellexpand::tilde(DEFAULT_KEYPAIR_PATH)) - .unwrap_or_else(|_| panic!("Default keypair {DEFAULT_KEYPAIR_PATH} not found.")); + let payer = + solana_sdk::signature::read_keypair_file(&*shellexpand::tilde(DEFAULT_KEYPAIR_PATH)) + .unwrap_or_else(|_| panic!("Default keypair {DEFAULT_KEYPAIR_PATH} not found.")); Self { payer: payer.clone(), - anchor_client: AnchorClient::new_with_options( - Cluster::Localnet, - Rc::new(payer), - CommitmentConfig::confirmed(), + anchor_client: anchor_client::Client::new_with_options( + anchor_client::Cluster::Localnet, + std::rc::Rc::new(payer), + solana_sdk::commitment_config::CommitmentConfig::confirmed(), ), } } @@ -65,30 +49,33 @@ impl Default for Client { impl Client { /// Creates a new `Client` instance. - pub fn new(payer: Keypair) -> Self { + pub fn new(payer: solana_sdk::signer::keypair::Keypair) -> Self { Self { payer: payer.clone(), - anchor_client: AnchorClient::new_with_options( - Cluster::Localnet, - Rc::new(payer), - CommitmentConfig::confirmed(), + anchor_client: anchor_client::Client::new_with_options( + anchor_client::Cluster::Localnet, + std::rc::Rc::new(payer), + solana_sdk::commitment_config::CommitmentConfig::confirmed(), ), } } /// Gets client's payer. - pub fn payer(&self) -> &Keypair { + pub fn payer(&self) -> &solana_sdk::signer::keypair::Keypair { &self.payer } /// Gets the internal Anchor client to call Anchor client's methods directly. - pub fn anchor_client(&self) -> &AnchorClient { + pub fn anchor_client(&self) -> &anchor_client::Client { &self.anchor_client } /// Creates [Program] instance to communicate with the selected program. - pub fn program(&self, program_id: Pubkey) -> Program { - self.anchor_client.program(program_id).unwrap() + pub fn program( + &self, + program_id: &solana_sdk::pubkey::Pubkey, + ) -> anchor_client::Program { + self.anchor_client.program(*program_id).unwrap() } /// Finds out if the Solana localnet is running. @@ -100,7 +87,7 @@ impl Client { let rpc_client = self .anchor_client - .program(System::id()) + .program(solana_sdk::system_program::ID) .unwrap() .async_rpc(); @@ -113,7 +100,9 @@ impl Client { return true; } if retry { - sleep(Duration::from_millis(RETRY_LOCALNET_EVERY_MILLIS)); + std::thread::sleep(std::time::Duration::from_millis( + RETRY_LOCALNET_EVERY_MILLIS, + )); } } false @@ -128,12 +117,15 @@ impl Client { /// - the Solana cluster is not running. /// - deserialization failed. #[throws] - pub async fn account_data(&self, account: Pubkey) -> T + pub async fn account_data(&self, account: &solana_sdk::pubkey::Pubkey) -> T where - T: AccountDeserialize + Send + 'static, + T: anchor_lang::AccountDeserialize + Send + 'static, { - let program = self.anchor_client.program(System::id()).unwrap(); - program.account::(account).await.unwrap() + let program = self + .anchor_client + .program(solana_sdk::system_program::ID) + .unwrap(); + program.account::(*account).await.unwrap() } /// Gets deserialized data from the chosen account serialized with Bincode @@ -145,9 +137,9 @@ impl Client { /// - the Solana cluster is not running. /// - deserialization failed. #[throws] - pub async fn account_data_bincode(&self, account: Pubkey) -> T + pub async fn account_data_bincode(&self, account: &solana_sdk::pubkey::Pubkey) -> T where - T: DeserializeOwned + Send + 'static, + T: serde::de::DeserializeOwned + Send + 'static, { let account = self .get_account(account) @@ -167,9 +159,9 @@ impl Client { /// - the Solana cluster is not running. /// - deserialization failed. #[throws] - pub async fn account_data_borsh(&self, account: Pubkey) -> T + pub async fn account_data_borsh(&self, account: &solana_sdk::pubkey::Pubkey) -> T where - T: BorshDeserialize + Send + 'static, + T: borsh::BorshDeserialize + Send + 'static, { let account = self .get_account(account) @@ -186,8 +178,14 @@ impl Client { /// /// It fails when the Solana cluster is not running. #[throws] - pub async fn get_account(&self, account: Pubkey) -> Option { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + pub async fn get_account( + &self, + account: &solana_sdk::pubkey::Pubkey, + ) -> Option { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); rpc_client .get_account_with_commitment(&account, rpc_client.commitment()) .await @@ -207,7 +205,7 @@ impl Client { /// state: Pubkey, /// user: Pubkey, /// system_program: Pubkey, - /// signers: impl IntoIterator + Send + 'static, + /// signers: impl IntoIterator + Send, /// ) -> Result { /// Ok(client /// .send_instruction( @@ -226,26 +224,29 @@ impl Client { #[throws] pub async fn send_instruction( &self, - program: Pubkey, - instruction: impl InstructionData + Send + 'static, - accounts: impl ToAccountMetas + Send + 'static, - signers: impl IntoIterator + Send + 'static, - ) -> EncodedConfirmedTransactionWithStatusMeta { + program: solana_sdk::pubkey::Pubkey, + instruction: impl anchor_lang::InstructionData + Send, + accounts: impl anchor_lang::ToAccountMetas + Send, + signers: impl IntoIterator + Send, + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { let program = self.anchor_client.program(program).unwrap(); let mut request = program.request().args(instruction).accounts(accounts); let signers = signers.into_iter().collect::>(); - for signer in &signers { + for signer in signers { request = request.signer(signer); } let signature = request.send().await.unwrap(); - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); rpc_client .get_transaction_with_config( &signature, - RpcTransactionConfig { - encoding: Some(UiTransactionEncoding::Binary), - commitment: Some(CommitmentConfig::confirmed()), + anchor_client::solana_client::rpc_config::RpcTransactionConfig { + encoding: Some(solana_transaction_status::UiTransactionEncoding::Binary), + commitment: Some(solana_sdk::commitment_config::CommitmentConfig::confirmed()), max_supported_transaction_version: None, }, ) @@ -282,18 +283,18 @@ impl Client { #[throws] pub async fn send_transaction( &self, - instructions: &[Instruction], - signers: impl IntoIterator + Send, - ) -> EncodedConfirmedTransactionWithStatusMeta { + instructions: &[solana_sdk::instruction::Instruction], + signers: impl IntoIterator + Send, + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { let rpc_client = self .anchor_client - .program(System::id()) + .program(solana_sdk::system_program::ID) .unwrap() .async_rpc(); let mut signers = signers.into_iter().collect::>(); signers.push(self.payer()); - let tx = &Transaction::new_signed_with_payer( + let tx = &solana_sdk::transaction::Transaction::new_signed_with_payer( instructions, Some(&self.payer.pubkey()), &signers, @@ -304,9 +305,9 @@ impl Client { let transaction = rpc_client .get_transaction_with_config( &signature, - RpcTransactionConfig { - encoding: Some(UiTransactionEncoding::Binary), - commitment: Some(CommitmentConfig::confirmed()), + anchor_client::solana_client::rpc_config::RpcTransactionConfig { + encoding: Some(solana_transaction_status::UiTransactionEncoding::Binary), + commitment: Some(solana_sdk::commitment_config::CommitmentConfig::confirmed()), max_supported_transaction_version: None, }, ) @@ -318,10 +319,10 @@ impl Client { /// Airdrops lamports to the chosen account. #[throws] - pub async fn airdrop(&self, address: Pubkey, lamports: u64) { + pub async fn airdrop(&self, address: &solana_sdk::pubkey::Pubkey, lamports: u64) { let rpc_client = self .anchor_client - .program(System::id()) + .program(solana_sdk::system_program::ID) .unwrap() .async_rpc(); @@ -333,11 +334,11 @@ impl Client { let (airdrop_result, error) = loop { match rpc_client.get_signature_status(&signature).await.unwrap() { Some(Ok(_)) => { - debug!("{} lamports airdropped", lamports); + log::debug!("{} lamports airdropped", lamports); break (true, None); } Some(Err(transaction_error)) => break (false, Some(transaction_error)), - None => sleep(Duration::from_millis(500)), + None => std::thread::sleep(std::time::Duration::from_millis(500)), } }; if !airdrop_result { @@ -347,16 +348,25 @@ impl Client { /// Get balance of an account #[throws] - pub async fn get_balance(&mut self, address: &Pubkey) -> u64 { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + pub async fn get_balance(&mut self, address: &solana_sdk::pubkey::Pubkey) -> u64 { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); rpc_client.get_balance(address).await? } /// Get token balance of an token account #[throws] - pub async fn get_token_balance(&mut self, address: Pubkey) -> UiTokenAmount { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); - rpc_client.get_token_account_balance(&address).await? + pub async fn get_token_balance( + &mut self, + address: &solana_sdk::pubkey::Pubkey, + ) -> solana_account_decoder::parse_token::UiTokenAmount { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); + rpc_client.get_token_account_balance(address).await? } /// Deploys a program based on it's name. @@ -392,8 +402,12 @@ impl Client { /// client.deploy_program(program_keypair(1), "turnstile"); /// ``` #[throws] - pub async fn deploy_by_name(&self, program_keypair: &Keypair, program_name: &str) { - debug!("reading program data"); + pub async fn deploy_by_name( + &self, + program_keypair: &solana_sdk::signer::keypair::Keypair, + program_name: &str, + ) { + log::debug!("reading program data"); let reader = Reader::new(); @@ -402,17 +416,17 @@ impl Client { .await .expect("reading program data failed"); - debug!("airdropping the minimum balance required to deploy the program"); + log::debug!("airdropping the minimum balance required to deploy the program"); // TODO: This will fail on devnet where airdrops are limited to 1 SOL - self.airdrop(self.payer().pubkey(), 5_000_000_000) + self.airdrop(&self.payer().pubkey(), 5_000_000_000) .await .expect("airdropping for deployment failed"); - debug!("deploying program"); + log::debug!("deploying program"); - self.deploy(program_keypair.clone(), mem::take(&mut program_data)) + self.deploy(program_keypair, std::mem::take(&mut program_data)) .await?; // this will slow down the process because if we call program instruction right after deploy, @@ -420,12 +434,12 @@ impl Client { let deploy_done = loop { match self.anchor_client.program(program_keypair.pubkey()) { Ok(_) => { - debug!("program deployed succefully"); - sleep(Duration::from_millis(1000)); + log::debug!("program deployed succefully"); + std::thread::sleep(std::time::Duration::from_millis(1000)); break true; } Err(_) => { - sleep(Duration::from_millis(500)); + std::thread::sleep(std::time::Duration::from_millis(500)); } } }; @@ -440,98 +454,111 @@ impl Client { /// Deploys the program. #[throws] - async fn deploy(&self, program_keypair: Keypair, program_data: Vec) { + async fn deploy( + &self, + program_keypair: &solana_sdk::signer::keypair::Keypair, + program_data: Vec, + ) { const PROGRAM_DATA_CHUNK_SIZE: usize = 900; let program_data_len = program_data.len(); let rpc_client = self .anchor_client - .program(System::id()) + .program(solana_sdk::system_program::ID) .unwrap() .async_rpc(); - let system_program = self.anchor_client.program(System::id()).unwrap(); + let system_program = self + .anchor_client + .program(solana_sdk::system_program::ID) + .unwrap(); - debug!("program_data_len: {}", program_data_len); + log::debug!("program_data_len: {}", program_data_len); - debug!("create program account"); + log::debug!("create program account"); let min_balance_for_rent_exemption = rpc_client .get_minimum_balance_for_rent_exemption(program_data_len) .await .unwrap(); - let create_account_ix: Instruction = system_instruction::create_account( - &self.payer.pubkey(), - &program_keypair.pubkey(), - min_balance_for_rent_exemption, - program_data_len as u64, - &bpf_loader::id(), - ); + let create_account_ix: solana_sdk::instruction::Instruction = + solana_sdk::system_instruction::create_account( + &self.payer.pubkey(), + &program_keypair.pubkey(), + min_balance_for_rent_exemption, + program_data_len as u64, + &solana_sdk::bpf_loader::id(), + ); system_program .request() .instruction(create_account_ix) - .signer(&program_keypair) + .signer(program_keypair) .send() .await .unwrap(); - debug!("write program data"); + log::debug!("write program data"); let mut offset = 0usize; let mut futures_vec = Vec::new(); for chunk in program_data.chunks(PROGRAM_DATA_CHUNK_SIZE) { - let loader_write_ix = loader_instruction::write( + let loader_write_ix = solana_sdk::loader_instruction::write( &program_keypair.pubkey(), - &bpf_loader::id(), + &solana_sdk::bpf_loader::id(), offset as u32, chunk.to_vec(), ); futures_vec.push(async { - let system_program = self.anchor_client.program(System::id()).unwrap(); + let system_program = self + .anchor_client + .program(solana_sdk::system_program::ID) + .unwrap(); system_program .request() .instruction(loader_write_ix) - .signer(&program_keypair) + .signer(program_keypair) .send() .await .unwrap(); }); offset += chunk.len(); } - stream::iter(futures_vec) + futures::stream::iter(futures_vec) .buffer_unordered(500) .collect::>() .await; - debug!("finalize program"); + log::debug!("finalize program"); - let loader_finalize_ix = - loader_instruction::finalize(&program_keypair.pubkey(), &bpf_loader::id()); + let loader_finalize_ix = solana_sdk::loader_instruction::finalize( + &program_keypair.pubkey(), + &solana_sdk::bpf_loader::id(), + ); system_program .request() .instruction(loader_finalize_ix) - .signer(&program_keypair) + .signer(program_keypair) .send() .await .unwrap(); - debug!("program deployed"); + log::debug!("program deployed"); } /// Creates accounts. #[throws] pub async fn create_account( &self, - keypair: &Keypair, + keypair: &solana_sdk::signer::keypair::Keypair, lamports: u64, space: u64, - owner: &Pubkey, - ) -> EncodedConfirmedTransactionWithStatusMeta { + owner: &solana_sdk::pubkey::Pubkey, + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { self.send_transaction( - &[system_instruction::create_account( + &[solana_sdk::system_instruction::create_account( &self.payer().pubkey(), &keypair.pubkey(), lamports, @@ -547,13 +574,16 @@ impl Client { #[throws] pub async fn create_account_rent_exempt( &mut self, - keypair: &Keypair, + keypair: &solana_sdk::signer::keypair::Keypair, space: u64, - owner: &Pubkey, - ) -> EncodedConfirmedTransactionWithStatusMeta { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + owner: &solana_sdk::pubkey::Pubkey, + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); self.send_transaction( - &[system_instruction::create_account( + &[solana_sdk::system_instruction::create_account( &self.payer().pubkey(), &keypair.pubkey(), rpc_client @@ -571,15 +601,18 @@ impl Client { #[throws] pub async fn create_token_mint( &self, - mint: &Keypair, - authority: Pubkey, - freeze_authority: Option, + mint: &solana_sdk::signer::keypair::Keypair, + authority: &solana_sdk::pubkey::Pubkey, + freeze_authority: Option<&solana_sdk::pubkey::Pubkey>, decimals: u8, - ) -> EncodedConfirmedTransactionWithStatusMeta { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); self.send_transaction( &[ - system_instruction::create_account( + solana_sdk::system_instruction::create_account( &self.payer().pubkey(), &mint.pubkey(), rpc_client @@ -591,8 +624,8 @@ impl Client { spl_token::instruction::initialize_mint( &spl_token::ID, &mint.pubkey(), - &authority, - freeze_authority.as_ref(), + authority, + freeze_authority, decimals, ) .unwrap(), @@ -606,16 +639,16 @@ impl Client { #[throws] pub async fn mint_tokens( &self, - mint: Pubkey, - authority: &Keypair, - account: Pubkey, + mint: &solana_sdk::pubkey::Pubkey, + authority: &solana_sdk::signer::keypair::Keypair, + account: &solana_sdk::pubkey::Pubkey, amount: u64, - ) -> EncodedConfirmedTransactionWithStatusMeta { + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { self.send_transaction( &[spl_token::instruction::mint_to( &spl_token::ID, - &mint, - &account, + mint, + account, &authority.pubkey(), &[], amount, @@ -631,14 +664,17 @@ impl Client { #[throws] pub async fn create_token_account( &self, - account: &Keypair, - mint: &Pubkey, - owner: &Pubkey, - ) -> EncodedConfirmedTransactionWithStatusMeta { - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + account: &solana_sdk::signer::keypair::Keypair, + mint: &solana_sdk::pubkey::Pubkey, + owner: &solana_sdk::pubkey::Pubkey, + ) -> solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); self.send_transaction( &[ - system_instruction::create_account( + solana_sdk::system_instruction::create_account( &self.payer().pubkey(), &account.pubkey(), rpc_client @@ -662,36 +698,49 @@ impl Client { /// Executes a transaction constructing the associated token account of the specified mint belonging to the owner. This will fail if the account already exists. #[throws] - pub async fn create_associated_token_account(&self, owner: &Keypair, mint: Pubkey) -> Pubkey { + pub async fn create_associated_token_account( + &self, + owner: &solana_sdk::signer::keypair::Keypair, + mint: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::pubkey::Pubkey { self.send_transaction( - &[create_associated_token_account( - &self.payer().pubkey(), - &owner.pubkey(), - &mint, - &spl_token::ID, - )], + &[ + spl_associated_token_account::instruction::create_associated_token_account( + &self.payer().pubkey(), + &owner.pubkey(), + &mint, + &spl_token::ID, + ), + ], &[], ) .await?; - get_associated_token_address(&owner.pubkey(), &mint) + spl_associated_token_account::get_associated_token_address(&owner.pubkey(), &mint) } /// Executes a transaction creating and filling the given account with the given data. /// The account is required to be empty and will be owned by bpf_loader afterwards. #[throws] - pub async fn create_account_with_data(&self, account: &Keypair, data: Vec) { + pub async fn create_account_with_data( + &self, + account: &solana_sdk::signer::keypair::Keypair, + data: Vec, + ) { const DATA_CHUNK_SIZE: usize = 900; - let rpc_client = self.anchor_client.program(System::id())?.async_rpc(); + let rpc_client = self + .anchor_client + .program(solana_sdk::system_program::ID)? + .async_rpc(); self.send_transaction( - &[system_instruction::create_account( + &[solana_sdk::system_instruction::create_account( &self.payer().pubkey(), &account.pubkey(), rpc_client .get_minimum_balance_for_rent_exemption(data.len()) .await?, data.len() as u64, - &bpf_loader::id(), + &solana_sdk::bpf_loader::id(), )], [account], ) @@ -699,11 +748,11 @@ impl Client { let mut offset = 0usize; for chunk in data.chunks(DATA_CHUNK_SIZE) { - debug!("writing bytes {} to {}", offset, offset + chunk.len()); + log::debug!("writing bytes {} to {}", offset, offset + chunk.len()); self.send_transaction( - &[loader_instruction::write( + &[solana_sdk::loader_instruction::write( &account.pubkey(), - &bpf_loader::id(), + &solana_sdk::bpf_loader::id(), offset as u32, chunk.to_vec(), )], @@ -726,13 +775,15 @@ pub trait PrintableTransaction { } } -impl PrintableTransaction for EncodedConfirmedTransactionWithStatusMeta { +impl PrintableTransaction for solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta { fn print_named(&self, name: &str) { let tx = self.transaction.transaction.decode().unwrap(); - debug!("EXECUTE {} (slot {})", name, self.slot); + log::debug!("EXECUTE {} (slot {})", name, self.slot); match self.transaction.meta.clone() { - Some(meta) => println_transaction(&tx, Some(&meta), " ", None, None), - _ => println_transaction(&tx, None, " ", None, None), + Some(meta) => { + solana_cli_output::display::println_transaction(&tx, Some(&meta), " ", None, None) + } + _ => solana_cli_output::display::println_transaction(&tx, None, " ", None, None), } } } diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 0116b48e..12e4c4ef 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -1,30 +1,24 @@ -use crate::config::Config; -use crate::{ - idl::{self, Idl}, - Client, -}; -use cargo_metadata::{MetadataCommand, Package}; +use std::io::Write; +use std::os::unix::process::CommandExt; + +use crate::Client; +use crate::Config; +use crate::{Idl, IdlError}; use fehler::{throw, throws}; -use log::debug; -use solana_sdk::signer::keypair::Keypair; -use std::{io, os::unix::process::CommandExt, path::Path, process::Stdio, string::FromUtf8Error}; +use log; use thiserror::Error; -use tokio::{ - fs, - io::AsyncWriteExt, - process::{Child, Command}, - signal, -}; +// TODO maybe unused +use tokio; // ----- use crate::constants::*; -use indicatif::{ProgressBar, ProgressStyle}; +use indicatif; #[derive(Error, Debug)] pub enum Error { #[error("{0:?}")] - Io(#[from] io::Error), + Io(#[from] std::io::Error), #[error("{0:?}")] - Utf8(#[from] FromUtf8Error), + Utf8(#[from] std::string::FromUtf8Error), #[error("localnet is not running")] LocalnetIsNotRunning, #[error("localnet is still running")] @@ -36,7 +30,7 @@ pub enum Error { #[error("read program code failed: '{0}'")] ReadProgramCodeFailed(String), #[error("{0:?}")] - Idl(#[from] idl::Error), + Idl(#[from] IdlError), #[error("{0:?}")] TomlDeserialize(#[from] toml::de::Error), #[error("parsing Cargo.toml dependencies failed")] @@ -53,7 +47,7 @@ pub enum Error { /// Localnet (the validator process) handle. pub struct LocalnetHandle { - solana_test_validator_process: Child, + solana_test_validator_process: tokio::process::Child, } impl LocalnetHandle { @@ -69,10 +63,13 @@ impl LocalnetHandle { #[throws] pub async fn stop(mut self) { self.solana_test_validator_process.kill().await?; - if Client::new(Keypair::new()).is_localnet_running(false).await { + if Client::new(solana_sdk::signature::Keypair::new()) + .is_localnet_running(false) + .await + { throw!(Error::LocalnetIsStillRunning); } - debug!("localnet stopped"); + log::debug!("localnet stopped"); } /// Stops the localnet and removes the ledger. @@ -88,8 +85,8 @@ impl LocalnetHandle { #[throws] pub async fn stop_and_remove_ledger(self) { self.stop().await?; - fs::remove_dir_all("test-ledger").await?; - debug!("ledger removed"); + tokio::fs::remove_dir_all("test-ledger").await?; + log::debug!("ledger removed"); } } @@ -103,8 +100,8 @@ impl Commander { pub async fn build_programs(arch: &str) { let exit = std::process::Command::new("cargo") .arg(arch) - .stdout(Stdio::inherit()) - .stderr(Stdio::inherit()) + .stdout(std::process::Stdio::inherit()) + .stderr(std::process::Stdio::inherit()) .output() .unwrap(); @@ -113,8 +110,8 @@ impl Commander { } } /// Returns an [Iterator] of program [Package]s read from `Cargo.toml` files. - pub fn program_packages() -> impl Iterator { - let cargo_toml_data = MetadataCommand::new() + pub fn program_packages() -> impl Iterator { + let cargo_toml_data = cargo_metadata::MetadataCommand::new() .no_deps() .exec() .expect("Cargo.toml reading failed"); @@ -131,8 +128,8 @@ impl Commander { }) } #[throws] - pub async fn collect_packages() -> Vec { - let packages: Vec = Commander::program_packages().collect(); + pub async fn collect_packages() -> Vec { + let packages: Vec = Commander::program_packages().collect(); if packages.is_empty() { throw!(Error::NoProgramsFound) } else { @@ -141,7 +138,7 @@ impl Commander { } #[throws] - pub async fn obtain_program_idl(packages: &[Package]) -> Idl { + pub async fn obtain_program_idl(packages: &[cargo_metadata::Package]) -> Idl { let connections = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); for package in packages.iter() { let is_running = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); @@ -162,7 +159,7 @@ impl Commander { if output.status.success() { let code = String::from_utf8(output.stdout).unwrap(); - let idl_program = idl::parse_to_idl_program(&name, &code).unwrap(); + let idl_program = Idl::parse_to_idl_program(&name, &code).unwrap(); let mut vec = conn.lock().unwrap(); vec.push(idl_program); is_running_for_thread.store(false, std::sync::atomic::Ordering::SeqCst); @@ -174,9 +171,9 @@ impl Commander { } }); - let progress_bar = ProgressBar::new_spinner(); + let progress_bar = indicatif::ProgressBar::new_spinner(); progress_bar.set_style( - ProgressStyle::default_spinner() + indicatif::ProgressStyle::default_spinner() .template("{spinner} {wide_msg}") .unwrap(), ); @@ -205,16 +202,20 @@ impl Commander { #[throws] pub async fn clean_anchor_target() { // INFO perform anchor clean so no keys will be removed - Command::new("anchor").arg("clean").spawn()?.wait().await?; + tokio::process::Command::new("anchor") + .arg("clean") + .spawn()? + .wait() + .await?; } #[throws] - pub async fn clean_hfuzz_target(root: &Path) { + pub async fn clean_hfuzz_target(root: &std::path::Path) { // INFO hfuzz target can be of course located somewhere else // but as we leave it within the root, we also expect it within the root let hfuzz_target_path = root.join(HFUZZ_TARGET); if hfuzz_target_path.exists() { - fs::remove_dir_all(hfuzz_target_path).await?; + tokio::fs::remove_dir_all(hfuzz_target_path).await?; } else { println!("skipping {} directory: not found", HFUZZ_TARGET) } @@ -224,48 +225,57 @@ impl Commander { /// The goal of this method is to find all `use` statements defined by the user in the `.program_client` /// crate. It solves the problem with regenerating the program client and removing imports defined by /// the user. - // TODO is this relevant when program_client should not be changed by user ? #[throws] pub async fn parse_program_client_imports() -> Vec { - let output = std::process::Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", "program_client"]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - .unwrap(); + // TODO + // We have two options here, write that this file is fully generated so + // aditional changes will be rewritten by trdelnik build, or we can + // actually parse the use statements + // let output = std::process::Command::new("cargo") + // .arg("+nightly") + // .arg("rustc") + // .args(["--package", "program_client"]) + // .arg("--profile=check") + // .arg("--") + // .arg("-Zunpretty=expanded") + // .output() + // .unwrap(); + + // if output.status.success() { + // let code = String::from_utf8(output.stdout)?; + // let mut use_modules: Vec = vec![]; + // for item in syn::parse_file(code.as_str()).unwrap().items.into_iter() { + // if let syn::Item::Mod(module) = item { + // let modules = module + // .content + // .ok_or("account mod: empty content") + // .unwrap() + // .1 + // .into_iter(); + // for module in modules { + // if let syn::Item::Use(u) = module { + // use_modules.push(u); + // } + // } + // } + // } + // if use_modules.is_empty() { + // use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) + // } + // use_modules + // } else { + // let mut use_modules: Vec = vec![]; + // if use_modules.is_empty() { + // use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) + // } + // use_modules + // } - if output.status.success() { - let code = String::from_utf8(output.stdout)?; - let mut use_modules: Vec = vec![]; - for item in syn::parse_file(code.as_str()).unwrap().items.into_iter() { - if let syn::Item::Mod(module) = item { - let modules = module - .content - .ok_or("account mod: empty content") - .unwrap() - .1 - .into_iter(); - for module in modules { - if let syn::Item::Use(u) = module { - use_modules.push(u); - } - } - } - } - if use_modules.is_empty() { - use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) - } - use_modules - } else { - let mut use_modules: Vec = vec![]; - if use_modules.is_empty() { - use_modules.push(syn::parse_quote! { use trdelnik_client::*; }) - } - use_modules + let mut use_modules: Vec = vec![]; + if use_modules.is_empty() { + use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) } + use_modules } /// Runs standard Rust tests. @@ -278,7 +288,7 @@ impl Commander { // only poc_tests and not fuzz tests also // FIXME "ok" within the output in terminal is not green // as it should be - let success = Command::new("cargo") + let success = tokio::process::Command::new("cargo") .arg("test") .args(["--package", "poc_tests"]) .arg("--") @@ -303,7 +313,7 @@ impl Commander { let fuzz_args = config.get_fuzz_args(hfuzz_run_args); - let mut child = Command::new("cargo") + let mut child = tokio::process::Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) .arg("hfuzz") .arg("run") @@ -318,14 +328,14 @@ impl Commander { }, Err(_) => throw!(Error::FuzzingFailed), }, - _ = signal::ctrl_c() => { + _ = tokio::signal::ctrl_c() => { tokio::time::sleep(tokio::time::Duration::from_millis(100)).await; }, } } #[throws] pub async fn run_fuzzer_with_exit_code(target: String, root: String) { - let root = Path::new(&root); + let root = std::path::Path::new(&root); // obtain config data let config = Config::new(); @@ -350,7 +360,7 @@ impl Commander { // if !cur_dir.try_exists()? { // throw!(Error::NotInitialized); // } - let mut child = Command::new("cargo") + let mut child = tokio::process::Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) .arg("hfuzz") .arg("run") @@ -365,7 +375,7 @@ impl Commander { }, Err(_) => throw!(Error::FuzzingFailed), }, - _ = signal::ctrl_c() => { + _ = tokio::signal::ctrl_c() => { tokio::time::sleep(tokio::time::Duration::from_millis(100)).await; }, } @@ -384,7 +394,7 @@ impl Commander { /// Runs fuzzer on the given target. #[throws] pub async fn run_fuzzer_debug(target: String, crash_file_path: String, root: String) { - let root = Path::new(&root); + let root = std::path::Path::new(&root); let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); let crash_file = std::env::current_dir()?.join(crash_file_path); @@ -413,20 +423,23 @@ impl Commander { /// Starts the localnet (Solana validator). #[throws] pub async fn start_localnet(root: &String) -> LocalnetHandle { - let mut process = Command::new("solana-test-validator") + let mut process = tokio::process::Command::new("solana-test-validator") .arg("-C") .arg([root, "config.yml"].concat()) .arg("-r") .arg("-q") .spawn()?; - if !Client::new(Keypair::new()).is_localnet_running(true).await { + if !Client::new(solana_sdk::signature::Keypair::new()) + .is_localnet_running(true) + .await + { // The validator might not be running, but the process might be still alive (very slow start, some bug, ...), // therefore we want to kill it if it's still running so ports aren't held. process.kill().await.ok(); throw!(Error::LocalnetIsNotRunning); } - debug!("localnet started"); + log::debug!("localnet started"); LocalnetHandle { solana_test_validator_process: process, } @@ -435,22 +448,21 @@ impl Commander { /// Formats program code. #[throws] pub async fn format_program_code(code: &str) -> String { - let mut rustfmt = Command::new("rustfmt") + let mut rustfmt = std::process::Command::new("rustfmt") .args(["--edition", "2018"]) - .kill_on_drop(true) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) + .stdin(std::process::Stdio::piped()) + .stdout(std::process::Stdio::piped()) .spawn()?; if let Some(stdio) = &mut rustfmt.stdin { - stdio.write_all(code.as_bytes()).await?; + stdio.write_all(code.as_bytes())?; } - let output = rustfmt.wait_with_output().await?; + let output = rustfmt.wait_with_output()?; String::from_utf8(output.stdout)? } } fn get_crash_dir_and_ext( - root: &Path, + root: &std::path::Path, target: &str, hfuzz_run_args: &str, ) -> (std::path::PathBuf, String) { @@ -464,10 +476,12 @@ fn get_crash_dir_and_ext( .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); let crash_path = if let Some(dir) = crash_dir { - Path::new(root).join(dir) + std::path::Path::new(root).join(dir) // Path::new(root).join(TESTS_WORKSPACE_DIRECTORY).join(dir) } else { - Path::new(root).join(HFUZZ_WORKSPACE).join(target) + std::path::Path::new(root) + .join(HFUZZ_WORKSPACE) + .join(target) // Path::new(root) // .join(TESTS_WORKSPACE_DIRECTORY) // .join(HFUZZ_WORKSPACE) @@ -620,9 +634,11 @@ mod tests { #[test] fn test_get_crash_dir_and_ext() { - let root = Path::new("/home/fuzz"); + let root = std::path::Path::new("/home/fuzz"); let target = "target"; - let default_crash_path = Path::new(root).join(HFUZZ_WORKSPACE).join(target); + let default_crash_path = std::path::Path::new(root) + .join(HFUZZ_WORKSPACE) + .join(target); let (crash_dir, ext) = get_crash_dir_and_ext(root, target, ""); @@ -642,7 +658,7 @@ mod tests { // test absolute path let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W /home/crash -e crash"); - let expected_crash_path = Path::new("/home/crash"); + let expected_crash_path = std::path::Path::new("/home/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); @@ -650,7 +666,7 @@ mod tests { let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash /home/crash -e crash"); - let expected_crash_path = Path::new("/home/crash"); + let expected_crash_path = std::path::Path::new("/home/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index f275d6e2..56806789 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -101,7 +101,7 @@ use thiserror::Error; static ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; #[derive(Error, Debug)] -pub enum Error { +pub enum IdlError { #[error("{0:?}")] RustParsingError(#[from] syn::Error), #[error("missing or invalid program item: '{0}'")] @@ -138,149 +138,150 @@ pub struct IdlAccountGroup { pub accounts: Vec<(String, String)>, } -pub fn parse_to_idl_program(name: &String, code: &str) -> Result { - let mut static_program_id = None::; - let mut mod_private = None::; - let mut mod_instruction = None::; - let mut account_mods = Vec::::new(); +impl Idl { + pub fn parse_to_idl_program(name: &String, code: &str) -> Result { + let mut static_program_id = None::; + let mut mod_private = None::; + let mut mod_instruction = None::; + let mut account_mods = Vec::::new(); - let items = syn::parse_file(code)?.items; + let items = syn::parse_file(code)?.items; - for item in items.iter() { - match item { - syn::Item::Static(item_static) if item_static.ident == "ID" => { - static_program_id = Some(item_static.clone()); + for item in items.iter() { + match item { + syn::Item::Static(item_static) if item_static.ident == "ID" => { + static_program_id = Some(item_static.clone()); + } + syn::Item::Mod(item_mod) => match item_mod.ident.to_string().as_str() { + "__private" => mod_private = Some(item_mod.clone()), + "instruction" => mod_instruction = Some(item_mod.clone()), + _ => set_account_modules(&mut account_mods, item_mod.clone()), + }, + _ => (), } - syn::Item::Mod(item_mod) => match item_mod.ident.to_string().as_str() { - "__private" => mod_private = Some(item_mod.clone()), - "instruction" => mod_instruction = Some(item_mod.clone()), - _ => set_account_modules(&mut account_mods, item_mod.clone()), - }, - _ => (), } - } - let static_program_id = - static_program_id.ok_or(Error::MissingOrInvalidProgramItems("missing static ID"))?; - let mod_private = - mod_private.ok_or(Error::MissingOrInvalidProgramItems("missing mod private"))?; - let mod_instruction = mod_instruction.ok_or(Error::MissingOrInvalidProgramItems( - "missing mod instruction", - ))?; - - // ------ get program id ------ - - // input example: - // ``` - // pub static ID: anchor_lang::solana_program::pubkey::Pubkey = - // anchor_lang::solana_program::pubkey::Pubkey::new_from_array([216u8, 55u8, - // 200u8, 93u8, - // 189u8, 81u8, - // 94u8, 109u8, - // 14u8, 249u8, - // 244u8, 106u8, - // 68u8, 214u8, - // 222u8, 190u8, - // 9u8, 25u8, - // 199u8, 75u8, - // 79u8, 230u8, - // 94u8, 137u8, - // 51u8, 187u8, - // 193u8, 48u8, - // 87u8, 222u8, - // 175u8, - // 163u8]); - // ``` - - let program_id_bytes = { - let new_pubkey_call = match *static_program_id.expr { - syn::Expr::Call(new_pubkey_call) => new_pubkey_call, - _ => { - return Err(Error::MissingOrInvalidProgramItems( - "static ID: new pubkey call not found", - )) + let static_program_id = + static_program_id.ok_or(IdlError::MissingOrInvalidProgramItems("missing static ID"))?; + let mod_private = + mod_private.ok_or(IdlError::MissingOrInvalidProgramItems("missing mod private"))?; + let mod_instruction = mod_instruction.ok_or(IdlError::MissingOrInvalidProgramItems( + "missing mod instruction", + ))?; + + // ------ get program id ------ + + // input example: + // ``` + // pub static ID: anchor_lang::solana_program::pubkey::Pubkey = + // anchor_lang::solana_program::pubkey::Pubkey::new_from_array([216u8, 55u8, + // 200u8, 93u8, + // 189u8, 81u8, + // 94u8, 109u8, + // 14u8, 249u8, + // 244u8, 106u8, + // 68u8, 214u8, + // 222u8, 190u8, + // 9u8, 25u8, + // 199u8, 75u8, + // 79u8, 230u8, + // 94u8, 137u8, + // 51u8, 187u8, + // 193u8, 48u8, + // 87u8, 222u8, + // 175u8, + // 163u8]); + // ``` + + let program_id_bytes = { + let new_pubkey_call = match *static_program_id.expr { + syn::Expr::Call(new_pubkey_call) => new_pubkey_call, + _ => { + return Err(IdlError::MissingOrInvalidProgramItems( + "static ID: new pubkey call not found", + )) + } + }; + match new_pubkey_call.args.into_iter().next() { + Some(syn::Expr::Array(pubkey_bytes)) => pubkey_bytes, + _ => { + return Err(IdlError::MissingOrInvalidProgramItems( + "static ID: pubkey bytes not found", + )) + } } }; - match new_pubkey_call.args.into_iter().next() { - Some(syn::Expr::Array(pubkey_bytes)) => pubkey_bytes, - _ => { - return Err(Error::MissingOrInvalidProgramItems( - "static ID: pubkey bytes not found", - )) - } - } - }; - - // ------ get instruction_item_fns ------ - - // input example: - // ``` - // mod __private { - // pub mod __global { - // use super::*; - // #[inline(never)] - // pub fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], - // ix_data: &[u8]) -> ProgramResult { - // let ix = - // instruction::Initialize::deserialize(&mut &ix_data[..]).map_err(|_| - // anchor_lang::__private::ErrorCode::InstructionDidNotDeserialize)?; - // let instruction::Initialize = ix; - // let mut remaining_accounts: &[AccountInfo] = accounts; - // let mut accounts = - // Initialize::try_accounts(program_id, &mut remaining_accounts, - // ix_data)?; - // turnstile::initialize(Context::new(program_id, &mut accounts, - // remaining_accounts))?; - // accounts.exit(program_id) - // } - // ``` - - let instruction_item_fns = { - let items = mod_private - .content - .map(|(_, items)| items) - .unwrap_or_default(); - let item_mod_global = items - .into_iter() - .find_map(|item| match item { - syn::Item::Mod(item_mod) if item_mod.ident == "__global" => Some(item_mod), - _ => None?, + + // ------ get instruction_item_fns ------ + + // input example: + // ``` + // mod __private { + // pub mod __global { + // use super::*; + // #[inline(never)] + // pub fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], + // ix_data: &[u8]) -> ProgramResult { + // let ix = + // instruction::Initialize::deserialize(&mut &ix_data[..]).map_err(|_| + // anchor_lang::__private::ErrorCode::InstructionDidNotDeserialize)?; + // let instruction::Initialize = ix; + // let mut remaining_accounts: &[AccountInfo] = accounts; + // let mut accounts = + // Initialize::try_accounts(program_id, &mut remaining_accounts, + // ix_data)?; + // turnstile::initialize(Context::new(program_id, &mut accounts, + // remaining_accounts))?; + // accounts.exit(program_id) + // } + // ``` + + let instruction_item_fns = { + let items = mod_private + .content + .map(|(_, items)| items) + .unwrap_or_default(); + let item_mod_global = items + .into_iter() + .find_map(|item| match item { + syn::Item::Mod(item_mod) if item_mod.ident == "__global" => Some(item_mod), + _ => None?, + }) + .ok_or(IdlError::MissingOrInvalidProgramItems( + "mod private: mod global not found", + ))?; + let items = item_mod_global + .content + .map(|(_, items)| items) + .unwrap_or_default(); + items.into_iter().filter_map(|item| match item { + syn::Item::Fn(item_fn) => Some(item_fn), + _ => None, }) - .ok_or(Error::MissingOrInvalidProgramItems( - "mod private: mod global not found", - ))?; - let items = item_mod_global - .content - .map(|(_, items)| items) - .unwrap_or_default(); - items.into_iter().filter_map(|item| match item { - syn::Item::Fn(item_fn) => Some(item_fn), - _ => None, - }) - }; - - // ------ get instruction + account group names ------ - - // input example: - // ``` - // pub fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], - // ix_data: &[u8]) -> ProgramResult { - // let ix = - // instruction::Initialize::deserialize(&mut &ix_data[..]).map_err(|_| - // anchor_lang::__private::ErrorCode::InstructionDidNotDeserialize)?; - // let instruction::Initialize = ix; - // let mut remaining_accounts: &[AccountInfo] = accounts; - // let mut accounts = - // Initialize::try_accounts(program_id, &mut remaining_accounts, - // ix_data)?; - // turnstile::initialize(Context::new(program_id, &mut accounts, - // remaining_accounts))?; - // accounts.exit(program_id) - // } - // ``` - - let mut instruction_account_pairs = Vec::new(); - instruction_item_fns + }; + + // ------ get instruction + account group names ------ + + // input example: + // ``` + // pub fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], + // ix_data: &[u8]) -> ProgramResult { + // let ix = + // instruction::Initialize::deserialize(&mut &ix_data[..]).map_err(|_| + // anchor_lang::__private::ErrorCode::InstructionDidNotDeserialize)?; + // let instruction::Initialize = ix; + // let mut remaining_accounts: &[AccountInfo] = accounts; + // let mut accounts = + // Initialize::try_accounts(program_id, &mut remaining_accounts, + // ix_data)?; + // turnstile::initialize(Context::new(program_id, &mut accounts, + // remaining_accounts))?; + // accounts.exit(program_id) + // } + // ``` + + let mut instruction_account_pairs = Vec::new(); + instruction_item_fns .into_iter() .map(|item_fn| { // stmt example: `let mut accounts = UpdateState::try_accounts(program_id, &mut remaining_accounts, ix_data)?;` @@ -331,143 +332,144 @@ pub fn parse_to_idl_program(name: &String, code: &str) -> Result - { - item_struct - } - _ => None?, - }; - let fields = match instruction_item_struct.fields { - syn::Fields::Named(fields_named) => fields_named.named, - syn::Fields::Unit => syn::punctuated::Punctuated::new(), - syn::Fields::Unnamed(_) => None?, - }; - Some(fields.into_iter()) - }) - .ok_or(Error::MissingOrInvalidProgramItems("instruction struct"))?; - - idl_instruction.parameters = instruction_item_struct_fields - .map(|field| { - let parameter_name = field.ident.unwrap().to_string(); - let parameter_id_type = field.ty.into_token_stream().to_string(); - (parameter_name, parameter_id_type) - }) - .collect(); - } - - // ------ get accounts ------ - - // input example: - // ``` - // pub(crate) mod __client_accounts_initialize { - // use super::*; - // use anchor_lang::prelude::borsh; - // pub struct Initialize { - // pub state: anchor_lang::solana_program::pubkey::Pubkey, - // pub user: anchor_lang::solana_program::pubkey::Pubkey, - // pub system_program: anchor_lang::solana_program::pubkey::Pubkey, - // } - // ``` - - for account_mod_item in account_mods { - let account_struct_name = account_mod_item - .ident - .to_string() - .strip_prefix(ACCOUNT_MOD_PREFIX) - .unwrap() - .to_upper_camel_case(); - - let account_item_struct = account_mod_item + // ------ get instruction parameters ------ + + // input example: + // ``` + // pub mod instruction { + // use super::*; + // pub mod state { + // use super::*; + // } + // // ** + // pub struct Initialize; + // // ** + // pub struct Coin { + // pub dummy_arg: String, + // } + // ``` + + let mut instruction_mod_items = mod_instruction .content - .ok_or(Error::MissingOrInvalidProgramItems( - "account mod: empty content", + .ok_or(IdlError::MissingOrInvalidProgramItems( + "instruction mod: empty content", ))? .1 - .into_iter() - .find_map(|item| match item { - syn::Item::Struct(item_struct) if item_struct.ident == account_struct_name => { - Some(item_struct) - } - _ => None?, - }) - .ok_or(Error::MissingOrInvalidProgramItems( - "account mod: struct not found", - ))?; - - let account_item_struct_fields = match account_item_struct.fields { - syn::Fields::Named(fields_named) => fields_named.named, - syn::Fields::Unit => syn::punctuated::Punctuated::new(), - syn::Fields::Unnamed(_) => { - return Err(Error::MissingOrInvalidProgramItems( - "account struct: unnamed fields not allowed", - )) - } - }; + .into_iter(); + + for (idl_instruction, _) in &mut instruction_account_pairs { + let instruction_struct_name = &idl_instruction.name.upper_camel_case; + + let instruction_item_struct_fields = instruction_mod_items + .find_map(|item| { + let instruction_item_struct = match item { + syn::Item::Struct(item_struct) + if item_struct.ident == instruction_struct_name => + { + item_struct + } + _ => None?, + }; + let fields = match instruction_item_struct.fields { + syn::Fields::Named(fields_named) => fields_named.named, + syn::Fields::Unit => syn::punctuated::Punctuated::new(), + syn::Fields::Unnamed(_) => None?, + }; + Some(fields.into_iter()) + }) + .ok_or(IdlError::MissingOrInvalidProgramItems("instruction struct"))?; + + idl_instruction.parameters = instruction_item_struct_fields + .map(|field| { + let parameter_name = field.ident.unwrap().to_string(); + let parameter_id_type = field.ty.into_token_stream().to_string(); + (parameter_name, parameter_id_type) + }) + .collect(); + } - let accounts = account_item_struct_fields - .into_iter() - .map(|field| { - let account_name = field.ident.unwrap().to_string(); - let account_id_type = field.ty.into_token_stream().to_string(); - (account_name, account_id_type) - }) - .collect::>(); + // ------ get accounts ------ + + // input example: + // ``` + // pub(crate) mod __client_accounts_initialize { + // use super::*; + // use anchor_lang::prelude::borsh; + // pub struct Initialize { + // pub state: anchor_lang::solana_program::pubkey::Pubkey, + // pub user: anchor_lang::solana_program::pubkey::Pubkey, + // pub system_program: anchor_lang::solana_program::pubkey::Pubkey, + // } + // ``` + + for account_mod_item in account_mods { + let account_struct_name = account_mod_item + .ident + .to_string() + .strip_prefix(ACCOUNT_MOD_PREFIX) + .unwrap() + .to_upper_camel_case(); + + let account_item_struct = account_mod_item + .content + .ok_or(IdlError::MissingOrInvalidProgramItems( + "account mod: empty content", + ))? + .1 + .into_iter() + .find_map(|item| match item { + syn::Item::Struct(item_struct) if item_struct.ident == account_struct_name => { + Some(item_struct) + } + _ => None?, + }) + .ok_or(IdlError::MissingOrInvalidProgramItems( + "account mod: struct not found", + ))?; + + let account_item_struct_fields = match account_item_struct.fields { + syn::Fields::Named(fields_named) => fields_named.named, + syn::Fields::Unit => syn::punctuated::Punctuated::new(), + syn::Fields::Unnamed(_) => { + return Err(IdlError::MissingOrInvalidProgramItems( + "account struct: unnamed fields not allowed", + )) + } + }; - for (_, idl_account_group) in &mut instruction_account_pairs { - if idl_account_group.name.upper_camel_case == account_struct_name { - idl_account_group.accounts = accounts.clone(); + let accounts = account_item_struct_fields + .into_iter() + .map(|field| { + let account_name = field.ident.unwrap().to_string(); + let account_id_type = field.ty.into_token_stream().to_string(); + (account_name, account_id_type) + }) + .collect::>(); + + for (_, idl_account_group) in &mut instruction_account_pairs { + if idl_account_group.name.upper_camel_case == account_struct_name { + idl_account_group.accounts = accounts.clone(); + } } } - } - // ------ // ------ + // ------ // ------ - Ok(IdlProgram { - name: IdlName { - upper_camel_case: name.to_upper_camel_case(), - snake_case: name.to_string(), - }, - id: program_id_bytes.into_token_stream().to_string(), - instruction_account_pairs, - }) + Ok(IdlProgram { + name: IdlName { + upper_camel_case: name.to_upper_camel_case(), + snake_case: name.to_string(), + }, + id: program_id_bytes.into_token_stream().to_string(), + instruction_account_pairs, + }) + } } fn set_account_modules(account_modules: &mut Vec, item_module: syn::ItemMod) { @@ -481,7 +483,7 @@ fn set_account_modules(account_modules: &mut Vec, item_module: syn } let modules = item_module .content - .ok_or(Error::MissingOrInvalidProgramItems( + .ok_or(IdlError::MissingOrInvalidProgramItems( "account mod: empty content", )) .unwrap() diff --git a/crates/client/src/keys.rs b/crates/client/src/keys.rs index 0f024f81..998a7297 100644 --- a/crates/client/src/keys.rs +++ b/crates/client/src/keys.rs @@ -1,6 +1,5 @@ use std::error::Error; -use anchor_client::solana_sdk::signer::keypair::Keypair; use heck::ToSnakeCase; use solana_sdk::signer::EncodableKey; @@ -16,7 +15,9 @@ pub enum KeyPairError { } /// Reads program keypair JSON file generated by Anchor based on `program_name`. Returns error if not found. -pub fn anchor_keypair(program_name: &str) -> Result> { +pub fn anchor_keypair( + program_name: &str, +) -> Result> { let root = match Config::discover_root() { Ok(root) => root, Err(_) => return Err(KeyPairError::BadWorkspace.into()), @@ -30,20 +31,20 @@ pub fn anchor_keypair(program_name: &str) -> Result> { return Err(KeyPairError::AnchorKeypairNotFound.into()); } - Keypair::read_from_file(keypair_path) + solana_sdk::signature::Keypair::read_from_file(keypair_path) } /// Generate a random keypair. -pub fn random_keypair() -> Keypair { - Keypair::new() +pub fn random_keypair() -> solana_sdk::signature::Keypair { + solana_sdk::signature::Keypair::new() } /// Returns a recognisable Keypair of your created program. The public key will start with `Pxx`, where /// xx are the three digits of the number. `o` is used instead of `0`, as `0` is not part of the base58 charset. /// You shouldn't call the method with the same `n` twice. /// The `n` must be a number between `0` and `29`. -pub fn program_keypair(n: usize) -> Keypair { - Keypair::from_bytes(&PROGRAM_KEYPAIRS[n]).unwrap() +pub fn program_keypair(n: usize) -> solana_sdk::signature::Keypair { + solana_sdk::signature::Keypair::from_bytes(&PROGRAM_KEYPAIRS[n]).unwrap() } /// Returns a system wallet (wallet which is owned by the system) but it is not required, you can also use the @@ -52,16 +53,16 @@ pub fn program_keypair(n: usize) -> Keypair { /// the base58 charset. Returns a recognisable `Keypair`. This is NOT the same as /// `anchor_lang::system_program::System::id()`! /// The `n` must be a number between `0` and `29`. -pub fn system_keypair(n: usize) -> Keypair { - Keypair::from_bytes(&SYSTEM_KEYPAIRS[n]).unwrap() +pub fn system_keypair(n: usize) -> solana_sdk::signature::Keypair { + solana_sdk::signature::Keypair::from_bytes(&SYSTEM_KEYPAIRS[n]).unwrap() } /// Returns a recognisable `Keypair` / wallet that can be used for the mint account for example. The public key will /// start with `Txxx`, where xxx are the three digits of the number. You shouldn't call the method with the same `n` /// twice. `o` is used instead of `0`, as `0` is not part of the base58 charset. /// The `n` must be a number between `0` and `255`. -pub fn keypair(n: usize) -> Keypair { - Keypair::from_bytes(&KEYPAIRS[n]).unwrap() +pub fn keypair(n: usize) -> solana_sdk::signature::Keypair { + solana_sdk::signature::Keypair::from_bytes(&KEYPAIRS[n]).unwrap() } const PROGRAM_KEYPAIRS: [[u8; 64]; 30] = [ diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 31c27727..7ce6c478 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -3,48 +3,59 @@ //! //! Trdelnik could be useful for writing Rust dApps, too. -pub use anchor_client::{ - self, - anchor_lang::{self, prelude::System, Id, InstructionData, ToAccountMetas}, - solana_sdk::{ - self, - instruction::Instruction, - pubkey::Pubkey, - signature::Signature, - signer::{keypair::Keypair, Signer}, - }, - ClientError, -}; -pub use anyhow::{self, Error}; - #[cfg(feature = "fuzzing")] pub mod fuzzing { - pub use super::{ - anchor_lang, anchor_lang::system_program::ID as SYSTEM_PROGRAM_ID, - solana_sdk::transaction::Transaction, Instruction, Keypair, Pubkey, Signer, - }; - pub use anchor_client::anchor_lang::solana_program::hash::Hash; + pub use anchor_lang; pub use arbitrary; pub use arbitrary::Arbitrary; pub use honggfuzz::fuzz; - pub use solana_program_test::{ - processor, tokio::runtime::Runtime, BanksClient, BanksClientError, ProgramTest, - }; + pub use solana_program_test; + pub use solana_sdk; + pub use solana_sdk::signer::Signer; +} + +pub mod program_client { + pub use crate::client::Client; + pub use anchor_client; + pub use anchor_lang::{InstructionData, ToAccountMetas}; + pub use solana_sdk; + pub use solana_transaction_status; } -pub use futures::{self, FutureExt}; -pub use rstest::*; -pub use serial_test; -pub use solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta; -pub use tokio; +#[cfg(feature = "poctesting")] +pub mod poctesting { + pub use crate::client::Client; + pub use crate::error_reporter::*; + pub use crate::TempClone; + pub use anchor_lang; + pub use anyhow::{Error, Result}; + + pub use fehler::throws; + + pub use futures::FutureExt; + pub use rstest::*; + pub use serial_test; + pub use solana_sdk; + pub use solana_sdk::signer::Signer; + pub use tokio; + pub use trdelnik_test::trdelnik_test; + + pub use crate::keys::*; +} -pub use trdelnik_test::trdelnik_test; +// pub use futures::{self, FutureExt}; +// pub use client::PrintableTransaction; +// pub use trdelnik_test::trdelnik_test; + +// pub use rstest::*; +// pub use serial_test; +// pub use tokio; mod config; +pub use config::Config; mod client; pub use client::Client; -pub use client::PrintableTransaction; mod reader; pub use reader::Reader; @@ -61,10 +72,13 @@ pub use temp_clone::TempClone; mod keys; pub use keys::*; -pub mod idl; -pub mod program_client_generator; +mod idl; +pub use idl::{Idl, IdlError}; + +mod program_client_generator; +pub use program_client_generator::generate_source_code; -pub mod workspace_builder; +mod workspace_builder; pub use workspace_builder::WorkspaceBuilder; pub mod error_reporter; @@ -96,4 +110,7 @@ pub mod constants { pub const GIT_IGNORE: &str = ".gitignore"; pub const CLIENT_TOML_TEMPLATE: &str = "/src/templates/program_client/Cargo.toml.tmpl"; + + pub const RETRY_LOCALNET_EVERY_MILLIS: u64 = 500; + pub const DEFAULT_KEYPAIR_PATH: &str = "~/.config/solana/id.json"; } diff --git a/crates/client/src/program_client_generator.rs b/crates/client/src/program_client_generator.rs index d087ae3f..cbb3a953 100644 --- a/crates/client/src/program_client_generator.rs +++ b/crates/client/src/program_client_generator.rs @@ -55,7 +55,8 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { let last_type = &tp.path.segments.last().unwrap().ident.to_string(); if last_type == "Pubkey" { - let t: syn::Type = parse_str(last_type).unwrap(); + let reference = format!("&solana_sdk::pubkey::Pubkey"); + let t: syn::Type = parse_str(&reference).unwrap(); t } else { // we expect only Pubkey, but if it is something different, than return fully qualified type @@ -85,19 +86,21 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { .iter() .map(|(name, _)| { let name: syn::Ident = parse_str(name).unwrap(); - let value = format_ident!("a_{name}"); + let value_s = format!("*a_{}", name); + let value: syn::Expr = parse_str(&value_s).unwrap(); let account: syn::FieldValue = parse_quote!(#name: #value); account }) .collect::>(); let instruction: syn::ItemFn = parse_quote! { + #[allow(clippy::too_many_arguments)] pub async fn #instruction_fn_name( client: &Client, #(#parameters,)* #(#accounts,)* - signers: impl IntoIterator + Send + 'static, - ) -> Result { + signers: impl IntoIterator + Send, + ) -> Result { client.send_instruction( PROGRAM_ID, #module_name::instruction::#instruction_struct_name { @@ -112,11 +115,12 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { }; let instruction_raw: syn::ItemFn = parse_quote! { + #[allow(clippy::too_many_arguments)] pub fn #instruction_name( #(#parameters,)* #(#accounts,)* - ) -> Instruction { - Instruction{ + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction{ program_id: PROGRAM_ID, data: #module_name::instruction::#instruction_struct_name { #(#field_parameters,)* @@ -138,7 +142,7 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { let program_module: syn::ItemMod = parse_quote! { pub mod #instruction_module_name { #(#use_modules)* - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array(#pubkey_bytes); + pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = solana_sdk::pubkey::Pubkey::new_from_array(#pubkey_bytes); #(#instructions)* } }; diff --git a/crates/client/src/temp_clone.rs b/crates/client/src/temp_clone.rs index 8efba3fb..8b79058e 100644 --- a/crates/client/src/temp_clone.rs +++ b/crates/client/src/temp_clone.rs @@ -1,15 +1,16 @@ -use crate::Keypair; - // @TODO remove once `Clone` is implemented for `Keypair` // https://docs.rs/solana-sdk/latest/solana_sdk/signer/keypair/struct.Keypair.html +// probably will not be added into the Keypair +// https://docs.rs/solana-sdk/latest/solana_sdk/signer/keypair/struct.Keypair.html#method.insecure_clone + /// The `TempClone` trait is used as a workaround /// for making non-cloneable foreign types cloneable. pub trait TempClone { fn clone(&self) -> Self; } -impl TempClone for Keypair { +impl TempClone for solana_sdk::signer::keypair::Keypair { fn clone(&self) -> Self { Self::from_bytes(&self.to_bytes()).unwrap() } diff --git a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl deleted file mode 100644 index 367736be..00000000 --- a/crates/client/src/templates/trdelnik-tests/Cargo.toml.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "trdelnik-tests" -version = "0.1.0" -description = "Created with Trdelnik" -edition = "2021" - -[dependencies] -assert_matches = "1.4.0" - -[dependencies.trdelnik-client] -version = "0.5.0" - -[dependencies.program_client] -path = "../.program_client" - -[dev-dependencies] -fehler = "1.0.0" -rstest = "0.12.0" - -# this may be not optimal to store it here right away -# because we have also option to init without fuzzer -# on the other hand, without the option I found this OK - -[[bin]] -name = "fuzz_target" -path = "fuzz_0/fuzz_target.rs" diff --git a/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl index f2249e77..be0eda33 100644 --- a/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl +++ b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl @@ -13,6 +13,7 @@ assert_matches = "1.4.0" [dependencies.trdelnik-client] version = "0.5.0" +features=["fuzzing"] [dependencies.program_client] path = "../../../.program_client" diff --git a/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl index 13b549fc..7fcc9a52 100644 --- a/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl +++ b/crates/client/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl @@ -6,12 +6,12 @@ edition = "2018" # Dependencies specific to PoC test # Dev-dependencies are used for compiling tests, [dev-dependencies] -assert_matches = "1.4.0" fehler = "1.0.0" -rstest = "0.12.0" [dev-dependencies.trdelnik-client] version = "0.5.0" +features=["poctesting"] + [dev-dependencies.program_client] path = "../../.program_client" diff --git a/crates/client/src/templates/trdelnik-tests/fuzz_target.rs b/crates/client/src/templates/trdelnik-tests/fuzz_target.rs deleted file mode 100644 index 7b66c7e7..00000000 --- a/crates/client/src/templates/trdelnik-tests/fuzz_target.rs +++ /dev/null @@ -1,71 +0,0 @@ -use assert_matches::*; -use trdelnik_client::fuzzing::*; - -const PROGRAM_NAME: &str = "###PROGRAM_NAME###"; - -#[derive(Arbitrary)] -pub struct FuzzData { - param1: u8, - param2: u8, -} - -fn main() { - loop { - fuzz!(|fuzz_data: FuzzData| { - Runtime::new().unwrap().block_on(async { - let program_test = ProgramTest::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)); - - let mut ctx = program_test.start_with_context().await; - - // TODO: replace this instruction with one of your generated instructions from trdelnik_client - let init_ix = init_dummy_ix(); - let mut transaction = - Transaction::new_with_payer(&[init_ix], Some(&ctx.payer.pubkey().clone())); - - transaction.sign(&[&ctx.payer], ctx.last_blockhash); - let res = ctx.banks_client.process_transaction(transaction).await; - assert_matches!(res, Ok(())); - - let res = fuzz_ix( - &fuzz_data, - &mut ctx.banks_client, - &ctx.payer, - ctx.last_blockhash, - ) - .await; - assert_matches!(res, Ok(())); - }); - }); - } -} - -async fn fuzz_ix( - fuzz_data: &FuzzData, - banks_client: &mut BanksClient, - payer: &Keypair, - blockhash: Hash, -) -> core::result::Result<(), BanksClientError> { - // TODO: replace this instruction with one of your generated instructions from trdelnik_client - let update_ix = update_dummy_ix(fuzz_data.param1, fuzz_data.param2); - - let mut transaction = Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); - transaction.sign(&[payer], blockhash); - - banks_client.process_transaction(transaction).await -} - -fn init_dummy_ix() -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: vec![], - accounts: vec![], - } -} - -fn update_dummy_ix(param1: u8, param2: u8) -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: vec![param1, param2], - accounts: vec![], - } -} diff --git a/crates/client/src/templates/trdelnik-tests/fuzz_test.tmpl.rs b/crates/client/src/templates/trdelnik-tests/fuzz_test.tmpl.rs new file mode 100644 index 00000000..45c7cad4 --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/fuzz_test.tmpl.rs @@ -0,0 +1,80 @@ +use assert_matches::*; +use trdelnik_client::fuzzing::*; + +const PROGRAM_NAME: &str = "###PROGRAM_NAME###"; + +#[derive(Arbitrary)] +pub struct FuzzData { + param1: u8, + param2: u8, +} + +fn main() { + loop { + fuzz!(|fuzz_data: FuzzData| { + solana_program_test::tokio::runtime::Runtime::new() + .unwrap() + .block_on(async { + let program_test = solana_program_test::ProgramTest::new( + PROGRAM_NAME, + PROGRAM_ID, + solana_program_test::processor!(entry), + ); + + let mut ctx = program_test.start_with_context().await; + + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let init_ix = init_dummy_ix(); + let mut transaction = solana_sdk::transaction::Transaction::new_with_payer( + &[init_ix], + Some(&ctx.payer.pubkey()), + ); + + transaction.sign(&[&ctx.payer], ctx.last_blockhash); + let res = ctx.banks_client.process_transaction(transaction).await; + assert_matches!(res, Ok(())); + + let res = fuzz_ix( + &fuzz_data, + &mut ctx.banks_client, + &ctx.payer, + ctx.last_blockhash, + ) + .await; + assert_matches!(res, Ok(())); + }); + }); + } +} + +async fn fuzz_ix( + fuzz_data: &FuzzData, + banks_client: &mut solana_program_test::BanksClient, + payer: &solana_sdk::signature::Keypair, + blockhash: solana_sdk::hash::Hash, +) -> core::result::Result<(), solana_program_test::BanksClientError> { + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let update_ix = update_dummy_ix(fuzz_data.param1, fuzz_data.param2); + + let mut transaction = + solana_sdk::transaction::Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); + transaction.sign(&[payer], blockhash); + + banks_client.process_transaction(transaction).await +} + +fn init_dummy_ix() -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { + program_id: PROGRAM_ID, + data: vec![], + accounts: vec![], + } +} + +fn update_dummy_ix(param1: u8, param2: u8) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { + program_id: PROGRAM_ID, + data: vec![param1, param2], + accounts: vec![], + } +} diff --git a/crates/client/src/templates/trdelnik-tests/test.rs b/crates/client/src/templates/trdelnik-tests/poc_test.tmpl.rs similarity index 79% rename from crates/client/src/templates/trdelnik-tests/test.rs rename to crates/client/src/templates/trdelnik-tests/poc_test.tmpl.rs index a0807c7c..c23205b3 100644 --- a/crates/client/src/templates/trdelnik-tests/test.rs +++ b/crates/client/src/templates/trdelnik-tests/poc_test.tmpl.rs @@ -1,5 +1,4 @@ -use fehler::throws; -use trdelnik_client::{anyhow::Result, *}; +use trdelnik_client::poctesting::*; // @todo: create and deploy your fixture #[throws] @@ -22,8 +21,8 @@ async fn test_happy_path(#[future] init_fixture: Result) { // @todo: design and implement all the logic you need for your fixture(s) struct Fixture { client: Client, - program: Keypair, - state: Keypair, + program: solana_sdk::signer::keypair::Keypair, + state: solana_sdk::signer::keypair::Keypair, } impl Fixture { fn new() -> Self { @@ -37,10 +36,10 @@ impl Fixture { #[throws] async fn deploy(&mut self) { self.client - .airdrop(self.client.payer().pubkey(), 5_000_000_000) + .airdrop(&self.client.payer().pubkey(), 5_000_000_000) .await?; self.client - .deploy_by_name(&self.program.clone(), "###PROGRAM_NAME###") + .deploy_by_name(&self.program, "###PROGRAM_NAME###") .await?; } } diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 63a8c67d..3016c23d 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -18,8 +18,8 @@ use toml::{ }; use crate::constants::*; -use crate::idl::Idl; -use crate::program_client_generator; +use crate::generate_source_code; +use crate::Idl; #[derive(Error, Debug)] pub enum Error { @@ -166,8 +166,7 @@ impl WorkspaceBuilder { self.add_program_dependencies(&crate_path, "dependencies") .await?; - let program_client = - program_client_generator::generate_source_code(&self.idl, &self.use_tokens); + let program_client = generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.create_file(&lib_path, &program_client).await?; @@ -265,7 +264,7 @@ impl WorkspaceBuilder { let fuzz_test_content = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/fuzz_target.rs" + "/src/templates/trdelnik-tests/fuzz_test.tmpl.rs" )); let use_entry = format!("use {}::entry;\n", program_name); @@ -286,8 +285,8 @@ impl WorkspaceBuilder { .await?; // add fuzzing feature - self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) - .await?; + // self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) + // .await?; } /// - generates new folder and contents for new PoC test Template @@ -339,7 +338,7 @@ impl WorkspaceBuilder { let poc_test_content = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/test.rs" + "/src/templates/trdelnik-tests/poc_test.tmpl.rs" )); let test_content = poc_test_content.replace("###PROGRAM_NAME###", program_name); let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); @@ -417,8 +416,7 @@ impl WorkspaceBuilder { self.add_program_dependencies(&crate_path, "dependencies") .await?; - let program_client = - program_client_generator::generate_source_code(&self.idl, &self.use_tokens); + let program_client = generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.update_file(&lib_path, &program_client).await?; @@ -464,6 +462,10 @@ impl WorkspaceBuilder { for line in io::BufReader::new(file).lines().flatten() { if line == ignored_path { // INFO do not add the ignored path again if it is already in the .gitignore file + println!( + "\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{GIT_IGNORE}\x1b[0m, already contains \x1b[93m{ignored_path}\x1b[0m." + ); + return; } } @@ -471,7 +473,7 @@ impl WorkspaceBuilder { if let Ok(mut file) = file { writeln!(file, "{}", ignored_path)?; - println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{GIT_IGNORE}\x1b[0m."); + println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{GIT_IGNORE}\x1b[0m with \x1b[93m{ignored_path}\x1b[0m."); } } else { println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{GIT_IGNORE}\x1b[0m, not found.") diff --git a/crates/client/tests/test.rs b/crates/client/tests/test.rs index 6e164300..f10643e6 100644 --- a/crates/client/tests/test.rs +++ b/crates/client/tests/test.rs @@ -22,15 +22,15 @@ pub async fn generate_program_client() { let program_name = String::from("escrow"); let program_idl = - trdelnik_client::idl::parse_to_idl_program(&program_name, expanded_anchor_program)?; + trdelnik_client::Idl::parse_to_idl_program(&program_name, expanded_anchor_program)?; - let idl = trdelnik_client::idl::Idl { + let idl = trdelnik_client::Idl { programs: vec![program_idl], }; - let use_modules: Vec = vec![syn::parse_quote! { use trdelnik_client::*; }]; - let client_code = - trdelnik_client::program_client_generator::generate_source_code(&idl, &use_modules); + let use_modules: Vec = + vec![syn::parse_quote! { use trdelnik_client::program_client::*; }]; + let client_code = trdelnik_client::generate_source_code(&idl, &use_modules); let client_code = trdelnik_client::Commander::format_program_code(&client_code).await?; assert_str_eq!(client_code, expected_client_code); diff --git a/crates/client/tests/test_data/expected_client_code.rs b/crates/client/tests/test_data/expected_client_code.rs index 741b0b16..5b476fd9 100644 --- a/crates/client/tests/test_data/expected_client_code.rs +++ b/crates/client/tests/test_data/expected_client_code.rs @@ -1,23 +1,28 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { - use trdelnik_client::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::program_client::*; + pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = + solana_sdk::pubkey::Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, + 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, + ]); + #[allow(clippy::too_many_arguments)] pub async fn initialize_escrow( client: &Client, i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, @@ -26,28 +31,29 @@ pub mod escrow_instruction { taker_amount: i_taker_amount, }, escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, + initializer: *a_initializer, + initializer_deposit_token_account: *a_initializer_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + escrow_account: *a_escrow_account, + system_program: *a_system_program, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn initialize_escrow_ix( i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::InitializeEscrow { initializer_amount: i_initializer_amount, @@ -55,116 +61,126 @@ pub mod escrow_instruction { } .data(), accounts: escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, + initializer: *a_initializer, + initializer_deposit_token_account: *a_initializer_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + escrow_account: *a_escrow_account, + system_program: *a_system_program, + token_program: *a_token_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn cancel_escrow( client: &Client, - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, escrow::instruction::CancelEscrow {}, escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, + initializer: *a_initializer, + pda_deposit_token_account: *a_pda_deposit_token_account, + pda_account: *a_pda_account, + escrow_account: *a_escrow_account, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn cancel_escrow_ix( - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::CancelEscrow {}.data(), accounts: escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, + initializer: *a_initializer, + pda_deposit_token_account: *a_pda_deposit_token_account, + pda_account: *a_pda_account, + escrow_account: *a_escrow_account, + token_program: *a_token_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn exchange( client: &Client, - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_taker: &solana_sdk::pubkey::Pubkey, + a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_main_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, escrow::instruction::Exchange {}, escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, + taker: *a_taker, + taker_deposit_token_account: *a_taker_deposit_token_account, + taker_receive_token_account: *a_taker_receive_token_account, + pda_deposit_token_account: *a_pda_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + initializer_main_account: *a_initializer_main_account, + escrow_account: *a_escrow_account, + pda_account: *a_pda_account, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn exchange_ix( - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_taker: &solana_sdk::pubkey::Pubkey, + a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_main_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::Exchange {}.data(), accounts: escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, + taker: *a_taker, + taker_deposit_token_account: *a_taker_deposit_token_account, + taker_receive_token_account: *a_taker_receive_token_account, + pda_deposit_token_account: *a_pda_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + initializer_main_account: *a_initializer_main_account, + escrow_account: *a_escrow_account, + pda_account: *a_pda_account, + token_program: *a_token_program, } .to_account_metas(None), } diff --git a/crates/test/src/lib.rs b/crates/test/src/lib.rs index 7e4f9c34..e1fa0be5 100644 --- a/crates/test/src/lib.rs +++ b/crates/test/src/lib.rs @@ -65,15 +65,15 @@ pub fn trdelnik_test(args: TokenStream, input: TokenStream) -> TokenStream { // Note: The line `#(#input_fn_attrs)*` has to be above the line with the code // `#[trdelnik_client::tokio::test...` to make macros like `#[rstest]` work - // see https://github.com/la10736/rstest#inject-test-attribute - #[trdelnik_client::rstest] - #[trdelnik_client::tokio::test(flavor = "multi_thread")] - #[trdelnik_client::serial_test::serial] - async fn #input_fn_name(#input_fn_inputs) -> trdelnik_client::anyhow::Result<()> { + #[trdelnik_client::poctesting::rstest] + #[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] + #[trdelnik_client::poctesting::serial_test::serial] + async fn #input_fn_name(#input_fn_inputs) -> Result<()> { let mut tester = trdelnik_client::Tester::with_root(#root); let localnet_handle = tester.before().await?; let test = async { #input_fn_body - Ok::<(), trdelnik_client::anyhow::Error>(()) + Ok::<(), Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; diff --git a/crates/test/tests/expand/basic.expanded.rs b/crates/test/tests/expand/basic.expanded.rs index 21b91070..33bcbcc7 100644 --- a/crates/test/tests/expand/basic.expanded.rs +++ b/crates/test/tests/expand/basic.expanded.rs @@ -1,7 +1,7 @@ -#[trdelnik_client::rstest] -#[trdelnik_client::tokio::test(flavor = "multi_thread")] -#[trdelnik_client::serial_test::serial] -async fn test_turnstile() -> trdelnik_client::anyhow::Result<()> { +#[trdelnik_client::poctesting::rstest] +#[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] +#[trdelnik_client::poctesting::serial_test::serial] +async fn test_turnstile() -> Result<()> { let mut tester = trdelnik_client::Tester::with_root("../../"); let localnet_handle = tester.before().await?; let test = async { @@ -14,7 +14,7 @@ async fn test_turnstile() -> trdelnik_client::anyhow::Result<()> { turnstile.push_unlocked().await?; turnstile.push_locked().await?; } - Ok::<(), trdelnik_client::anyhow::Error>(()) + Ok::<(), Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; diff --git a/crates/test/tests/expand/with_root.expanded.rs b/crates/test/tests/expand/with_root.expanded.rs index 62698e8a..b0b4cc4e 100644 --- a/crates/test/tests/expand/with_root.expanded.rs +++ b/crates/test/tests/expand/with_root.expanded.rs @@ -1,12 +1,12 @@ -#[trdelnik_client::rstest] -#[trdelnik_client::tokio::test(flavor = "multi_thread")] -#[trdelnik_client::serial_test::serial] -async fn test_with_defined_root() -> trdelnik_client::anyhow::Result<()> { +#[trdelnik_client::poctesting::rstest] +#[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] +#[trdelnik_client::poctesting::serial_test::serial] +async fn test_with_defined_root() -> Result<()> { let mut tester = trdelnik_client::Tester::with_root("i_am_root"); let localnet_handle = tester.before().await?; let test = async { {} - Ok::<(), trdelnik_client::anyhow::Error>(()) + Ok::<(), Error>(()) }; let result = std::panic::AssertUnwindSafe(test).catch_unwind().await; tester.after(localnet_handle).await?; diff --git a/examples/escrow/.program_client/src/lib.rs b/examples/escrow/.program_client/src/lib.rs index 741b0b16..5b476fd9 100644 --- a/examples/escrow/.program_client/src/lib.rs +++ b/examples/escrow/.program_client/src/lib.rs @@ -1,23 +1,28 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { - use trdelnik_client::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::program_client::*; + pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = + solana_sdk::pubkey::Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, + 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, + ]); + #[allow(clippy::too_many_arguments)] pub async fn initialize_escrow( client: &Client, i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, @@ -26,28 +31,29 @@ pub mod escrow_instruction { taker_amount: i_taker_amount, }, escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, + initializer: *a_initializer, + initializer_deposit_token_account: *a_initializer_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + escrow_account: *a_escrow_account, + system_program: *a_system_program, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn initialize_escrow_ix( i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::InitializeEscrow { initializer_amount: i_initializer_amount, @@ -55,116 +61,126 @@ pub mod escrow_instruction { } .data(), accounts: escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, + initializer: *a_initializer, + initializer_deposit_token_account: *a_initializer_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + escrow_account: *a_escrow_account, + system_program: *a_system_program, + token_program: *a_token_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn cancel_escrow( client: &Client, - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, escrow::instruction::CancelEscrow {}, escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, + initializer: *a_initializer, + pda_deposit_token_account: *a_pda_deposit_token_account, + pda_account: *a_pda_account, + escrow_account: *a_escrow_account, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn cancel_escrow_ix( - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_initializer: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::CancelEscrow {}.data(), accounts: escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, + initializer: *a_initializer, + pda_deposit_token_account: *a_pda_deposit_token_account, + pda_account: *a_pda_account, + escrow_account: *a_escrow_account, + token_program: *a_token_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn exchange( client: &Client, - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_taker: &solana_sdk::pubkey::Pubkey, + a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_main_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, escrow::instruction::Exchange {}, escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, + taker: *a_taker, + taker_deposit_token_account: *a_taker_deposit_token_account, + taker_receive_token_account: *a_taker_receive_token_account, + pda_deposit_token_account: *a_pda_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + initializer_main_account: *a_initializer_main_account, + escrow_account: *a_escrow_account, + pda_account: *a_pda_account, + token_program: *a_token_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn exchange_ix( - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { + a_taker: &solana_sdk::pubkey::Pubkey, + a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, + a_initializer_main_account: &solana_sdk::pubkey::Pubkey, + a_escrow_account: &solana_sdk::pubkey::Pubkey, + a_pda_account: &solana_sdk::pubkey::Pubkey, + a_token_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: escrow::instruction::Exchange {}.data(), accounts: escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, + taker: *a_taker, + taker_deposit_token_account: *a_taker_deposit_token_account, + taker_receive_token_account: *a_taker_receive_token_account, + pda_deposit_token_account: *a_pda_deposit_token_account, + initializer_receive_token_account: *a_initializer_receive_token_account, + initializer_main_account: *a_initializer_main_account, + escrow_account: *a_escrow_account, + pda_account: *a_pda_account, + token_program: *a_token_program, } .to_account_metas(None), } diff --git a/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml b/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml index 6083c8da..87ffc4a1 100644 --- a/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml +++ b/examples/escrow/trdelnik-tests/poc_tests/Cargo.toml @@ -4,13 +4,11 @@ version = "0.1.0" edition = "2018" [dev-dependencies] -assert_matches = "1.4.0" fehler = "1.0.0" anchor-spl = "0.28.0" -rstest = "0.12.0" - [dev-dependencies.trdelnik-client] path = "../../../../crates/client" +features = ["poctesting"] [dev-dependencies.program_client] path = "../../.program_client" diff --git a/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs b/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs index c7e3b090..58cd499f 100644 --- a/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs +++ b/examples/escrow/trdelnik-tests/poc_tests/tests/test.rs @@ -1,8 +1,9 @@ +use program_client::escrow_instruction::*; +use trdelnik_client::poctesting::*; + use anchor_spl::token; -use fehler::throws; -use program_client::escrow_instruction; -use trdelnik_client::{anyhow::Result, *}; +// @todo: create and deploy your fixture #[throws] #[fixture] async fn init_fixture() -> Fixture { @@ -10,52 +11,52 @@ async fn init_fixture() -> Fixture { // Deploy fixture.deploy().await?; // Create a PDA authority - fixture.pda = Pubkey::find_program_address(&[b"escrow"], &escrow::id()).0; + fixture.pda = solana_sdk::pubkey::Pubkey::find_program_address(&[b"escrow"], &escrow::id()).0; // Creation of token mint A fixture .client - .create_token_mint(&fixture.mint_a, fixture.mint_authority.pubkey(), None, 0) + .create_token_mint(&fixture.mint_a, &fixture.mint_authority.pubkey(), None, 0) .await?; // Creation of token mint B fixture .client - .create_token_mint(&fixture.mint_b, fixture.mint_authority.pubkey(), None, 0) + .create_token_mint(&fixture.mint_b, &fixture.mint_authority.pubkey(), None, 0) .await?; // Creation of alice's and bob's ATAs for token A fixture.alice_token_a_account = fixture .client - .create_associated_token_account(&fixture.alice_wallet, fixture.mint_a.pubkey()) + .create_associated_token_account(&fixture.alice_wallet, &fixture.mint_a.pubkey()) .await?; fixture.bob_token_a_account = fixture .client - .create_associated_token_account(&fixture.bob_wallet, fixture.mint_a.pubkey()) + .create_associated_token_account(&fixture.bob_wallet, &fixture.mint_a.pubkey()) .await?; // Creation of alice's and bob's ATAs for token B fixture.alice_token_b_account = fixture .client - .create_associated_token_account(&fixture.alice_wallet, fixture.mint_b.pubkey()) + .create_associated_token_account(&fixture.alice_wallet, &fixture.mint_b.pubkey()) .await?; fixture.bob_token_b_account = fixture .client - .create_associated_token_account(&fixture.bob_wallet, fixture.mint_b.pubkey()) + .create_associated_token_account(&fixture.bob_wallet, &fixture.mint_b.pubkey()) .await?; // Mint some tokens fixture .client .mint_tokens( - fixture.mint_a.pubkey(), + &fixture.mint_a.pubkey(), &fixture.mint_authority, - fixture.alice_token_a_account, + &fixture.alice_token_a_account, 500, ) .await?; fixture .client .mint_tokens( - fixture.mint_b.pubkey(), + &fixture.mint_b.pubkey(), &fixture.mint_authority, - fixture.bob_token_b_account, + &fixture.bob_token_b_account, 1000, ) .await?; @@ -68,17 +69,17 @@ async fn test_happy_path1(#[future] init_fixture: Result) { let fixture = init_fixture.await?; // Initialize escrow - escrow_instruction::initialize_escrow( + initialize_escrow( &fixture.client, 500, 1000, - fixture.alice_wallet.pubkey(), - fixture.alice_token_a_account, - fixture.alice_token_b_account, - fixture.escrow_account.pubkey(), - System::id(), - token::ID, - [fixture.alice_wallet.clone(), fixture.escrow_account.clone()], + &fixture.alice_wallet.pubkey(), + &fixture.alice_token_a_account, + &fixture.alice_token_b_account, + &fixture.escrow_account.pubkey(), + &solana_sdk::system_program::id(), + &token::ID, + [&fixture.alice_wallet, &fixture.escrow_account], ) .await?; @@ -101,18 +102,18 @@ async fn test_happy_path1(#[future] init_fixture: Result) { ); // Exchange - escrow_instruction::exchange( + exchange( &fixture.client, - fixture.bob_wallet.pubkey(), - fixture.bob_token_b_account, - fixture.bob_token_a_account, - fixture.alice_token_a_account, - fixture.alice_token_b_account, - fixture.alice_wallet.pubkey(), - fixture.escrow_account.pubkey(), - fixture.pda, - token::ID, - [fixture.bob_wallet.clone()], + &fixture.bob_wallet.pubkey(), + &fixture.bob_token_b_account, + &fixture.bob_token_a_account, + &fixture.alice_token_a_account, + &fixture.alice_token_b_account, + &fixture.alice_wallet.pubkey(), + &fixture.escrow_account.pubkey(), + &fixture.pda, + &token::ID, + [&fixture.bob_wallet], ) .await?; @@ -141,29 +142,29 @@ async fn test_happy_path2(#[future] init_fixture: Result) { let fixture = init_fixture.await?; // Initialize escrow - escrow_instruction::initialize_escrow( + initialize_escrow( &fixture.client, 500, 1000, - fixture.alice_wallet.pubkey(), - fixture.alice_token_a_account, - fixture.alice_token_b_account, - fixture.escrow_account.pubkey(), - System::id(), - token::ID, - [fixture.alice_wallet.clone(), fixture.escrow_account.clone()], + &fixture.alice_wallet.pubkey(), + &fixture.alice_token_a_account, + &fixture.alice_token_b_account, + &fixture.escrow_account.pubkey(), + &solana_sdk::system_program::id(), + &token::ID, + [&fixture.alice_wallet, &fixture.escrow_account], ) .await?; // Cancel - escrow_instruction::cancel_escrow( + cancel_escrow( &fixture.client, - fixture.alice_wallet.pubkey(), - fixture.alice_token_a_account, - fixture.pda, - fixture.escrow_account.pubkey(), - token::ID, - [], + &fixture.alice_wallet.pubkey(), + &fixture.alice_token_a_account, + &fixture.pda, + &fixture.escrow_account.pubkey(), + &token::ID, + &[], ) .await?; @@ -177,23 +178,23 @@ async fn test_happy_path2(#[future] init_fixture: Result) { struct Fixture { client: Client, - program: Keypair, + program: solana_sdk::signer::keypair::Keypair, // Mint stuff - mint_a: Keypair, - mint_b: Keypair, - mint_authority: Keypair, + mint_a: solana_sdk::signer::keypair::Keypair, + mint_b: solana_sdk::signer::keypair::Keypair, + mint_authority: solana_sdk::signer::keypair::Keypair, // Escrow - escrow_account: Keypair, + escrow_account: solana_sdk::signer::keypair::Keypair, // Participants - alice_wallet: Keypair, - bob_wallet: Keypair, + alice_wallet: solana_sdk::signer::keypair::Keypair, + bob_wallet: solana_sdk::signer::keypair::Keypair, // Token accounts - alice_token_a_account: Pubkey, - alice_token_b_account: Pubkey, - bob_token_a_account: Pubkey, - bob_token_b_account: Pubkey, + alice_token_a_account: solana_sdk::pubkey::Pubkey, + alice_token_b_account: solana_sdk::pubkey::Pubkey, + bob_token_a_account: solana_sdk::pubkey::Pubkey, + bob_token_b_account: solana_sdk::pubkey::Pubkey, // PDA authority of escrow - pda: Pubkey, + pda: solana_sdk::pubkey::Pubkey, } impl Fixture { fn new() -> Self { @@ -217,34 +218,34 @@ impl Fixture { alice_wallet: keypair(21), bob_wallet: keypair(22), - alice_token_a_account: Pubkey::default(), - alice_token_b_account: Pubkey::default(), - bob_token_a_account: Pubkey::default(), - bob_token_b_account: Pubkey::default(), + alice_token_a_account: solana_sdk::pubkey::Pubkey::default(), + alice_token_b_account: solana_sdk::pubkey::Pubkey::default(), + bob_token_a_account: solana_sdk::pubkey::Pubkey::default(), + bob_token_b_account: solana_sdk::pubkey::Pubkey::default(), - pda: Pubkey::default(), + pda: solana_sdk::pubkey::Pubkey::default(), } } #[throws] async fn deploy(&mut self) { self.client - .airdrop(self.alice_wallet.pubkey(), 5_000_000_000) - .await?; - self.client - .deploy_by_name(&self.program.clone(), "escrow") + .airdrop(&self.alice_wallet.pubkey(), 5_000_000_000) .await?; + self.client.deploy_by_name(&self.program, "escrow").await?; } #[throws] async fn get_escrow(&self) -> escrow::EscrowAccount { self.client - .account_data::(self.escrow_account.pubkey()) + .account_data::(&self.escrow_account.pubkey()) .await? } #[throws] - async fn get_token_account(&self, key: Pubkey) -> token::TokenAccount { - self.client.account_data::(key).await? + async fn get_token_account(&self, key: solana_sdk::pubkey::Pubkey) -> token::TokenAccount { + self.client + .account_data::(&key) + .await? } } diff --git a/examples/fuzzer/.program_client/src/lib.rs b/examples/fuzzer/.program_client/src/lib.rs index 3c870404..b79ef380 100644 --- a/examples/fuzzer/.program_client/src/lib.rs +++ b/examples/fuzzer/.program_client/src/lib.rs @@ -1,55 +1,65 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod fuzzer_instruction { - use trdelnik_client::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, 42u8, - 8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, 250u8, 145u8, - 26u8, 46u8, 170u8, 146u8, - ]); + use trdelnik_client::program_client::*; + pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = + solana_sdk::pubkey::Pubkey::new_from_array([ + 170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, + 42u8, 8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, + 250u8, 145u8, 26u8, 46u8, 170u8, 146u8, + ]); + #[allow(clippy::too_many_arguments)] pub async fn initialize( client: &Client, - a_counter: Pubkey, - a_user: Pubkey, - a_system_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_counter: &solana_sdk::pubkey::Pubkey, + a_user: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, fuzzer::instruction::Initialize {}, fuzzer::accounts::Initialize { - counter: a_counter, - user: a_user, - system_program: a_system_program, + counter: *a_counter, + user: *a_user, + system_program: *a_system_program, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn initialize_ix( - a_counter: Pubkey, - a_user: Pubkey, - a_system_program: Pubkey, - ) -> Instruction { - Instruction { + a_counter: &solana_sdk::pubkey::Pubkey, + a_user: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: fuzzer::instruction::Initialize {}.data(), accounts: fuzzer::accounts::Initialize { - counter: a_counter, - user: a_user, - system_program: a_system_program, + counter: *a_counter, + user: *a_user, + system_program: *a_system_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn update( client: &Client, i_input1: u8, i_input2: u8, - a_counter: Pubkey, - a_authority: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_counter: &solana_sdk::pubkey::Pubkey, + a_authority: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, @@ -58,20 +68,21 @@ pub mod fuzzer_instruction { input2: i_input2, }, fuzzer::accounts::Update { - counter: a_counter, - authority: a_authority, + counter: *a_counter, + authority: *a_authority, }, signers, ) .await } + #[allow(clippy::too_many_arguments)] pub fn update_ix( i_input1: u8, i_input2: u8, - a_counter: Pubkey, - a_authority: Pubkey, - ) -> Instruction { - Instruction { + a_counter: &solana_sdk::pubkey::Pubkey, + a_authority: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: fuzzer::instruction::Update { input1: i_input1, @@ -79,8 +90,8 @@ pub mod fuzzer_instruction { } .data(), accounts: fuzzer::accounts::Update { - counter: a_counter, - authority: a_authority, + counter: *a_counter, + authority: *a_authority, } .to_account_metas(None), } diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 846ffea4..e5c14251 100644 --- a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,6 +1,6 @@ +use assert_matches::*; use fuzzer::entry; use program_client::fuzzer_instruction::*; -use assert_matches::*; use trdelnik_client::fuzzing::*; const PROGRAM_NAME: &str = "fuzzer"; @@ -14,58 +14,67 @@ pub struct FuzzData { fn main() { loop { fuzz!(|fuzz_data: FuzzData| { - Runtime::new().unwrap().block_on(async { - let program_test = ProgramTest::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)); + solana_program_test::tokio::runtime::Runtime::new() + .unwrap() + .block_on(async { + let program_test = solana_program_test::ProgramTest::new( + PROGRAM_NAME, + PROGRAM_ID, + solana_program_test::processor!(entry), + ); - let mut ctx = program_test.start_with_context().await; + let mut ctx = program_test.start_with_context().await; - // TODO: replace this instruction with one of your generated instructions from trdelnik_client - let init_ix = init_dummy_ix(); - let mut transaction = - Transaction::new_with_payer(&[init_ix], Some(&ctx.payer.pubkey().clone())); + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let init_ix = init_dummy_ix(); + let mut transaction = solana_sdk::transaction::Transaction::new_with_payer( + &[init_ix], + Some(&ctx.payer.pubkey()), + ); - transaction.sign(&[&ctx.payer], ctx.last_blockhash); - let res = ctx.banks_client.process_transaction(transaction).await; - assert_matches!(res, Ok(())); + transaction.sign(&[&ctx.payer], ctx.last_blockhash); + let res = ctx.banks_client.process_transaction(transaction).await; + assert_matches!(res, Ok(())); - let res = fuzz_ix( - &fuzz_data, - &mut ctx.banks_client, - &ctx.payer, - ctx.last_blockhash, - ) - .await; - assert_matches!(res, Ok(())); - }); + let res = fuzz_ix( + &fuzz_data, + &mut ctx.banks_client, + &ctx.payer, + ctx.last_blockhash, + ) + .await; + assert_matches!(res, Ok(())); + }); }); } } async fn fuzz_ix( fuzz_data: &FuzzData, - banks_client: &mut BanksClient, - payer: &Keypair, - blockhash: Hash, -) -> core::result::Result<(), BanksClientError> { + banks_client: &mut solana_program_test::BanksClient, + payer: &solana_sdk::signature::Keypair, + blockhash: solana_sdk::hash::Hash, +) -> core::result::Result<(), solana_program_test::BanksClientError> { // TODO: replace this instruction with one of your generated instructions from trdelnik_client let update_ix = update_dummy_ix(fuzz_data.param1, fuzz_data.param2); - let mut transaction = Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); + let mut transaction = + solana_sdk::transaction::Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); transaction.sign(&[payer], blockhash); banks_client.process_transaction(transaction).await } -fn init_dummy_ix() -> Instruction { - Instruction { +fn init_dummy_ix() -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: vec![], accounts: vec![], } } -fn update_dummy_ix(param1: u8, param2: u8) -> Instruction { - Instruction { +fn update_dummy_ix(param1: u8, param2: u8) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: vec![param1, param2], accounts: vec![], diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs index 48f676e3..75dda0a5 100644 --- a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs @@ -14,51 +14,63 @@ pub struct FuzzData { fn main() { loop { fuzz!(|fuzz_data: FuzzData| { - Runtime::new().unwrap().block_on(async { - let program_test = ProgramTest::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)); + solana_program_test::tokio::runtime::Runtime::new() + .unwrap() + .block_on(async { + let program_test = solana_program_test::ProgramTest::new( + PROGRAM_NAME, + PROGRAM_ID, + solana_program_test::processor!(entry), + ); - let mut ctx = program_test.start_with_context().await; + let mut ctx = program_test.start_with_context().await; - let counter = Keypair::new(); + let counter = solana_sdk::signature::Keypair::new(); - let init_ix = - initialize_ix(counter.pubkey(), ctx.payer.pubkey(), SYSTEM_PROGRAM_ID); - let mut transaction = - Transaction::new_with_payer(&[init_ix], Some(&ctx.payer.pubkey().clone())); + let init_ix = initialize_ix( + &counter.pubkey(), + &ctx.payer.pubkey(), + &solana_sdk::system_program::ID, + ); + let mut transaction = solana_sdk::transaction::Transaction::new_with_payer( + &[init_ix], + Some(&ctx.payer.pubkey()), + ); - transaction.sign(&[&ctx.payer, &counter], ctx.last_blockhash); - let res = ctx.banks_client.process_transaction(transaction).await; - assert_matches!(res, Ok(())); + transaction.sign(&[&ctx.payer, &counter], ctx.last_blockhash); + let res = ctx.banks_client.process_transaction(transaction).await; + assert_matches!(res, Ok(())); - let res = fuzz_update_ix( - &fuzz_data, - &mut ctx.banks_client, - &ctx.payer, - &counter, - ctx.last_blockhash, - ) - .await; - assert_matches!(res, Ok(())); - }); + let res = fuzz_update_ix( + &fuzz_data, + &mut ctx.banks_client, + &ctx.payer, + &counter, + ctx.last_blockhash, + ) + .await; + assert_matches!(res, Ok(())); + }); }); } } async fn fuzz_update_ix( fuzz_data: &FuzzData, - banks_client: &mut BanksClient, - payer: &Keypair, - counter: &Keypair, - blockhash: Hash, -) -> core::result::Result<(), BanksClientError> { + banks_client: &mut solana_program_test::BanksClient, + payer: &solana_sdk::signature::Keypair, + counter: &solana_sdk::signature::Keypair, + blockhash: solana_sdk::hash::Hash, +) -> core::result::Result<(), solana_program_test::BanksClientError> { let update_ix = update_ix( fuzz_data.param1, fuzz_data.param2, - counter.pubkey(), - payer.pubkey(), + &counter.pubkey(), + &payer.pubkey(), ); - let mut transaction = Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); + let mut transaction = + solana_sdk::transaction::Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); transaction.sign(&[payer], blockhash); banks_client.process_transaction(transaction).await diff --git a/examples/turnstile/.program_client/src/lib.rs b/examples/turnstile/.program_client/src/lib.rs index abbc63d1..1f6059f6 100644 --- a/examples/turnstile/.program_client/src/lib.rs +++ b/examples/turnstile/.program_client/src/lib.rs @@ -1,89 +1,112 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod turnstile_instruction { - use trdelnik_client::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::program_client::*; + pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = + solana_sdk::pubkey::Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, + 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, + ]); + #[allow(clippy::too_many_arguments)] pub async fn initialize( client: &Client, - a_state: Pubkey, - a_user: Pubkey, - a_system_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_state: &solana_sdk::pubkey::Pubkey, + a_user: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, turnstile::instruction::Initialize {}, turnstile::accounts::Initialize { - state: a_state, - user: a_user, - system_program: a_system_program, + state: *a_state, + user: *a_user, + system_program: *a_system_program, }, signers, ) .await } - pub fn initialize_ix(a_state: Pubkey, a_user: Pubkey, a_system_program: Pubkey) -> Instruction { - Instruction { + #[allow(clippy::too_many_arguments)] + pub fn initialize_ix( + a_state: &solana_sdk::pubkey::Pubkey, + a_user: &solana_sdk::pubkey::Pubkey, + a_system_program: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Initialize {}.data(), accounts: turnstile::accounts::Initialize { - state: a_state, - user: a_user, - system_program: a_system_program, + state: *a_state, + user: *a_user, + system_program: *a_system_program, } .to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn coin( client: &Client, i_dummy_arg: String, - a_state: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_state: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, turnstile::instruction::Coin { dummy_arg: i_dummy_arg, }, - turnstile::accounts::UpdateState { state: a_state }, + turnstile::accounts::UpdateState { state: *a_state }, signers, ) .await } - pub fn coin_ix(i_dummy_arg: String, a_state: Pubkey) -> Instruction { - Instruction { + #[allow(clippy::too_many_arguments)] + pub fn coin_ix( + i_dummy_arg: String, + a_state: &solana_sdk::pubkey::Pubkey, + ) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Coin { dummy_arg: i_dummy_arg, } .data(), - accounts: turnstile::accounts::UpdateState { state: a_state }.to_account_metas(None), + accounts: turnstile::accounts::UpdateState { state: *a_state }.to_account_metas(None), } } + #[allow(clippy::too_many_arguments)] pub async fn push( client: &Client, - a_state: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { + a_state: &solana_sdk::pubkey::Pubkey, + signers: impl IntoIterator + Send, + ) -> Result< + solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, + anchor_client::ClientError, + > { client .send_instruction( PROGRAM_ID, turnstile::instruction::Push {}, - turnstile::accounts::UpdateState { state: a_state }, + turnstile::accounts::UpdateState { state: *a_state }, signers, ) .await } - pub fn push_ix(a_state: Pubkey) -> Instruction { - Instruction { + #[allow(clippy::too_many_arguments)] + pub fn push_ix(a_state: &solana_sdk::pubkey::Pubkey) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Push {}.data(), - accounts: turnstile::accounts::UpdateState { state: a_state }.to_account_metas(None), + accounts: turnstile::accounts::UpdateState { state: *a_state }.to_account_metas(None), } } } diff --git a/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml b/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml index fba8eae4..2bfb6dc1 100644 --- a/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml +++ b/examples/turnstile/trdelnik-tests/poc_tests/Cargo.toml @@ -4,12 +4,11 @@ version = "0.1.0" edition = "2018" [dev-dependencies] -assert_matches = "1.4.0" fehler = "1.0.0" -rstest = "0.12.0" [dev-dependencies.trdelnik-client] path = "../../../../crates/client" +features = ["poctesting"] [dev-dependencies.program_client] path = "../../.program_client" diff --git a/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs b/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs index 729dd077..0cfbe80d 100644 --- a/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs +++ b/examples/turnstile/trdelnik-tests/poc_tests/tests/test.rs @@ -1,7 +1,7 @@ -use fehler::throws; use program_client::turnstile_instruction::*; -use trdelnik_client::{anyhow::Result, *}; +use trdelnik_client::poctesting::*; +// @todo: create and deploy your fixture #[throws] #[fixture] async fn init_fixture() -> Fixture { @@ -22,7 +22,7 @@ async fn init_fixture() -> Fixture { }; fixture .client - .airdrop(fixture.user_initializer.pubkey(), 5_000_000_000) + .airdrop(&fixture.user_initializer.pubkey(), 5_000_000_000) .await?; // deploy a tested program fixture @@ -33,10 +33,10 @@ async fn init_fixture() -> Fixture { // init instruction call initialize( &fixture.client, - fixture.state.pubkey(), - fixture.user_initializer.pubkey(), - System::id(), - [fixture.state.clone(), fixture.user_initializer.clone()], + &fixture.state.pubkey(), + &fixture.user_initializer.pubkey(), + &solana_sdk::system_program::id(), + [&fixture.state, &fixture.user_initializer], ) .await?; @@ -51,12 +51,12 @@ async fn test_happy_path(#[future] init_fixture: Result) { coin( &fixture.client, "dummy_string".to_owned(), - fixture.state.pubkey(), + &fixture.state.pubkey(), None, ) .await?; // push instruction call - push(&fixture.client, fixture.state.pubkey(), None).await?; + push(&fixture.client, &fixture.state.pubkey(), None).await?; // check the test result let state = fixture.get_state().await?; @@ -72,7 +72,7 @@ async fn test_unhappy_path(#[future] init_fixture: Result) { let fixture = init_fixture.await?; // pushing without prior coin insertion - push(&fixture.client, fixture.state.pubkey(), None).await?; + push(&fixture.client, &fixture.state.pubkey(), None).await?; // check the test result let state = fixture.get_state().await?; @@ -85,14 +85,14 @@ async fn test_unhappy_path(#[future] init_fixture: Result) { struct Fixture { client: Client, - program: Keypair, - state: Keypair, - user_initializer: Keypair, + program: solana_sdk::signer::keypair::Keypair, + state: solana_sdk::signer::keypair::Keypair, + user_initializer: solana_sdk::signer::keypair::Keypair, } impl Fixture { #[throws] async fn get_state(&self) -> turnstile::State { - self.client.account_data(self.state.pubkey()).await? + self.client.account_data(&self.state.pubkey()).await? } } From 61ddbf2162804b3afff5ff70ab7ed43addb04402 Mon Sep 17 00:00:00 2001 From: andrej Date: Fri, 22 Dec 2023 17:20:41 +0100 Subject: [PATCH 35/57] =?UTF-8?q?=F0=9F=92=9A=20Fixing=20pipeline=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/client.rs | 23 ++--- crates/client/src/commander.rs | 6 +- crates/client/src/config.rs | 8 +- crates/client/src/idl.rs | 5 +- crates/client/src/program_client_generator.rs | 2 +- crates/client/src/workspace_builder.rs | 99 +++++++++---------- .../src/parse/associated_token_account.rs | 2 +- 7 files changed, 71 insertions(+), 74 deletions(-) diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index eb7a562a..4699f52a 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -1,23 +1,19 @@ use crate::{constants::*, Config, Reader, TempClone}; -use anchor_client; use anchor_client::ClientError as Error; // TODO maybe can deleted -use borsh; +// use borsh; use fehler::{throw, throws}; use solana_sdk::program_pack::Pack; use solana_sdk::signer::Signer; // TODO maybe can deleted use futures::{self, StreamExt}; -use log; // TODO maybe can deleted -use serde; +// use serde; // TODO maybe can deleted -use solana_account_decoder; +// use solana_account_decoder; // TODO maybe can deleted -use solana_cli_output; -use solana_transaction_status; -use spl_associated_token_account; +// use solana_cli_output; // @TODO: Make compatible with the latest Anchor deps. // https://github.com/project-serum/anchor/pull/1307#issuecomment-1022592683 @@ -187,7 +183,7 @@ impl Client { .program(solana_sdk::system_program::ID)? .async_rpc(); rpc_client - .get_account_with_commitment(&account, rpc_client.commitment()) + .get_account_with_commitment(account, rpc_client.commitment()) .await .unwrap() .value @@ -326,10 +322,7 @@ impl Client { .unwrap() .async_rpc(); - let signature = rpc_client - .request_airdrop(&address, lamports) - .await - .unwrap(); + let signature = rpc_client.request_airdrop(address, lamports).await.unwrap(); let (airdrop_result, error) = loop { match rpc_client.get_signature_status(&signature).await.unwrap() { @@ -708,14 +701,14 @@ impl Client { spl_associated_token_account::instruction::create_associated_token_account( &self.payer().pubkey(), &owner.pubkey(), - &mint, + mint, &spl_token::ID, ), ], &[], ) .await?; - spl_associated_token_account::get_associated_token_address(&owner.pubkey(), &mint) + spl_associated_token_account::get_associated_token_address(&owner.pubkey(), mint) } /// Executes a transaction creating and filling the given account with the given data. diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 12e4c4ef..02d0dec3 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -5,14 +5,14 @@ use crate::Client; use crate::Config; use crate::{Idl, IdlError}; use fehler::{throw, throws}; -use log; +// use log; use thiserror::Error; // TODO maybe unused -use tokio; +// use tokio; // ----- use crate::constants::*; -use indicatif; +// use indicatif; #[derive(Error, Debug)] pub enum Error { #[error("{0:?}")] diff --git a/crates/client/src/config.rs b/crates/client/src/config.rs index 4da9f837..26fb4fe2 100644 --- a/crates/client/src/config.rs +++ b/crates/client/src/config.rs @@ -244,7 +244,7 @@ pub struct Config { pub fuzz: Fuzz, } -#[derive(Default, Debug, Deserialize, Clone)] +#[derive(Debug, Deserialize, Clone)] struct _Config { #[serde(default)] pub test: Option<_Test>, @@ -261,6 +261,12 @@ impl From<_Config> for Config { } } +impl Default for Config { + fn default() -> Self { + Config::new() + } +} + impl Config { pub fn new() -> Self { let root = Config::discover_root().expect("failed to find the root folder"); diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index 56806789..e7ea0d10 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -163,8 +163,9 @@ impl Idl { let static_program_id = static_program_id.ok_or(IdlError::MissingOrInvalidProgramItems("missing static ID"))?; - let mod_private = - mod_private.ok_or(IdlError::MissingOrInvalidProgramItems("missing mod private"))?; + let mod_private = mod_private.ok_or(IdlError::MissingOrInvalidProgramItems( + "missing mod private", + ))?; let mod_instruction = mod_instruction.ok_or(IdlError::MissingOrInvalidProgramItems( "missing mod instruction", ))?; diff --git a/crates/client/src/program_client_generator.rs b/crates/client/src/program_client_generator.rs index cbb3a953..eaf1ef7e 100644 --- a/crates/client/src/program_client_generator.rs +++ b/crates/client/src/program_client_generator.rs @@ -55,7 +55,7 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { let last_type = &tp.path.segments.last().unwrap().ident.to_string(); if last_type == "Pubkey" { - let reference = format!("&solana_sdk::pubkey::Pubkey"); + let reference = "&solana_sdk::pubkey::Pubkey".to_string(); let t: syn::Type = parse_str(&reference).unwrap(); t } else { diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 3016c23d..b0c80327 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -1,7 +1,7 @@ use crate::commander::{Commander, Error as CommanderError}; use cargo_metadata::Package; use fehler::{throw, throws}; -use pathdiff; +// use pathdiff; use std::{ env, fs::OpenOptions, @@ -12,10 +12,7 @@ use std::{fs::File, io::prelude::*}; use syn::ItemUse; use thiserror::Error; use tokio::fs; -use toml::{ - value::{Map, Table}, - Value, -}; +use toml::{value::Table, Value}; use crate::constants::*; use crate::generate_source_code; @@ -533,52 +530,52 @@ impl WorkspaceBuilder { }; } - #[throws] - async fn add_feature_to_dep(&self, dependency: &str, feature: &str, cargo_dir: &Path) { - let cargo_toml_path = cargo_dir.join(CARGO); - let rel_path = &cargo_toml_path - .strip_prefix(&self.root) - .unwrap() - .to_str() - .unwrap(); - let mut content: Value = fs::read_to_string(&cargo_toml_path).await?.parse()?; - let deps = content - .get_mut("dependencies") - .and_then(Value::as_table_mut) - .ok_or(Error::CannotParseCargoToml)?; - - let values = deps - .get_mut(dependency) - .and_then(|f| { - if f.is_table() { - f.as_table_mut() - } else if f.is_str() { - // if the value is only a string with version such as dependency = 0.0, create a new table with that version - let version = f.as_str().unwrap(); - let mut map = Map::new(); - let _ = map.insert("version".to_string(), Value::String(version.to_string())); - let t = Value::Table(map); - *f = t.to_owned(); - f.as_table_mut() - } else { - None - } - }) - .ok_or(Error::CannotParseCargoToml)?; - - let fuzzing = Value::String(feature.to_string()); - let value = Value::Array(vec![]); - let features = values.entry("features").or_insert(value); - if let Some(features) = features.as_array_mut() { - if !features.iter().any(|f| *f == fuzzing) { - features.push(fuzzing); - fs::write(&cargo_toml_path, content.to_string()).await?; - println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{rel_path}\x1b[0m {feature} feature added."); - } else { - println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{rel_path}\x1b[0m, already contains {feature} feature.") - } - } - } + // #[throws] + // async fn add_feature_to_dep(&self, dependency: &str, feature: &str, cargo_dir: &Path) { + // let cargo_toml_path = cargo_dir.join(CARGO); + // let rel_path = &cargo_toml_path + // .strip_prefix(&self.root) + // .unwrap() + // .to_str() + // .unwrap(); + // let mut content: Value = fs::read_to_string(&cargo_toml_path).await?.parse()?; + // let deps = content + // .get_mut("dependencies") + // .and_then(Value::as_table_mut) + // .ok_or(Error::CannotParseCargoToml)?; + + // let values = deps + // .get_mut(dependency) + // .and_then(|f| { + // if f.is_table() { + // f.as_table_mut() + // } else if f.is_str() { + // // if the value is only a string with version such as dependency = 0.0, create a new table with that version + // let version = f.as_str().unwrap(); + // let mut map = Map::new(); + // let _ = map.insert("version".to_string(), Value::String(version.to_string())); + // let t = Value::Table(map); + // *f = t.to_owned(); + // f.as_table_mut() + // } else { + // None + // } + // }) + // .ok_or(Error::CannotParseCargoToml)?; + + // let fuzzing = Value::String(feature.to_string()); + // let value = Value::Array(vec![]); + // let features = values.entry("features").or_insert(value); + // if let Some(features) = features.as_array_mut() { + // if !features.iter().any(|f| *f == fuzzing) { + // features.push(fuzzing); + // fs::write(&cargo_toml_path, content.to_string()).await?; + // println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{rel_path}\x1b[0m {feature} feature added."); + // } else { + // println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{rel_path}\x1b[0m, already contains {feature} feature.") + // } + // } + // } /// - adds program dependency to specified Cargo.toml /// for example, we need to use program entry within the fuzzer diff --git a/crates/explorer/src/parse/associated_token_account.rs b/crates/explorer/src/parse/associated_token_account.rs index d9acfb3c..9d058b37 100644 --- a/crates/explorer/src/parse/associated_token_account.rs +++ b/crates/explorer/src/parse/associated_token_account.rs @@ -74,7 +74,7 @@ mod test { &convert_pubkey(funder), &convert_pubkey(wallet_address), &convert_pubkey(mint), - &&spl_token::id(), + &spl_token::id(), ); let message = Message::new(&[create_ix], None); let compiled_instruction = convert_compiled_instruction(&message.instructions[0]); From 8a03ab04b363eebb2c584f7fc816e9cb025c8754 Mon Sep 17 00:00:00 2001 From: andrej Date: Mon, 25 Dec 2023 23:09:36 +0100 Subject: [PATCH 36/57] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Reverted=20full=20pa?= =?UTF-8?q?ths=20to=20dependancies=20because=20instruction=20inputs=20do?= =?UTF-8?q?=20not=20have=20full=20paths=20so=20to=20stay=20consistent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/build.rs | 2 +- crates/cli/src/command/clean.rs | 2 +- crates/cli/src/command/fuzz.rs | 4 +- crates/cli/src/command/init.rs | 6 +- crates/cli/src/command/keypair.rs | 2 +- crates/cli/src/command/localnet.rs | 2 +- crates/cli/src/command/test.rs | 2 +- crates/client/Cargo.toml | 7 +- crates/client/src/client.rs | 6 +- crates/client/src/commander.rs | 2 +- crates/client/src/lib.rs | 63 ++++----- crates/client/src/program_client_generator.rs | 59 ++++---- crates/client/src/reader.rs | 6 +- crates/client/src/tester.rs | 4 +- crates/client/src/workspace_builder.rs | 13 +- crates/client/tests/test.rs | 18 ++- .../tests/test_data/expected_client_code.rs | 126 ++++++++---------- crates/test/src/lib.rs | 4 +- crates/test/tests/expand/basic.expanded.rs | 4 +- .../test/tests/expand/with_root.expanded.rs | 4 +- crates/test/tests/expand/with_root.rs | 3 +- examples/escrow/.program_client/src/lib.rs | 126 ++++++++---------- examples/fuzzer/.program_client/src/lib.rs | 55 ++++---- examples/turnstile/.program_client/src/lib.rs | 65 ++++----- 24 files changed, 281 insertions(+), 304 deletions(-) diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index 41c776b7..52fd7ed5 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -1,7 +1,7 @@ use crate::{discover, ProgramArch}; use anyhow::{bail, Error}; use fehler::throws; -use trdelnik_client::*; +use trdelnik_client::__private::WorkspaceBuilder; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; diff --git a/crates/cli/src/command/clean.rs b/crates/cli/src/command/clean.rs index b8cc9f95..f8de93d3 100644 --- a/crates/cli/src/command/clean.rs +++ b/crates/cli/src/command/clean.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Error}; use fehler::throws; -use trdelnik_client::WorkspaceBuilder; +use trdelnik_client::__private::WorkspaceBuilder; use crate::discover; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 59b23b7a..2cbc303f 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -2,8 +2,8 @@ use anyhow::{bail, Error}; use clap::Subcommand; use fehler::throws; -use trdelnik_client::Commander; -use trdelnik_client::WorkspaceBuilder; +use trdelnik_client::__private::Commander; +use trdelnik_client::__private::WorkspaceBuilder; use crate::discover; diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index 2a52e175..db4db06f 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -1,12 +1,13 @@ use anyhow::{bail, Error}; use clap::{Parser, ValueEnum}; use fehler::throws; -use trdelnik_client::WorkspaceBuilder; +use trdelnik_client::__private::WorkspaceBuilder; use crate::{discover, ProgramArch}; pub const ANCHOR_TOML: &str = "Anchor.toml"; pub const CARGO_TOML: &str = "Cargo.toml"; +pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[derive(ValueEnum, Parser, Clone, PartialEq, Eq, Debug)] pub enum InitCommand { @@ -17,6 +18,9 @@ pub enum InitCommand { #[throws] pub async fn init(template: InitCommand, arch: ProgramArch) { + if let Some(_trdelnik_toml) = discover(TRDELNIK_TOML)? { + bail!("It seems that Trdelnik Workspace is already initialized because the Trdelnik.toml file was found in parent directory!"); + } match template { InitCommand::Fuzz => { let root = if let Some(r) = discover(ANCHOR_TOML)? { diff --git a/crates/cli/src/command/keypair.rs b/crates/cli/src/command/keypair.rs index b2d5426b..51b35aa7 100644 --- a/crates/cli/src/command/keypair.rs +++ b/crates/cli/src/command/keypair.rs @@ -2,7 +2,7 @@ use anyhow::Error; use clap::Subcommand; use fehler::throws; use solana_sdk::signer::Signer; -use trdelnik_client::{keypair as other_keypair, program_keypair, system_keypair}; +use trdelnik_client::keys::{keypair as other_keypair, program_keypair, system_keypair}; #[derive(Subcommand)] pub enum KeyPairCommand { diff --git a/crates/cli/src/command/localnet.rs b/crates/cli/src/command/localnet.rs index 511ab51f..55db9b06 100644 --- a/crates/cli/src/command/localnet.rs +++ b/crates/cli/src/command/localnet.rs @@ -1,7 +1,7 @@ use anyhow::{bail, Error}; use fehler::throws; use tokio::signal; -use trdelnik_client::*; +use trdelnik_client::__private::Commander; use crate::discover; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; diff --git a/crates/cli/src/command/test.rs b/crates/cli/src/command/test.rs index 1c31412d..25ccd4ac 100644 --- a/crates/cli/src/command/test.rs +++ b/crates/cli/src/command/test.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Error}; use fehler::throws; -use trdelnik_client::*; +use trdelnik_client::__private::Commander; use crate::discover; diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index fdc7c2b4..b8d6d2bb 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -14,8 +14,7 @@ fuzzing = [ "arbitrary/derive", "quinn-proto/arbitrary", ] -poctesting = ["dep:rstest", "dep:serial_test","dep:trdelnik-test"] - +poctesting = ["dep:rstest", "dep:serial_test", "dep:trdelnik-test"] [build-dependencies] anyhow = { version = "1.0.45", features = ["std"], default-features = false } @@ -28,7 +27,7 @@ solana-cli-output = { workspace = true } solana-transaction-status = { workspace = true } solana-account-decoder = { workspace = true } anchor-client = { workspace = true } -anchor-lang = {version = "0.28.0"} +anchor-lang = { version = "0.28.0" } spl-token = { workspace = true } spl-associated-token-account = { workspace = true } tokio = { workspace = true } @@ -48,7 +47,7 @@ heck = { workspace = true } toml = { workspace = true } log = { workspace = true } -trdelnik-test = { workspace = true,optional = true } +trdelnik-test = { workspace = true, optional = true } serial_test = { version = "2.0.0", optional = true } rstest = { version = "0.18.2", optional = true } honggfuzz = { version = "0.5.55", optional = true } diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 4699f52a..77b93c7e 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -1,4 +1,8 @@ -use crate::{constants::*, Config, Reader, TempClone}; +use crate::constants::*; +use crate::temp_clone::TempClone; + +use crate::Config; +use crate::Reader; use anchor_client::ClientError as Error; // TODO maybe can deleted diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 02d0dec3..4ec324eb 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -273,7 +273,7 @@ impl Commander { let mut use_modules: Vec = vec![]; if use_modules.is_empty() { - use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) + use_modules.push(syn::parse_quote! { use trdelnik_client::prelude::*; }) } use_modules } diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 7ce6c478..b1393376 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -14,19 +14,34 @@ pub mod fuzzing { pub use solana_sdk::signer::Signer; } -pub mod program_client { +pub mod prelude { pub use crate::client::Client; pub use anchor_client; + pub use anchor_client::ClientError; + pub use anchor_lang; pub use anchor_lang::{InstructionData, ToAccountMetas}; pub use solana_sdk; - pub use solana_transaction_status; + pub use solana_sdk::instruction::Instruction; + pub use solana_sdk::pubkey::Pubkey; + pub use solana_sdk::signer::keypair::Keypair; + pub use solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta; +} + +#[doc(hidden)] +pub mod __private { + pub use crate::commander::Commander; + pub use crate::idl::Idl; + pub use crate::idl::IdlError; + pub use crate::program_client_generator::ProgramCLientGenerator; + pub use crate::workspace_builder::WorkspaceBuilder; } #[cfg(feature = "poctesting")] pub mod poctesting { pub use crate::client::Client; - pub use crate::error_reporter::*; - pub use crate::TempClone; + pub use crate::error_reporter; + pub use crate::temp_clone; + pub use crate::tester::Tester; pub use anchor_lang; pub use anyhow::{Error, Result}; @@ -43,52 +58,34 @@ pub mod poctesting { pub use crate::keys::*; } -// pub use futures::{self, FutureExt}; -// pub use client::PrintableTransaction; -// pub use trdelnik_test::trdelnik_test; - -// pub use rstest::*; -// pub use serial_test; -// pub use tokio; - mod config; -pub use config::Config; +use config::Config; mod client; -pub use client::Client; +use client::Client; mod reader; -pub use reader::Reader; +use reader::Reader; mod commander; -pub use commander::{Commander, LocalnetHandle}; - -mod tester; -pub use tester::Tester; - -mod temp_clone; -pub use temp_clone::TempClone; - -mod keys; -pub use keys::*; +use commander::Commander; mod idl; -pub use idl::{Idl, IdlError}; +use idl::{Idl, IdlError}; mod program_client_generator; -pub use program_client_generator::generate_source_code; mod workspace_builder; -pub use workspace_builder::WorkspaceBuilder; pub mod error_reporter; -pub use error_reporter::*; +pub mod keys; +pub mod temp_clone; +pub mod tester; -pub mod constants { +mod constants { pub const PROGRAM_CLIENT_DIRECTORY: &str = ".program_client"; pub const CARGO: &str = "Cargo.toml"; pub const TRDELNIK: &str = "Trdelnik.toml"; - pub const ANCHOR: &str = "Anchor.toml"; pub const LIB: &str = "lib.rs"; pub const SRC: &str = "src"; @@ -102,15 +99,13 @@ pub mod constants { pub const POC_TEST: &str = "test.rs"; pub const FUZZ_TEST: &str = "test_fuzz.rs"; - pub const PROGRAM_STUBS: &str = "program_stubs.rs"; + // pub const PROGRAM_STUBS: &str = "program_stubs.rs"; pub const HFUZZ_TARGET: &str = "hfuzz_target"; pub const HFUZZ_WORKSPACE: &str = "hfuzz_workspace"; pub const GIT_IGNORE: &str = ".gitignore"; - pub const CLIENT_TOML_TEMPLATE: &str = "/src/templates/program_client/Cargo.toml.tmpl"; - pub const RETRY_LOCALNET_EVERY_MILLIS: u64 = 500; pub const DEFAULT_KEYPAIR_PATH: &str = "~/.config/solana/id.json"; } diff --git a/crates/client/src/program_client_generator.rs b/crates/client/src/program_client_generator.rs index eaf1ef7e..efa0e569 100644 --- a/crates/client/src/program_client_generator.rs +++ b/crates/client/src/program_client_generator.rs @@ -2,22 +2,24 @@ use crate::idl::Idl; use quote::{format_ident, ToTokens}; use syn::{parse_quote, parse_str}; +pub struct ProgramCLientGenerator {} /// Generates `program_client`'s `lib.rs` from [Idl] created from Anchor programs. /// Disable regenerating the `use` statements with a used imports `use_modules` /// /// _Note_: See the crate's tests for output example. -pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { - let mut output = "// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module\n".to_owned(); - let code = idl - .programs - .iter() - .map(|idl_program| { - let program_name = idl_program.name.snake_case.replace('-', "_"); - let instruction_module_name = format_ident!("{}_instruction", program_name); - let module_name: syn::Ident = parse_str(&program_name).unwrap(); - let pubkey_bytes: syn::ExprArray = parse_str(&idl_program.id).unwrap(); +impl ProgramCLientGenerator { + pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { + let mut output = "// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module\n".to_owned(); + let code = idl + .programs + .iter() + .map(|idl_program| { + let program_name = idl_program.name.snake_case.replace('-', "_"); + let instruction_module_name = format_ident!("{}_instruction", program_name); + let module_name: syn::Ident = parse_str(&program_name).unwrap(); + let pubkey_bytes: syn::ExprArray = parse_str(&idl_program.id).unwrap(); - let instructions = idl_program + let instructions = idl_program .instruction_account_pairs .iter() .fold( @@ -55,7 +57,7 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { let last_type = &tp.path.segments.last().unwrap().ident.to_string(); if last_type == "Pubkey" { - let reference = "&solana_sdk::pubkey::Pubkey".to_string(); + let reference = "&Pubkey".to_string(); let t: syn::Type = parse_str(&reference).unwrap(); t } else { @@ -99,8 +101,8 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { client: &Client, #(#parameters,)* #(#accounts,)* - signers: impl IntoIterator + Send, - ) -> Result { + signers: impl IntoIterator + Send, + ) -> Result { client.send_instruction( PROGRAM_ID, #module_name::instruction::#instruction_struct_name { @@ -119,8 +121,8 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { pub fn #instruction_name( #(#parameters,)* #(#accounts,)* - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction{ + ) -> Instruction { + Instruction{ program_id: PROGRAM_ID, data: #module_name::instruction::#instruction_struct_name { #(#field_parameters,)* @@ -139,16 +141,17 @@ pub fn generate_source_code(idl: &Idl, use_modules: &[syn::ItemUse]) -> String { ) .into_iter(); - let program_module: syn::ItemMod = parse_quote! { - pub mod #instruction_module_name { - #(#use_modules)* - pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = solana_sdk::pubkey::Pubkey::new_from_array(#pubkey_bytes); - #(#instructions)* - } - }; - program_module.into_token_stream().to_string() - }) - .collect::(); - output.push_str(&code); - output + let program_module: syn::ItemMod = parse_quote! { + pub mod #instruction_module_name { + #(#use_modules)* + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array(#pubkey_bytes); + #(#instructions)* + } + }; + program_module.into_token_stream().to_string() + }) + .collect::(); + output.push_str(&code); + output + } } diff --git a/crates/client/src/reader.rs b/crates/client/src/reader.rs index 42f85124..4559ecb3 100644 --- a/crates/client/src/reader.rs +++ b/crates/client/src/reader.rs @@ -34,7 +34,7 @@ impl Reader { } /// Creates a new `Reader` instance with the provided `root`. - pub fn with_root(root: impl Into>) -> Self { + pub fn _with_root(root: impl Into>) -> Self { Self { root: root.into() } } @@ -46,7 +46,7 @@ impl Reader { /// - the requested file does not exist or it is not readable. /// - [Pubkey] cannot be parsed from the file content. #[throws] - pub async fn pubkey(&self, name: &str) -> Pubkey { + pub async fn _pubkey(&self, name: &str) -> Pubkey { let path = format!("{}keys/{}_pub.json", self.root, name); let key: String = serde_json::from_str(&fs::read_to_string(path).await?)?; Pubkey::from_str(&key)? @@ -60,7 +60,7 @@ impl Reader { /// - the requested file does not exist or it is not readable. /// - [Keypair] cannot be parsed from the file content. #[throws] - pub async fn keypair(&self, name: &str) -> Keypair { + pub async fn _keypair(&self, name: &str) -> Keypair { let path = format!("{}keys/{}.json", self.root, name); let bytes: Vec = serde_json::from_str(&fs::read_to_string(path).await?)?; Keypair::from_bytes(&bytes)? diff --git a/crates/client/src/tester.rs b/crates/client/src/tester.rs index 25b654fe..721279e1 100644 --- a/crates/client/src/tester.rs +++ b/crates/client/src/tester.rs @@ -1,4 +1,6 @@ -use crate::{commander::Error, Commander, LocalnetHandle}; +use crate::commander::Commander; +use crate::commander::Error; +use crate::commander::LocalnetHandle; use fehler::throws; use log::debug; use std::borrow::Cow; diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index b0c80327..af4df4b3 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -1,4 +1,5 @@ -use crate::commander::{Commander, Error as CommanderError}; +// use crate::commander::{Commander, Error as CommanderError}; + use cargo_metadata::Package; use fehler::{throw, throws}; // use pathdiff; @@ -14,8 +15,10 @@ use thiserror::Error; use tokio::fs; use toml::{value::Table, Value}; +use crate::commander::Error as CommanderError; use crate::constants::*; -use crate::generate_source_code; +use crate::program_client_generator::ProgramCLientGenerator; +use crate::Commander; use crate::Idl; #[derive(Error, Debug)] @@ -163,7 +166,8 @@ impl WorkspaceBuilder { self.add_program_dependencies(&crate_path, "dependencies") .await?; - let program_client = generate_source_code(&self.idl, &self.use_tokens); + let program_client = + ProgramCLientGenerator::generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.create_file(&lib_path, &program_client).await?; @@ -413,7 +417,8 @@ impl WorkspaceBuilder { self.add_program_dependencies(&crate_path, "dependencies") .await?; - let program_client = generate_source_code(&self.idl, &self.use_tokens); + let program_client = + ProgramCLientGenerator::generate_source_code(&self.idl, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; self.update_file(&lib_path, &program_client).await?; diff --git a/crates/client/tests/test.rs b/crates/client/tests/test.rs index f10643e6..7e4cbe6b 100644 --- a/crates/client/tests/test.rs +++ b/crates/client/tests/test.rs @@ -21,17 +21,23 @@ pub async fn generate_program_client() { )); let program_name = String::from("escrow"); - let program_idl = - trdelnik_client::Idl::parse_to_idl_program(&program_name, expanded_anchor_program)?; + let program_idl = trdelnik_client::__private::Idl::parse_to_idl_program( + &program_name, + expanded_anchor_program, + )?; - let idl = trdelnik_client::Idl { + let idl = trdelnik_client::__private::Idl { programs: vec![program_idl], }; let use_modules: Vec = - vec![syn::parse_quote! { use trdelnik_client::program_client::*; }]; - let client_code = trdelnik_client::generate_source_code(&idl, &use_modules); - let client_code = trdelnik_client::Commander::format_program_code(&client_code).await?; + vec![syn::parse_quote! { use trdelnik_client::prelude::*; }]; + let client_code = trdelnik_client::__private::ProgramCLientGenerator::generate_source_code( + &idl, + &use_modules, + ); + let client_code = + trdelnik_client::__private::Commander::format_program_code(&client_code).await?; assert_str_eq!(client_code, expected_client_code); } diff --git a/crates/client/tests/test_data/expected_client_code.rs b/crates/client/tests/test_data/expected_client_code.rs index 5b476fd9..d0d7b550 100644 --- a/crates/client/tests/test_data/expected_client_code.rs +++ b/crates/client/tests/test_data/expected_client_code.rs @@ -1,28 +1,24 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { - use trdelnik_client::program_client::*; - pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = - solana_sdk::pubkey::Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, - 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, + 68u8, 170u8, 153u8, 74u8, 59u8, + ]); #[allow(clippy::too_many_arguments)] pub async fn initialize_escrow( client: &Client, i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_initializer: &Pubkey, + a_initializer_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_escrow_account: &Pubkey, + a_system_program: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -46,14 +42,14 @@ pub mod escrow_instruction { pub fn initialize_escrow_ix( i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_initializer: &Pubkey, + a_initializer_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_escrow_account: &Pubkey, + a_system_program: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::InitializeEscrow { initializer_amount: i_initializer_amount, @@ -74,16 +70,13 @@ pub mod escrow_instruction { #[allow(clippy::too_many_arguments)] pub async fn cancel_escrow( client: &Client, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_initializer: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_pda_account: &Pubkey, + a_escrow_account: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -101,13 +94,13 @@ pub mod escrow_instruction { } #[allow(clippy::too_many_arguments)] pub fn cancel_escrow_ix( - a_initializer: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_initializer: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_pda_account: &Pubkey, + a_escrow_account: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::CancelEscrow {}.data(), accounts: escrow::accounts::CancelEscrow { @@ -123,20 +116,17 @@ pub mod escrow_instruction { #[allow(clippy::too_many_arguments)] pub async fn exchange( client: &Client, - a_taker: &solana_sdk::pubkey::Pubkey, - a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_main_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_taker: &Pubkey, + a_taker_deposit_token_account: &Pubkey, + a_taker_receive_token_account: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_initializer_main_account: &Pubkey, + a_escrow_account: &Pubkey, + a_pda_account: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -158,17 +148,17 @@ pub mod escrow_instruction { } #[allow(clippy::too_many_arguments)] pub fn exchange_ix( - a_taker: &solana_sdk::pubkey::Pubkey, - a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_main_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_taker: &Pubkey, + a_taker_deposit_token_account: &Pubkey, + a_taker_receive_token_account: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_initializer_main_account: &Pubkey, + a_escrow_account: &Pubkey, + a_pda_account: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::Exchange {}.data(), accounts: escrow::accounts::Exchange { diff --git a/crates/test/src/lib.rs b/crates/test/src/lib.rs index e1fa0be5..cba1f8c2 100644 --- a/crates/test/src/lib.rs +++ b/crates/test/src/lib.rs @@ -69,7 +69,7 @@ pub fn trdelnik_test(args: TokenStream, input: TokenStream) -> TokenStream { #[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] #[trdelnik_client::poctesting::serial_test::serial] async fn #input_fn_name(#input_fn_inputs) -> Result<()> { - let mut tester = trdelnik_client::Tester::with_root(#root); + let mut tester = trdelnik_client::poctesting::Tester::with_root(#root); let localnet_handle = tester.before().await?; let test = async { #input_fn_body @@ -80,7 +80,7 @@ pub fn trdelnik_test(args: TokenStream, input: TokenStream) -> TokenStream { assert!(result.is_ok()); let final_result = result.unwrap(); if let Err(error) = final_result { - trdelnik_client::error_reporter::report_error(&error); + trdelnik_client::poctesting::error_reporter::report_error(&error); return Err(error); } Ok(()) diff --git a/crates/test/tests/expand/basic.expanded.rs b/crates/test/tests/expand/basic.expanded.rs index 33bcbcc7..d01f3299 100644 --- a/crates/test/tests/expand/basic.expanded.rs +++ b/crates/test/tests/expand/basic.expanded.rs @@ -2,7 +2,7 @@ #[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] #[trdelnik_client::poctesting::serial_test::serial] async fn test_turnstile() -> Result<()> { - let mut tester = trdelnik_client::Tester::with_root("../../"); + let mut tester = trdelnik_client::poctesting::Tester::with_root("../../"); let localnet_handle = tester.before().await?; let test = async { { @@ -23,7 +23,7 @@ async fn test_turnstile() -> Result<()> { } let final_result = result.unwrap(); if let Err(error) = final_result { - trdelnik_client::error_reporter::report_error(&error); + trdelnik_client::poctesting::error_reporter::report_error(&error); return Err(error); } Ok(()) diff --git a/crates/test/tests/expand/with_root.expanded.rs b/crates/test/tests/expand/with_root.expanded.rs index b0b4cc4e..516e406d 100644 --- a/crates/test/tests/expand/with_root.expanded.rs +++ b/crates/test/tests/expand/with_root.expanded.rs @@ -2,7 +2,7 @@ #[trdelnik_client::poctesting::tokio::test(flavor = "multi_thread")] #[trdelnik_client::poctesting::serial_test::serial] async fn test_with_defined_root() -> Result<()> { - let mut tester = trdelnik_client::Tester::with_root("i_am_root"); + let mut tester = trdelnik_client::poctesting::Tester::with_root("i_am_root"); let localnet_handle = tester.before().await?; let test = async { {} @@ -15,7 +15,7 @@ async fn test_with_defined_root() -> Result<()> { } let final_result = result.unwrap(); if let Err(error) = final_result { - trdelnik_client::error_reporter::report_error(&error); + trdelnik_client::poctesting::error_reporter::report_error(&error); return Err(error); } Ok(()) diff --git a/crates/test/tests/expand/with_root.rs b/crates/test/tests/expand/with_root.rs index d89628d8..3077836b 100644 --- a/crates/test/tests/expand/with_root.rs +++ b/crates/test/tests/expand/with_root.rs @@ -1,3 +1,2 @@ #[trdelnik_test::trdelnik_test(root = "i_am_root")] -async fn test_with_defined_root() { -} +async fn test_with_defined_root() {} diff --git a/examples/escrow/.program_client/src/lib.rs b/examples/escrow/.program_client/src/lib.rs index 5b476fd9..d0d7b550 100644 --- a/examples/escrow/.program_client/src/lib.rs +++ b/examples/escrow/.program_client/src/lib.rs @@ -1,28 +1,24 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod escrow_instruction { - use trdelnik_client::program_client::*; - pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = - solana_sdk::pubkey::Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, - 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, + 68u8, 170u8, 153u8, 74u8, 59u8, + ]); #[allow(clippy::too_many_arguments)] pub async fn initialize_escrow( client: &Client, i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_initializer: &Pubkey, + a_initializer_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_escrow_account: &Pubkey, + a_system_program: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -46,14 +42,14 @@ pub mod escrow_instruction { pub fn initialize_escrow_ix( i_initializer_amount: u64, i_taker_amount: u64, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_initializer_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_initializer: &Pubkey, + a_initializer_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_escrow_account: &Pubkey, + a_system_program: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::InitializeEscrow { initializer_amount: i_initializer_amount, @@ -74,16 +70,13 @@ pub mod escrow_instruction { #[allow(clippy::too_many_arguments)] pub async fn cancel_escrow( client: &Client, - a_initializer: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_initializer: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_pda_account: &Pubkey, + a_escrow_account: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -101,13 +94,13 @@ pub mod escrow_instruction { } #[allow(clippy::too_many_arguments)] pub fn cancel_escrow_ix( - a_initializer: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_initializer: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_pda_account: &Pubkey, + a_escrow_account: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::CancelEscrow {}.data(), accounts: escrow::accounts::CancelEscrow { @@ -123,20 +116,17 @@ pub mod escrow_instruction { #[allow(clippy::too_many_arguments)] pub async fn exchange( client: &Client, - a_taker: &solana_sdk::pubkey::Pubkey, - a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_main_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_taker: &Pubkey, + a_taker_deposit_token_account: &Pubkey, + a_taker_receive_token_account: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_initializer_main_account: &Pubkey, + a_escrow_account: &Pubkey, + a_pda_account: &Pubkey, + a_token_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -158,17 +148,17 @@ pub mod escrow_instruction { } #[allow(clippy::too_many_arguments)] pub fn exchange_ix( - a_taker: &solana_sdk::pubkey::Pubkey, - a_taker_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_taker_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_pda_deposit_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_receive_token_account: &solana_sdk::pubkey::Pubkey, - a_initializer_main_account: &solana_sdk::pubkey::Pubkey, - a_escrow_account: &solana_sdk::pubkey::Pubkey, - a_pda_account: &solana_sdk::pubkey::Pubkey, - a_token_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_taker: &Pubkey, + a_taker_deposit_token_account: &Pubkey, + a_taker_receive_token_account: &Pubkey, + a_pda_deposit_token_account: &Pubkey, + a_initializer_receive_token_account: &Pubkey, + a_initializer_main_account: &Pubkey, + a_escrow_account: &Pubkey, + a_pda_account: &Pubkey, + a_token_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: escrow::instruction::Exchange {}.data(), accounts: escrow::accounts::Exchange { diff --git a/examples/fuzzer/.program_client/src/lib.rs b/examples/fuzzer/.program_client/src/lib.rs index b79ef380..4938b80c 100644 --- a/examples/fuzzer/.program_client/src/lib.rs +++ b/examples/fuzzer/.program_client/src/lib.rs @@ -1,23 +1,19 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod fuzzer_instruction { - use trdelnik_client::program_client::*; - pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = - solana_sdk::pubkey::Pubkey::new_from_array([ - 170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, - 42u8, 8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, - 250u8, 145u8, 26u8, 46u8, 170u8, 146u8, - ]); + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, 42u8, + 8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, 250u8, 145u8, + 26u8, 46u8, 170u8, 146u8, + ]); #[allow(clippy::too_many_arguments)] pub async fn initialize( client: &Client, - a_counter: &solana_sdk::pubkey::Pubkey, - a_user: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_counter: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -33,11 +29,11 @@ pub mod fuzzer_instruction { } #[allow(clippy::too_many_arguments)] pub fn initialize_ix( - a_counter: &solana_sdk::pubkey::Pubkey, - a_user: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_counter: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: fuzzer::instruction::Initialize {}.data(), accounts: fuzzer::accounts::Initialize { @@ -53,13 +49,10 @@ pub mod fuzzer_instruction { client: &Client, i_input1: u8, i_input2: u8, - a_counter: &solana_sdk::pubkey::Pubkey, - a_authority: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_counter: &Pubkey, + a_authority: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -79,10 +72,10 @@ pub mod fuzzer_instruction { pub fn update_ix( i_input1: u8, i_input2: u8, - a_counter: &solana_sdk::pubkey::Pubkey, - a_authority: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_counter: &Pubkey, + a_authority: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: fuzzer::instruction::Update { input1: i_input1, diff --git a/examples/turnstile/.program_client/src/lib.rs b/examples/turnstile/.program_client/src/lib.rs index 1f6059f6..6e1d5013 100644 --- a/examples/turnstile/.program_client/src/lib.rs +++ b/examples/turnstile/.program_client/src/lib.rs @@ -1,23 +1,19 @@ // DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module pub mod turnstile_instruction { - use trdelnik_client::program_client::*; - pub static PROGRAM_ID: solana_sdk::pubkey::Pubkey = - solana_sdk::pubkey::Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, - 137u8, 68u8, 170u8, 153u8, 74u8, 59u8, - ]); + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, + 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, + 68u8, 170u8, 153u8, 74u8, 59u8, + ]); #[allow(clippy::too_many_arguments)] pub async fn initialize( client: &Client, - a_state: &solana_sdk::pubkey::Pubkey, - a_user: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_state: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -33,11 +29,11 @@ pub mod turnstile_instruction { } #[allow(clippy::too_many_arguments)] pub fn initialize_ix( - a_state: &solana_sdk::pubkey::Pubkey, - a_user: &solana_sdk::pubkey::Pubkey, - a_system_program: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + a_state: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Initialize {}.data(), accounts: turnstile::accounts::Initialize { @@ -52,12 +48,9 @@ pub mod turnstile_instruction { pub async fn coin( client: &Client, i_dummy_arg: String, - a_state: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_state: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -70,11 +63,8 @@ pub mod turnstile_instruction { .await } #[allow(clippy::too_many_arguments)] - pub fn coin_ix( - i_dummy_arg: String, - a_state: &solana_sdk::pubkey::Pubkey, - ) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + pub fn coin_ix(i_dummy_arg: String, a_state: &Pubkey) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Coin { dummy_arg: i_dummy_arg, @@ -86,12 +76,9 @@ pub mod turnstile_instruction { #[allow(clippy::too_many_arguments)] pub async fn push( client: &Client, - a_state: &solana_sdk::pubkey::Pubkey, - signers: impl IntoIterator + Send, - ) -> Result< - solana_transaction_status::EncodedConfirmedTransactionWithStatusMeta, - anchor_client::ClientError, - > { + a_state: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { client .send_instruction( PROGRAM_ID, @@ -102,8 +89,8 @@ pub mod turnstile_instruction { .await } #[allow(clippy::too_many_arguments)] - pub fn push_ix(a_state: &solana_sdk::pubkey::Pubkey) -> solana_sdk::instruction::Instruction { - solana_sdk::instruction::Instruction { + pub fn push_ix(a_state: &Pubkey) -> Instruction { + Instruction { program_id: PROGRAM_ID, data: turnstile::instruction::Push {}.data(), accounts: turnstile::accounts::UpdateState { state: *a_state }.to_account_metas(None), From 0d30ba361a74d564920b595ac74502105fa9b3cb Mon Sep 17 00:00:00 2001 From: andrej Date: Mon, 25 Dec 2023 23:11:10 +0100 Subject: [PATCH 37/57] =?UTF-8?q?=E2=9C=A8=20We=20were=20not=20parsing=20c?= =?UTF-8?q?orrectly=20instruction=20inputs=20as=20types=20imported=20from?= =?UTF-8?q?=20different=20modules=20would=20need=20to=20be=20imported=20ma?= =?UTF-8?q?nually?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 +- crates/client/src/idl.rs | 58 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 566ba3ec..b06be8ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ ed25519-dalek = "1.0.1" serial_test = "2.0.0" anyhow = { version = "1.0.45", features = ["std"], default-features = false } cargo_metadata = "0.17.0" -syn = { version = "1.0.109", features = ["full"] } +syn = { version = "1.0.109", features = ["full","visit"] } quote = "1.0.14" heck = { version = "0.4.0", default-features = false } toml = { version = "0.5.8", features = ["preserve_order"] } diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs index e7ea0d10..5e02c7e8 100644 --- a/crates/client/src/idl.rs +++ b/crates/client/src/idl.rs @@ -96,10 +96,60 @@ use heck::{ToSnakeCase, ToUpperCamelCase}; use quote::ToTokens; +use syn::visit::Visit; use thiserror::Error; static ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; +struct FullPathFinder { + target_item_name: String, + current_module: String, + found_path: Option, +} + +fn find_item_path(code: &str, target_item_name: &str) -> Option { + let syn_file = syn::parse_file(code).ok()?; + let mut finder = FullPathFinder { + target_item_name: target_item_name.to_string(), + current_module: "".to_string(), + found_path: None, + }; + finder.visit_file(&syn_file); + finder.found_path +} + +impl<'ast> syn::visit::Visit<'ast> for FullPathFinder { + fn visit_item(&mut self, item: &'ast syn::Item) { + if let Some(_found_path) = &self.found_path { + return; + } + + // TODO this will only look for enum orf struct + match item { + syn::Item::Enum(syn::ItemEnum { ident, .. }) + | syn::Item::Struct(syn::ItemStruct { ident, .. }) => { + if *ident == self.target_item_name { + // Found the target item, construct the full path. + self.found_path = Some(format!("{}::{}", self.current_module, ident)); + } + } + + _ => {} + } + + syn::visit::visit_item(self, item); + } + + fn visit_item_mod(&mut self, module: &'ast syn::ItemMod) { + let old_module = self.current_module.clone(); + self.current_module = format!("{}::{}", self.current_module, module.ident); + + syn::visit::visit_item_mod(self, module); + + self.current_module = old_module; + } +} + #[derive(Error, Debug)] pub enum IdlError { #[error("{0:?}")] @@ -390,7 +440,13 @@ impl Idl { .map(|field| { let parameter_name = field.ident.unwrap().to_string(); let parameter_id_type = field.ty.into_token_stream().to_string(); - (parameter_name, parameter_id_type) + + if let Some(path) = find_item_path(code, ¶meter_id_type) { + let tmp_final_path = format!("{name}{path}"); + (parameter_name, tmp_final_path) + } else { + (parameter_name, parameter_id_type) + } }) .collect(); } From 2d3c3d303eda2b6a2dae84bc68e0c94312ea6908 Mon Sep 17 00:00:00 2001 From: andrej Date: Tue, 26 Dec 2023 21:03:48 +0100 Subject: [PATCH 38/57] =?UTF-8?q?=F0=9F=93=88=20Progress=20bar=20to=20prog?= =?UTF-8?q?ram=20client=20build=20and=20order=20of=20init/build=20function?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 176 +++++++++++++------------ crates/client/src/workspace_builder.rs | 111 ++++++++-------- 2 files changed, 150 insertions(+), 137 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 4ec324eb..5091e376 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -128,7 +128,7 @@ impl Commander { }) } #[throws] - pub async fn collect_packages() -> Vec { + pub async fn collect_program_packages() -> Vec { let packages: Vec = Commander::program_packages().collect(); if packages.is_empty() { throw!(Error::NoProgramsFound) @@ -137,59 +137,70 @@ impl Commander { } } + fn build_package(package_name: &str) -> std::process::Output { + std::process::Command::new("cargo") + .arg("+nightly") + .arg("rustc") + .args(["--package", package_name]) + .arg("--profile=check") + .arg("--") + .arg("-Zunpretty=expanded") + .output() + .unwrap() + } + + fn build_progress_bar( + package_name: &str, + mutex: &std::sync::Arc, + ) { + let progress_bar = indicatif::ProgressBar::new_spinner(); + progress_bar.set_style( + indicatif::ProgressStyle::default_spinner() + .template("{spinner} {wide_msg}") + .unwrap(), + ); + + let msg = format!("Building: {package_name}..."); + progress_bar.set_message(msg); + while mutex.load(std::sync::atomic::Ordering::SeqCst) { + progress_bar.inc(1); + std::thread::sleep(std::time::Duration::from_millis(100)); + } + + progress_bar.finish_and_clear(); + } + #[throws] - pub async fn obtain_program_idl(packages: &[cargo_metadata::Package]) -> Idl { - let connections = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + pub async fn build_program_packages(packages: &[cargo_metadata::Package]) -> Idl { + let shared_mutex = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); for package in packages.iter() { - let is_running = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); - let is_running_for_thread = std::sync::Arc::clone(&is_running); + let mutex = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); + let c_mutex = std::sync::Arc::clone(&mutex); let name = package.name.clone(); - let conn = connections.clone(); + let c_shared_mutex = std::sync::Arc::clone(&shared_mutex); let cargo_thread = std::thread::spawn(move || -> Result<(), Error> { - let output = std::process::Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", &name]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - .unwrap(); + let output = Self::build_package(&name); if output.status.success() { let code = String::from_utf8(output.stdout).unwrap(); let idl_program = Idl::parse_to_idl_program(&name, &code).unwrap(); - let mut vec = conn.lock().unwrap(); + let mut vec = c_shared_mutex.lock().unwrap(); vec.push(idl_program); - is_running_for_thread.store(false, std::sync::atomic::Ordering::SeqCst); + + c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); Ok(()) } else { let error_text = String::from_utf8(output.stderr).unwrap(); - is_running_for_thread.store(false, std::sync::atomic::Ordering::SeqCst); + c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); Err(Error::ReadProgramCodeFailed(error_text)) } }); - let progress_bar = indicatif::ProgressBar::new_spinner(); - progress_bar.set_style( - indicatif::ProgressStyle::default_spinner() - .template("{spinner} {wide_msg}") - .unwrap(), - ); - - let name = &package.name; - let msg = format!("Expanding macros for {name}..."); - progress_bar.set_message(msg); - while is_running.load(std::sync::atomic::Ordering::SeqCst) { - progress_bar.inc(1); - std::thread::sleep(std::time::Duration::from_millis(100)); - } - - progress_bar.finish_and_clear(); + Self::build_progress_bar(&package.name, &mutex); cargo_thread.join().unwrap()?; } - let idl_programs = connections.lock().unwrap().to_vec(); + let idl_programs = shared_mutex.lock().unwrap().to_vec(); if idl_programs.is_empty() { throw!(Error::NoProgramsFound); @@ -226,52 +237,52 @@ impl Commander { /// crate. It solves the problem with regenerating the program client and removing imports defined by /// the user. #[throws] - pub async fn parse_program_client_imports() -> Vec { - // TODO - // We have two options here, write that this file is fully generated so - // aditional changes will be rewritten by trdelnik build, or we can - // actually parse the use statements - // let output = std::process::Command::new("cargo") - // .arg("+nightly") - // .arg("rustc") - // .args(["--package", "program_client"]) - // .arg("--profile=check") - // .arg("--") - // .arg("-Zunpretty=expanded") - // .output() - // .unwrap(); - - // if output.status.success() { - // let code = String::from_utf8(output.stdout)?; - // let mut use_modules: Vec = vec![]; - // for item in syn::parse_file(code.as_str()).unwrap().items.into_iter() { - // if let syn::Item::Mod(module) = item { - // let modules = module - // .content - // .ok_or("account mod: empty content") - // .unwrap() - // .1 - // .into_iter(); - // for module in modules { - // if let syn::Item::Use(u) = module { - // use_modules.push(u); - // } - // } - // } - // } - // if use_modules.is_empty() { - // use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) - // } - // use_modules - // } else { - // let mut use_modules: Vec = vec![]; - // if use_modules.is_empty() { - // use_modules.push(syn::parse_quote! { use trdelnik_client::program_client::*; }) - // } - // use_modules - // } + pub async fn build_program_client() -> Vec { + let shared_mutex = std::sync::Arc::new(std::sync::Mutex::new(String::new())); + let mutex = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); + let c_mutex = std::sync::Arc::clone(&mutex); + + let c_shared_mutex = std::sync::Arc::clone(&shared_mutex); + + let cargo_thread = std::thread::spawn(move || -> Result<(), Error> { + let output = Self::build_package("program_client"); + + if output.status.success() { + let mut code = c_shared_mutex.lock().unwrap(); + code.push_str(&String::from_utf8(output.stdout)?); + + c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); + Ok(()) + } else { + // command failed leave unmodified + c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); + Ok(()) + } + }); + + Self::build_progress_bar("program_client", &mutex); + + cargo_thread.join().unwrap()?; + + let code = shared_mutex.lock().unwrap(); + let code = code.as_str(); let mut use_modules: Vec = vec![]; + for item in syn::parse_file(code).unwrap().items.into_iter() { + if let syn::Item::Mod(module) = item { + let modules = module + .content + .ok_or("account mod: empty content") + .unwrap() + .1 + .into_iter(); + for module in modules { + if let syn::Item::Use(u) = module { + use_modules.push(u); + } + } + } + } if use_modules.is_empty() { use_modules.push(syn::parse_quote! { use trdelnik_client::prelude::*; }) } @@ -284,10 +295,9 @@ impl Commander { /// to allow you read `println` outputs in your terminal window. #[throws] pub async fn run_tests() { - // INFO we have to specify --package poc_tests in order to build - // only poc_tests and not fuzz tests also - // FIXME "ok" within the output in terminal is not green - // as it should be + // no capture is blocking color format of the command, + // I do not see difference in functionality without it + // however without nocapture , debugging with println! is not possible let success = tokio::process::Command::new("cargo") .arg("test") .args(["--package", "poc_tests"]) diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index af4df4b3..44bcf2cc 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -49,32 +49,37 @@ impl Default for WorkspaceBuilder { } } impl WorkspaceBuilder { + /// ## Initializes WorkspaceBuilder with specified root + /// - 'use_tokens' is set to default use statement + /// - trdelnik_client::prelude::*; pub fn new_with_root(root: String) -> Self { Self { root: Path::new(&root).to_path_buf(), idl: Idl::default(), - use_tokens: vec![], + use_tokens: vec![syn::parse_quote! { use trdelnik_client::prelude::*; }], packages: vec![], } } + /// ## Build program packages, accordingly updates program client + /// - builds program packages + /// - builds program client and obtains custom use statements + /// - accordingly updates program client #[throws] - pub async fn build(&mut self, arch: &str) { - self.extract_data(arch).await?; - - // FIXME have to think about this because if we have structure - // with multiple cargo manifests we probably cannot update - // here every cargo. - // automatically generated so we should be ok with updating this + pub async fn build(&mut self, _arch: &str) { + self.packages = Commander::collect_program_packages().await?; + self.idl = Commander::build_program_packages(&self.packages).await?; + self.use_tokens = Commander::build_program_client().await?; self.update_program_client().await?; //self.update_program_stubs().await?; //self.add_invoked_program_deps().await?; } + /// ## Calls anchor clean and cleans corresponding hfuzz-target if exists #[throws] pub async fn clean(&self) { Commander::clean_anchor_target().await?; Commander::clean_hfuzz_target(&self.root).await?; } - /// Initializes template for FUZZ Tests + /// ## Initializes template for FUZZ Tests /// - builds current project /// - generates program client /// - generates fuzz template @@ -82,41 +87,36 @@ impl WorkspaceBuilder { /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_fuzz(&mut self, arch: &str) { - self.extract_data(arch).await?; - - self.create_program_client_crate().await?; + self.generate_program_client(arch).await?; self.create_trdelnik_tests_crate().await?; self.add_new_fuzz_test().await?; - self.create_trdelnik_manifest().await?; self.update_gitignore("hfuzz_target")?; } - /// Initializes template for PoC Tests + /// ## Initializes template for PoC Tests /// - builds current project /// - generates program client + /// - build program client /// - generates PoC template /// - generates Trdelnik manifest file #[throws] pub async fn initialize_poc(&mut self, arch: &str) { - self.extract_data(arch).await?; - - self.create_program_client_crate().await?; + self.generate_program_client(arch).await?; self.create_trdelnik_tests_crate().await?; self.add_new_poc_test().await?; self.create_trdelnik_manifest().await?; } - /// Initializes template for FUZZ and PoC Tests + /// ## Initializes template for FUZZ and PoC Tests /// - builds current project /// - generates program client + /// - build program client /// - generates Fuzz template /// - generates PoC template /// - generates Trdelnik manifest file /// - updates .gitignore with hfuzz_target folder #[throws] pub async fn initialize_both(&mut self, arch: &str) { - self.extract_data(arch).await?; - - self.create_program_client_crate().await?; + self.generate_program_client(arch).await?; self.create_trdelnik_tests_crate().await?; self.add_new_poc_test().await?; self.add_new_fuzz_test().await?; @@ -124,30 +124,31 @@ impl WorkspaceBuilder { self.create_trdelnik_manifest().await?; self.update_gitignore("hfuzz_target")?; } - /// - builds current project - /// - obtains program names and paths + /// ## Builds program packages, generates source code for program client and builds program client + /// - obtains program packages names and paths /// - obtains data for generating program client + /// - generates program client + /// - builds program client + /// + /// Building program client at the end will ensure that during 'trdelnik build' + /// command we will not need to wait long time #[throws] - async fn extract_data(&mut self, _arch: &str) { - // FIXME we do not need to build - // if we do not build , arch maybe unnecessary - // however maybe consider using anchor build ? - // it is required for PoC tests - // Commander::build_programs(arch).await?; - // this will already throws an error if no packages are found - self.packages = Commander::collect_packages().await?; - self.idl = Commander::obtain_program_idl(&self.packages).await?; - // FIXME do we actually need this ? - self.use_tokens = Commander::parse_program_client_imports().await?; + async fn generate_program_client(&mut self, _arch: &str) { + self.packages = Commander::collect_program_packages().await?; + self.idl = Commander::build_program_packages(&self.packages).await?; + // INFO even though this is ok , currently default cargo toml status is that + // it will have trdelnik_client version set to 0.5.0 that means it will not actually + // build, but once updated it should be ok + self.create_program_client_crate().await?; + self.use_tokens = Commander::build_program_client().await?; } - /// - adds new Fuzz test template to the trdelnik-tests folder + /// ## Adds new Fuzz test template to the trdelnik-tests folder #[throws] pub async fn add_fuzz_test(&mut self) { - self.packages = Commander::collect_packages().await?; + self.packages = Commander::collect_program_packages().await?; self.add_new_fuzz_test().await?; } - /// - creates program client folder - /// - generates program client soruce code + /// ## Creates program client folder and generates source code #[throws] async fn create_program_client_crate(&self) { let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); @@ -172,17 +173,17 @@ impl WorkspaceBuilder { self.create_file(&lib_path, &program_client).await?; } - /// - create trdelnik-test folder + /// ## Create trdelnik-test folder #[throws] async fn create_trdelnik_tests_crate(&self) { let workspace_path = self.root.join(TESTS_WORKSPACE_DIRECTORY); self.create_directory(&workspace_path).await?; } - /// - generates new folder and contents for new Fuzz test Template + /// ## Generates new folder and contents for new Fuzz test Template #[throws] async fn add_new_fuzz_test(&self) { // this check should be ensured within package collection , but - // we anyway have to unwrap option and doeble check wont hurt + // double check wont hurt let program_name = if !&self.packages.is_empty() { &self.packages.first().unwrap().name } else { @@ -286,11 +287,12 @@ impl WorkspaceBuilder { .await?; // add fuzzing feature + // this should be not necessary as we have fuzzing feature already within the template // self.add_feature_to_dep("trdelnik-client", "fuzzing", &new_fuzz_test_dir) // .await?; } - /// - generates new folder and contents for new PoC test Template + /// ## Generates new folder and contents for new PoC test Template #[throws] async fn add_new_poc_test(&self) { // INFO only one POC test file needed @@ -397,7 +399,7 @@ impl WorkspaceBuilder { // .await?; // } - /// - creates Trdelnik manifest from template + /// ## Creates Trdelnik manifest from template #[throws] async fn create_trdelnik_manifest(&self) { let trdelnik_toml_path = self.root.join(TRDELNIK); @@ -408,7 +410,7 @@ impl WorkspaceBuilder { self.create_file(&trdelnik_toml_path, trdelnik_toml_content) .await?; } - /// - updates program client generated source code + /// ## Updates program client generated source code #[throws] async fn update_program_client(&self) { let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); @@ -423,7 +425,7 @@ impl WorkspaceBuilder { self.update_file(&lib_path, &program_client).await?; } - /// - add workspace member to the project root Cargo.toml + /// ## Add workspace member to the project root Cargo.toml #[throws] async fn add_workspace_member(&self, member: &str) { let cargo = self.root.join(CARGO); @@ -455,7 +457,7 @@ impl WorkspaceBuilder { }; fs::write(cargo, content.to_string()).await?; } - /// Updates .gitignore file in the `root` directory and appends `ignored_path` to the end of the file + /// ## Updates .gitignore file in the `root` directory and appends `ignored_path` to the end of the file #[throws] fn update_gitignore(&self, ignored_path: &str) { let file_path = self.root.join(GIT_IGNORE); @@ -482,7 +484,7 @@ impl WorkspaceBuilder { } } - /// Creates a new directory and all missing parent directories on the specified path + /// ## Creates a new directory and all missing parent directories on the specified path #[throws] async fn create_directory_all<'a>(&self, path: &'a PathBuf) { match path.exists() { @@ -492,7 +494,7 @@ impl WorkspaceBuilder { } }; } - /// Creates directory with specified path + /// ## Creates directory with specified path #[throws] async fn create_directory<'a>(&self, path: &'a Path) { match path.exists() { @@ -502,8 +504,8 @@ impl WorkspaceBuilder { } }; } - /// Creates a new file with a given content on the specified path - /// Skip if file already exists + /// ## Creates a new file with a given content on the specified path + /// - Skip if file already exists #[throws] async fn create_file<'a>(&self, path: &'a Path, content: &str) { let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); @@ -519,10 +521,11 @@ impl WorkspaceBuilder { }; } - /// Updates a file with a given content on the specified path - /// Skip if file does not exists + /// ## Updates a file with a given content on the specified path + /// - Skip if file does not exists #[throws] async fn update_file<'a>(&self, path: &'a Path, content: &str) { + // TODO maybe create file if it does not exists let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); match path.exists() { true => { @@ -582,8 +585,8 @@ impl WorkspaceBuilder { // } // } - /// - adds program dependency to specified Cargo.toml - /// for example, we need to use program entry within the fuzzer + /// ## Adds program dependency to specified Cargo.toml + /// - for example, we need to use program entry within the fuzzer #[throws] async fn add_program_dependencies(&self, cargo_dir: &PathBuf, deps: &str) { let cargo_path = cargo_dir.join(CARGO); From ab74fad7c5bdee94c51c56ff241fcd009f5a160a Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 00:10:02 +0100 Subject: [PATCH 39/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Load?= =?UTF-8?q?=20template=20function=20+=20correct=20trdelnik=20build=20comma?= =?UTF-8?q?nd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/lib.rs | 2 + crates/client/src/workspace_builder.rs | 71 ++++++++++++++------------ 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index b1393376..0619f18d 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -108,4 +108,6 @@ mod constants { pub const RETRY_LOCALNET_EVERY_MILLIS: u64 = 500; pub const DEFAULT_KEYPAIR_PATH: &str = "~/.config/solana/id.json"; + + pub const MANIFEST_PATH: &str = env!("CARGO_MANIFEST_DIR"); } diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 44bcf2cc..9b3a2e16 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -3,13 +3,12 @@ use cargo_metadata::Package; use fehler::{throw, throws}; // use pathdiff; +use std::{fs::File, io::prelude::*}; use std::{ - env, fs::OpenOptions, io, path::{Path, PathBuf}, }; -use std::{fs::File, io::prelude::*}; use syn::ItemUse; use thiserror::Error; use tokio::fs; @@ -69,7 +68,9 @@ impl WorkspaceBuilder { self.packages = Commander::collect_program_packages().await?; self.idl = Commander::build_program_packages(&self.packages).await?; self.use_tokens = Commander::build_program_client().await?; - self.update_program_client().await?; + self.update_program_client_crate().await?; + + // self.update_program_client().await?; //self.update_program_stubs().await?; //self.add_invoked_program_deps().await?; } @@ -158,11 +159,9 @@ impl WorkspaceBuilder { self.create_directory_all(&src_path).await?; - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/program_client/Cargo.toml.tmpl" - )); - self.create_file(&cargo_path, cargo_toml_content).await?; + let cargo_toml_content = load_template("/src/templates/program_client/Cargo.toml.tmpl")?; + + self.create_file(&cargo_path, &cargo_toml_content).await?; self.add_program_dependencies(&crate_path, "dependencies") .await?; @@ -249,10 +248,8 @@ impl WorkspaceBuilder { .join(&new_fuzz_test) .join(CARGO); - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl" - )); + let cargo_toml_content = + load_template("/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl")?; let cargo_content = cargo_toml_content.replace("###FUZZ_ID###", &fuzz_id.to_string()); self.create_file(&cargo_path, &cargo_content).await?; @@ -264,10 +261,7 @@ impl WorkspaceBuilder { .join(&new_fuzz_test) .join(FUZZ_TEST); - let fuzz_test_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/fuzz_test.tmpl.rs" - )); + let fuzz_test_content = load_template("/src/templates/trdelnik-tests/fuzz_test.tmpl.rs")?; let use_entry = format!("use {}::entry;\n", program_name); let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); @@ -325,12 +319,10 @@ impl WorkspaceBuilder { .join(POC_TEST_DIRECTORY) .join(CARGO); - let cargo_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl" - )); + let cargo_toml_content = + load_template("/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl")?; - self.create_file(&cargo_path, cargo_toml_content).await?; + self.create_file(&cargo_path, &cargo_toml_content).await?; let poc_test_path = self .root @@ -339,10 +331,8 @@ impl WorkspaceBuilder { .join(TESTS) .join(POC_TEST); - let poc_test_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/trdelnik-tests/poc_test.tmpl.rs" - )); + let poc_test_content = load_template("/src/templates/trdelnik-tests/poc_test.tmpl.rs")?; + let test_content = poc_test_content.replace("###PROGRAM_NAME###", program_name); let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); let template = format!("{use_instructions}{test_content}"); @@ -403,18 +393,23 @@ impl WorkspaceBuilder { #[throws] async fn create_trdelnik_manifest(&self) { let trdelnik_toml_path = self.root.join(TRDELNIK); - let trdelnik_toml_content = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/src/templates/Trdelnik.toml.tmpl" - )); - self.create_file(&trdelnik_toml_path, trdelnik_toml_content) + let trdelnik_toml_content = load_template("/src/templates/Trdelnik.toml.tmpl")?; + self.create_file(&trdelnik_toml_path, &trdelnik_toml_content) .await?; } /// ## Updates program client generated source code #[throws] - async fn update_program_client(&self) { + async fn update_program_client_crate(&self) { let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); - let lib_path = self.root.join(PROGRAM_CLIENT_DIRECTORY).join(SRC).join(LIB); + let cargo_path = crate_path.join(CARGO); + let src_path = crate_path.join(SRC); + let lib_path = src_path.join(LIB); + + self.create_directory_all(&src_path).await?; + + let cargo_toml_content = load_template("/src/templates/program_client/Cargo.toml.tmpl")?; + + self.create_file(&cargo_path, &cargo_toml_content).await?; self.add_program_dependencies(&crate_path, "dependencies") .await?; @@ -525,7 +520,6 @@ impl WorkspaceBuilder { /// - Skip if file does not exists #[throws] async fn update_file<'a>(&self, path: &'a Path, content: &str) { - // TODO maybe create file if it does not exists let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); match path.exists() { true => { @@ -533,7 +527,8 @@ impl WorkspaceBuilder { println!("\x1b[92mSuccesfully\x1b[0m updated: \x1b[93m{file}\x1b[0m."); } false => { - println!("\x1b[93m--> Skipping <--\x1b[0m \x1b[93m{file}\x1b[0m, does not exists."); + fs::write(path, content).await?; + println!("\x1b[92mSuccesfully\x1b[0m created: \x1b[93m{file}\x1b[0m."); } }; } @@ -683,3 +678,11 @@ impl WorkspaceBuilder { // } // } } + +pub fn load_template(file_path: &str) -> Result { + let mut _path = String::from(MANIFEST_PATH); + _path.push_str(file_path); + let full_path = Path::new(&_path); + + std::fs::read_to_string(full_path) +} From e83718dd8e31935021d492786ed67ac9c894bc22 Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 14:04:16 +0100 Subject: [PATCH 40/57] =?UTF-8?q?=F0=9F=94=A5=20Removed=20arch=20option=20?= =?UTF-8?q?and=20some=20use=20statements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/build.rs | 7 +++---- crates/cli/src/command/init.rs | 13 +++++-------- crates/cli/src/lib.rs | 25 +++---------------------- crates/client/src/client.rs | 11 +---------- crates/client/src/commander.rs | 18 +++--------------- 5 files changed, 15 insertions(+), 59 deletions(-) diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index 52fd7ed5..944874f3 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -1,4 +1,4 @@ -use crate::{discover, ProgramArch}; +use crate::discover; use anyhow::{bail, Error}; use fehler::throws; use trdelnik_client::__private::WorkspaceBuilder; @@ -6,7 +6,7 @@ use trdelnik_client::__private::WorkspaceBuilder; pub const TRDELNIK_TOML: &str = "Trdelnik.toml"; #[throws] -pub async fn build(_root: String, arch: ProgramArch) { +pub async fn build(_root: String) { // FIXME root argument maybe not needed let root = if let Some(r) = discover(TRDELNIK_TOML)? { r @@ -14,6 +14,5 @@ pub async fn build(_root: String, arch: ProgramArch) { bail!("It does not seem that Trdelnik is initialized because the Trdelnik.toml file was not found in any parent directory!"); }; let mut builder = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - builder.build(arch).await?; + builder.build().await?; } diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index db4db06f..b75a7d4b 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -3,7 +3,7 @@ use clap::{Parser, ValueEnum}; use fehler::throws; use trdelnik_client::__private::WorkspaceBuilder; -use crate::{discover, ProgramArch}; +use crate::discover; pub const ANCHOR_TOML: &str = "Anchor.toml"; pub const CARGO_TOML: &str = "Cargo.toml"; @@ -17,7 +17,7 @@ pub enum InitCommand { } #[throws] -pub async fn init(template: InitCommand, arch: ProgramArch) { +pub async fn init(template: InitCommand) { if let Some(_trdelnik_toml) = discover(TRDELNIK_TOML)? { bail!("It seems that Trdelnik Workspace is already initialized because the Trdelnik.toml file was found in parent directory!"); } @@ -29,8 +29,7 @@ pub async fn init(template: InitCommand, arch: ProgramArch) { bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); }; let mut generator = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - generator.initialize_fuzz(arch).await?; + generator.initialize_fuzz().await?; } InitCommand::Poc => { let root = if let Some(r) = discover(CARGO_TOML)? { @@ -39,8 +38,7 @@ pub async fn init(template: InitCommand, arch: ProgramArch) { bail!("It does not seem that project is initialized because the Cargo.toml file was not found in any parent directory!"); }; let mut generator = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - generator.initialize_poc(arch).await?; + generator.initialize_poc().await?; } InitCommand::Both => { // INFO for both we need Anchor as it is stronger condition of fuzzer @@ -50,8 +48,7 @@ pub async fn init(template: InitCommand, arch: ProgramArch) { bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); }; let mut generator = WorkspaceBuilder::new_with_root(root); - let arch = arch.build_subcommand(); - generator.initialize_both(arch).await?; + generator.initialize_both().await?; } }; } diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 826226fc..4f7b60e7 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,5 +1,5 @@ use anyhow::{Context, Error, Result}; -use clap::{Parser, Subcommand, ValueEnum}; +use clap::{Parser, Subcommand}; use fehler::throws; // subcommand functions to call and nested subcommands @@ -10,21 +10,6 @@ use command::FuzzCommand; use command::InitCommand; use command::KeyPairCommand; -#[derive(ValueEnum, Parser, Clone, PartialEq, Eq, Debug)] -pub enum ProgramArch { - Bpf, - Sbf, -} - -impl ProgramArch { - pub fn build_subcommand(&self) -> &str { - match self { - Self::Bpf => "build-bpf", - Self::Sbf => "build-sbf", - } - } -} - #[derive(Parser)] #[clap(version, propagate_version = true)] struct Cli { @@ -39,8 +24,6 @@ enum Command { /// Anchor project root #[clap(short, long, default_value = "./")] root: String, - #[clap(value_enum, short, long, default_value = "sbf")] - arch: ProgramArch, }, /// Get information about a keypair KeyPair { @@ -72,8 +55,6 @@ enum Command { Init { #[clap(value_enum, short, long, default_value = "both")] template: InitCommand, - #[clap(value_enum, short, long, default_value = "sbf")] - arch: ProgramArch, }, /// Removes target contents except for KeyPair and removes hfuzz_target folder Clean, @@ -84,13 +65,13 @@ pub async fn start() { let cli = Cli::parse(); match cli.command { - Command::Build { root, arch } => command::build(root, arch).await?, + Command::Build { root } => command::build(root).await?, Command::KeyPair { subcmd } => command::keypair(subcmd)?, Command::Test { root } => command::test(root).await?, Command::Fuzz { root, subcmd } => command::fuzz(root, subcmd).await?, Command::Localnet => command::localnet().await?, Command::Explorer { subcmd } => command::explorer(subcmd).await?, - Command::Init { template, arch } => command::init(template, arch).await?, + Command::Init { template } => command::init(template).await?, Command::Clean => command::clean().await?, } } diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 77b93c7e..d4b38334 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -5,19 +5,10 @@ use crate::Config; use crate::Reader; use anchor_client::ClientError as Error; -// TODO maybe can deleted -// use borsh; use fehler::{throw, throws}; +use futures::{self, StreamExt}; use solana_sdk::program_pack::Pack; use solana_sdk::signer::Signer; -// TODO maybe can deleted -use futures::{self, StreamExt}; -// TODO maybe can deleted -// use serde; -// TODO maybe can deleted -// use solana_account_decoder; -// TODO maybe can deleted -// use solana_cli_output; // @TODO: Make compatible with the latest Anchor deps. // https://github.com/project-serum/anchor/pull/1307#issuecomment-1022592683 diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 5091e376..8f7de1d4 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -1,18 +1,12 @@ use std::io::Write; use std::os::unix::process::CommandExt; +use crate::constants::*; use crate::Client; use crate::Config; use crate::{Idl, IdlError}; use fehler::{throw, throws}; -// use log; use thiserror::Error; -// TODO maybe unused -// use tokio; - -// ----- -use crate::constants::*; -// use indicatif; #[derive(Error, Debug)] pub enum Error { #[error("{0:?}")] @@ -97,9 +91,9 @@ pub struct Commander {} impl Commander { // TODO maybe remove unnecesarry async #[throws] - pub async fn build_programs(arch: &str) { + pub async fn build_programs() { let exit = std::process::Command::new("cargo") - .arg(arch) + .arg("build-sbf") .stdout(std::process::Stdio::inherit()) .stderr(std::process::Stdio::inherit()) .output() @@ -364,12 +358,6 @@ impl Commander { } } - // TODO We already checked if the trdelnik init is initialized, furthermore - // we can leave this on honggfuzz - // let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); - // if !cur_dir.try_exists()? { - // throw!(Error::NotInitialized); - // } let mut child = tokio::process::Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) .arg("hfuzz") From ddc0e3f5f1239c9ca316802b7ae65e5f720e87da Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 14:06:55 +0100 Subject: [PATCH 41/57] =?UTF-8?q?=F0=9F=9A=80=20Added=20macro=20for=20path?= =?UTF-8?q?=20construction,=20added=20suppoer=20for=20no=20entrypoin=20fea?= =?UTF-8?q?ture=20within=20cargo=20construction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/workspace_builder.rs | 222 ++++++++++++++----------- 1 file changed, 127 insertions(+), 95 deletions(-) diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 9b3a2e16..3984a6e7 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -36,6 +36,16 @@ pub enum Error { ParsingCargoTomlDependenciesFailed, } +macro_rules! construct_path { + ($root:expr, $($component:expr),*) => { + { + let mut path = $root.to_owned(); + $(path = path.join($component);)* + path + } + }; +} + pub struct WorkspaceBuilder { root: PathBuf, idl: Idl, @@ -64,10 +74,8 @@ impl WorkspaceBuilder { /// - builds program client and obtains custom use statements /// - accordingly updates program client #[throws] - pub async fn build(&mut self, _arch: &str) { - self.packages = Commander::collect_program_packages().await?; - self.idl = Commander::build_program_packages(&self.packages).await?; - self.use_tokens = Commander::build_program_client().await?; + pub async fn build(&mut self) { + self.build_packages().await?; self.update_program_client_crate().await?; // self.update_program_client().await?; @@ -87,8 +95,9 @@ impl WorkspaceBuilder { /// - generates Trdelnik manifest file /// - updates .gitignore with hfuzz_target folder #[throws] - pub async fn initialize_fuzz(&mut self, arch: &str) { - self.generate_program_client(arch).await?; + pub async fn initialize_fuzz(&mut self) { + self.build_packages().await?; + self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; self.add_new_fuzz_test().await?; self.create_trdelnik_manifest().await?; @@ -101,8 +110,9 @@ impl WorkspaceBuilder { /// - generates PoC template /// - generates Trdelnik manifest file #[throws] - pub async fn initialize_poc(&mut self, arch: &str) { - self.generate_program_client(arch).await?; + pub async fn initialize_poc(&mut self) { + self.build_packages().await?; + self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; self.add_new_poc_test().await?; self.create_trdelnik_manifest().await?; @@ -116,8 +126,9 @@ impl WorkspaceBuilder { /// - generates Trdelnik manifest file /// - updates .gitignore with hfuzz_target folder #[throws] - pub async fn initialize_both(&mut self, arch: &str) { - self.generate_program_client(arch).await?; + pub async fn initialize_both(&mut self) { + self.build_packages().await?; + self.create_program_client_crate().await?; self.create_trdelnik_tests_crate().await?; self.add_new_poc_test().await?; self.add_new_fuzz_test().await?; @@ -125,24 +136,20 @@ impl WorkspaceBuilder { self.create_trdelnik_manifest().await?; self.update_gitignore("hfuzz_target")?; } - /// ## Builds program packages, generates source code for program client and builds program client + + /// ## Builds program packages /// - obtains program packages names and paths /// - obtains data for generating program client - /// - generates program client - /// - builds program client /// /// Building program client at the end will ensure that during 'trdelnik build' /// command we will not need to wait long time #[throws] - async fn generate_program_client(&mut self, _arch: &str) { + async fn build_packages(&mut self) { self.packages = Commander::collect_program_packages().await?; self.idl = Commander::build_program_packages(&self.packages).await?; - // INFO even though this is ok , currently default cargo toml status is that - // it will have trdelnik_client version set to 0.5.0 that means it will not actually - // build, but once updated it should be ok - self.create_program_client_crate().await?; self.use_tokens = Commander::build_program_client().await?; } + /// ## Adds new Fuzz test template to the trdelnik-tests folder #[throws] pub async fn add_fuzz_test(&mut self) { @@ -152,10 +159,10 @@ impl WorkspaceBuilder { /// ## Creates program client folder and generates source code #[throws] async fn create_program_client_crate(&self) { - let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); - let cargo_path = crate_path.join(CARGO); - let src_path = crate_path.join(SRC); - let lib_path = src_path.join(LIB); + let cargo_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, CARGO); + let src_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC); + let crate_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY); + let lib_path = construct_path!(self.root, SRC, LIB); self.create_directory_all(&src_path).await?; @@ -163,7 +170,7 @@ impl WorkspaceBuilder { self.create_file(&cargo_path, &cargo_toml_content).await?; - self.add_program_dependencies(&crate_path, "dependencies") + self.add_program_dependencies(&crate_path, "dependencies", Some(vec!["no-entrypoint"])) .await?; let program_client = @@ -175,7 +182,7 @@ impl WorkspaceBuilder { /// ## Create trdelnik-test folder #[throws] async fn create_trdelnik_tests_crate(&self) { - let workspace_path = self.root.join(TESTS_WORKSPACE_DIRECTORY); + let workspace_path = construct_path!(self.root, TESTS_WORKSPACE_DIRECTORY); self.create_directory(&workspace_path).await?; } /// ## Generates new folder and contents for new Fuzz test Template @@ -189,21 +196,15 @@ impl WorkspaceBuilder { throw!(Error::NoProgramsFound) }; - let fuzz_dir_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_TEST_DIRECTORY); - self.create_directory(&fuzz_dir_path).await?; + let fuzz_dir_path = + construct_path!(self.root, TESTS_WORKSPACE_DIRECTORY, FUZZ_TEST_DIRECTORY); - let fuzz_tests_dir = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_TEST_DIRECTORY); + self.create_directory(&fuzz_dir_path).await?; - let fuzz_id = if fuzz_tests_dir.read_dir()?.next().is_none() { + let fuzz_id = if fuzz_dir_path.read_dir()?.next().is_none() { 0 } else { - let mut directories: Vec<_> = fuzz_tests_dir + let mut directories: Vec<_> = fuzz_dir_path .read_dir() .unwrap() .map(|r| r.unwrap()) @@ -233,20 +234,22 @@ impl WorkspaceBuilder { let new_fuzz_test = format!("fuzz_{fuzz_id}"); - let new_fuzz_test_dir = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_TEST_DIRECTORY) - .join(&new_fuzz_test); + let new_fuzz_test_dir = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + &new_fuzz_test + ); self.create_directory(&new_fuzz_test_dir).await?; - let cargo_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_TEST_DIRECTORY) - .join(&new_fuzz_test) - .join(CARGO); + let cargo_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + &new_fuzz_test, + CARGO + ); let cargo_toml_content = load_template("/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl")?; @@ -254,12 +257,13 @@ impl WorkspaceBuilder { self.create_file(&cargo_path, &cargo_content).await?; - let fuzz_test_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(FUZZ_TEST_DIRECTORY) - .join(&new_fuzz_test) - .join(FUZZ_TEST); + let fuzz_test_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + &new_fuzz_test, + FUZZ_TEST + ); let fuzz_test_content = load_template("/src/templates/trdelnik-tests/fuzz_test.tmpl.rs")?; @@ -277,7 +281,7 @@ impl WorkspaceBuilder { .await?; // add program dependencies - self.add_program_dependencies(&new_fuzz_test_dir, "dependencies") + self.add_program_dependencies(&new_fuzz_test_dir, "dependencies", None) .await?; // add fuzzing feature @@ -298,38 +302,38 @@ impl WorkspaceBuilder { throw!(Error::NoProgramsFound) }; - let poc_dir_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(POC_TEST_DIRECTORY); + let poc_dir_path = + construct_path!(self.root, TESTS_WORKSPACE_DIRECTORY, POC_TEST_DIRECTORY); self.create_directory(&poc_dir_path).await?; - let new_poc_test_dir = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(POC_TEST_DIRECTORY) - .join(TESTS); - + let new_poc_test_dir = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + POC_TEST_DIRECTORY, + TESTS + ); self.create_directory(&new_poc_test_dir).await?; - let cargo_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(POC_TEST_DIRECTORY) - .join(CARGO); + let cargo_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + POC_TEST_DIRECTORY, + CARGO + ); let cargo_toml_content = load_template("/src/templates/trdelnik-tests/Cargo_poc.toml.tmpl")?; self.create_file(&cargo_path, &cargo_toml_content).await?; - let poc_test_path = self - .root - .join(TESTS_WORKSPACE_DIRECTORY) - .join(POC_TEST_DIRECTORY) - .join(TESTS) - .join(POC_TEST); + let poc_test_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + POC_TEST_DIRECTORY, + TESTS, + POC_TEST + ); let poc_test_content = load_template("/src/templates/trdelnik-tests/poc_test.tmpl.rs")?; @@ -342,7 +346,7 @@ impl WorkspaceBuilder { self.add_workspace_member(&format!("{TESTS_WORKSPACE_DIRECTORY}/{POC_TEST_DIRECTORY}",)) .await?; - self.add_program_dependencies(&poc_dir_path, "dev-dependencies") + self.add_program_dependencies(&poc_dir_path, "dev-dependencies", None) .await?; } @@ -392,7 +396,7 @@ impl WorkspaceBuilder { /// ## Creates Trdelnik manifest from template #[throws] async fn create_trdelnik_manifest(&self) { - let trdelnik_toml_path = self.root.join(TRDELNIK); + let trdelnik_toml_path = construct_path!(self.root, TRDELNIK); let trdelnik_toml_content = load_template("/src/templates/Trdelnik.toml.tmpl")?; self.create_file(&trdelnik_toml_path, &trdelnik_toml_content) .await?; @@ -400,10 +404,10 @@ impl WorkspaceBuilder { /// ## Updates program client generated source code #[throws] async fn update_program_client_crate(&self) { - let crate_path = self.root.join(PROGRAM_CLIENT_DIRECTORY); - let cargo_path = crate_path.join(CARGO); - let src_path = crate_path.join(SRC); - let lib_path = src_path.join(LIB); + let crate_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY); + let cargo_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, CARGO); + let src_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC); + let lib_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC, LIB); self.create_directory_all(&src_path).await?; @@ -411,7 +415,7 @@ impl WorkspaceBuilder { self.create_file(&cargo_path, &cargo_toml_content).await?; - self.add_program_dependencies(&crate_path, "dependencies") + self.add_program_dependencies(&crate_path, "dependencies", Some(vec!["no-entrypoint"])) .await?; let program_client = @@ -423,7 +427,7 @@ impl WorkspaceBuilder { /// ## Add workspace member to the project root Cargo.toml #[throws] async fn add_workspace_member(&self, member: &str) { - let cargo = self.root.join(CARGO); + let cargo = construct_path!(self.root, CARGO); let mut content: Value = fs::read_to_string(&cargo).await?.parse()?; let new_member = Value::String(String::from(member)); @@ -455,9 +459,9 @@ impl WorkspaceBuilder { /// ## Updates .gitignore file in the `root` directory and appends `ignored_path` to the end of the file #[throws] fn update_gitignore(&self, ignored_path: &str) { - let file_path = self.root.join(GIT_IGNORE); - if file_path.exists() { - let file = File::open(&file_path)?; + let gitignore_path = construct_path!(self.root, GIT_IGNORE); + if gitignore_path.exists() { + let file = File::open(&gitignore_path)?; for line in io::BufReader::new(file).lines().flatten() { if line == ignored_path { // INFO do not add the ignored path again if it is already in the .gitignore file @@ -468,7 +472,10 @@ impl WorkspaceBuilder { return; } } - let file = OpenOptions::new().write(true).append(true).open(file_path); + let file = OpenOptions::new() + .write(true) + .append(true) + .open(gitignore_path); if let Ok(mut file) = file { writeln!(file, "{}", ignored_path)?; @@ -583,8 +590,14 @@ impl WorkspaceBuilder { /// ## Adds program dependency to specified Cargo.toml /// - for example, we need to use program entry within the fuzzer #[throws] - async fn add_program_dependencies(&self, cargo_dir: &PathBuf, deps: &str) { - let cargo_path = cargo_dir.join(CARGO); + async fn add_program_dependencies( + &self, + cargo_dir: &PathBuf, + deps: &str, + features: Option>, + ) { + let cargo_path = construct_path!(cargo_dir, CARGO); + let mut cargo_toml_content: toml::Value = fs::read_to_string(&cargo_path).await?.parse()?; let client_toml_deps = cargo_toml_content @@ -598,13 +611,32 @@ impl WorkspaceBuilder { // INFO this will obtain relative path // TODO fuzzer needs no entry point feature here for program client cargo.toml let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); - let dep: Value = format!( - r#"{} = {{ path = "{}" }}"#, - package.name, - relative_path.to_str().unwrap() - ) - .parse() - .unwrap(); + // let dep: Value = format!( + // r#"{} = {{ path = "{}" }}"#, + // package.name, + // relative_path.to_str().unwrap() + // ) + // .parse() + // .unwrap(); + + let dep: Value = if features.is_some() { + format!( + r#"{} = {{ path = "{}", features = {:?} }}"#, + package.name, + relative_path.to_str().unwrap(), + features.as_ref().unwrap() + ) + .parse() + .unwrap() + } else { + format!( + r#"{} = {{ path = "{}" }}"#, + package.name, + relative_path.to_str().unwrap() + ) + .parse() + .unwrap() + }; if let toml::Value::Table(table) = dep { let (name, value) = table.into_iter().next().unwrap(); client_toml_deps.entry(name).or_insert(value.clone()); From 624659e355c0698b5de5d277e4a2125c0507e8de Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 14:12:33 +0100 Subject: [PATCH 42/57] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Regenerated=20progra?= =?UTF-8?q?m=20clients=20for=20examples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/escrow/.program_client/Cargo.toml | 1 + examples/turnstile/.program_client/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/escrow/.program_client/Cargo.toml b/examples/escrow/.program_client/Cargo.toml index 9e83bd19..5792bd07 100644 --- a/examples/escrow/.program_client/Cargo.toml +++ b/examples/escrow/.program_client/Cargo.toml @@ -7,3 +7,4 @@ path = "../../../crates/client" [dependencies.escrow] path = "../programs/escrow" +features = ["no-entrypoint"] diff --git a/examples/turnstile/.program_client/Cargo.toml b/examples/turnstile/.program_client/Cargo.toml index e5bec949..e36b8b9e 100644 --- a/examples/turnstile/.program_client/Cargo.toml +++ b/examples/turnstile/.program_client/Cargo.toml @@ -7,3 +7,4 @@ path = "../../../crates/client" [dependencies.turnstile] path = "../programs/turnstile" +features = ["no-entrypoint"] From 9aace7200f7e2f09fc6f37e25c59170c4e41c255 Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 14:20:47 +0100 Subject: [PATCH 43/57] =?UTF-8?q?=F0=9F=91=B7=20Added=20simple=20fuzzer=20?= =?UTF-8?q?run=20to=20the=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/setup-honggfuzz/action.yml | 15 +++++++++++++++ .github/workflows/run_examples.yml | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/actions/setup-honggfuzz/action.yml diff --git a/.github/actions/setup-honggfuzz/action.yml b/.github/actions/setup-honggfuzz/action.yml new file mode 100644 index 00000000..3391dc85 --- /dev/null +++ b/.github/actions/setup-honggfuzz/action.yml @@ -0,0 +1,15 @@ +name: "Setup Honggfuzz" +description: "Setup Honggfuzz" + +runs: + using: "composite" + steps: + - name: Install honggfuzz + run: cargo install honggfuzz + shell: bash + - name: Install binutils-dev + run: sudo apt-get install binutils-dev + shell: bash + - name: Install libunwind-dev + run: sudo apt-get install libunwind-dev + shell: bash diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml index 9c911faa..7cec5c61 100644 --- a/.github/workflows/run_examples.yml +++ b/.github/workflows/run_examples.yml @@ -43,3 +43,16 @@ jobs: - name: Test Turnstile working-directory: examples/turnstile run: cargo run --manifest-path ../../Cargo.toml test + test_fuzzer: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + - uses: ./.github/actions/setup-honggfuzz/ + id: rust-setup + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - name: Test Fuzzer + working-directory: examples/fuzzer + run: cargo run --manifest-path ../../Cargo.toml fuzz run fuzz_1 From 8d0bf3440d8994b7f0213294399928795449eaba Mon Sep 17 00:00:00 2001 From: andrej Date: Wed, 27 Dec 2023 16:57:53 +0100 Subject: [PATCH 44/57] =?UTF-8?q?=F0=9F=92=9A=20Added=20workflow=20for=20f?= =?UTF-8?q?uzzer=20with=20exit=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run_examples.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml index 7cec5c61..7c6a7381 100644 --- a/.github/workflows/run_examples.yml +++ b/.github/workflows/run_examples.yml @@ -56,3 +56,16 @@ jobs: - name: Test Fuzzer working-directory: examples/fuzzer run: cargo run --manifest-path ../../Cargo.toml fuzz run fuzz_1 + test_fuzzer_with_exit_code: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + - uses: ./.github/actions/setup-honggfuzz/ + id: rust-setup + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - name: Test Fuzzer + working-directory: examples/fuzzer + run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_1 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" From 20f696010504bc72cf0a548f5b1db8e04d6edf80 Mon Sep 17 00:00:00 2001 From: andrej Date: Sat, 30 Dec 2023 15:44:59 +0100 Subject: [PATCH 45/57] =?UTF-8?q?=E2=9C=85=20Added=20fuzz=20example=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/fuzz_example1/Anchor.toml | 15 + examples/fuzz_example1/Cargo.lock | 1764 +++++ examples/fuzz_example1/Cargo.toml | 11 + examples/fuzz_example1/migrations/deploy.ts | 12 + examples/fuzz_example1/package-lock.json | 1883 +++++ examples/fuzz_example1/package.json | 19 + .../programs/fuzz_example1/Cargo.toml | 19 + .../programs/fuzz_example1/Xargo.toml | 2 + .../programs/fuzz_example1/src/error.rs | 9 + .../src/instructions/end_registrations.rs | 22 + .../src/instructions/initialize.rs | 27 + .../fuzz_example1/src/instructions/invest.rs | 60 + .../fuzz_example1/src/instructions/mod.rs | 11 + .../src/instructions/register.rs | 34 + .../programs/fuzz_example1/src/lib.rs | 27 + .../programs/fuzz_example1/src/state.rs | 27 + examples/fuzz_example1/tests/fuzz_example1.ts | 147 + examples/fuzz_example1/tsconfig.json | 17 + examples/fuzz_example1/yarn.lock | 2322 ++++++ examples/fuzz_example2/Anchor.toml | 15 + examples/fuzz_example2/Cargo.lock | 6200 +++++++++++++++++ examples/fuzz_example2/Cargo.toml | 11 + examples/fuzz_example2/Trdelnik.toml | 30 + examples/fuzz_example2/migrations/deploy.ts | 12 + examples/fuzz_example2/package-lock.json | 1883 +++++ examples/fuzz_example2/package.json | 19 + .../programs/fuzz_example2/Cargo.toml | 19 + .../programs/fuzz_example2/Xargo.toml | 2 + .../src/instructions/initialize.rs | 56 + .../fuzz_example2/src/instructions/mod.rs | 5 + .../src/instructions/withdraw.rs | 30 + .../programs/fuzz_example2/src/lib.rs | 27 + .../programs/fuzz_example2/src/state.rs | 15 + examples/fuzz_example2/tests/fuzz_example2.ts | 109 + examples/fuzz_example2/tsconfig.json | 11 + examples/fuzz_example2/yarn.lock | 2322 ++++++ 36 files changed, 17194 insertions(+) create mode 100644 examples/fuzz_example1/Anchor.toml create mode 100644 examples/fuzz_example1/Cargo.lock create mode 100644 examples/fuzz_example1/Cargo.toml create mode 100644 examples/fuzz_example1/migrations/deploy.ts create mode 100644 examples/fuzz_example1/package-lock.json create mode 100644 examples/fuzz_example1/package.json create mode 100644 examples/fuzz_example1/programs/fuzz_example1/Cargo.toml create mode 100644 examples/fuzz_example1/programs/fuzz_example1/Xargo.toml create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/error.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/instructions/end_registrations.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/instructions/initialize.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/instructions/invest.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/instructions/mod.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/instructions/register.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/lib.rs create mode 100644 examples/fuzz_example1/programs/fuzz_example1/src/state.rs create mode 100644 examples/fuzz_example1/tests/fuzz_example1.ts create mode 100644 examples/fuzz_example1/tsconfig.json create mode 100644 examples/fuzz_example1/yarn.lock create mode 100644 examples/fuzz_example2/Anchor.toml create mode 100644 examples/fuzz_example2/Cargo.lock create mode 100644 examples/fuzz_example2/Cargo.toml create mode 100644 examples/fuzz_example2/Trdelnik.toml create mode 100644 examples/fuzz_example2/migrations/deploy.ts create mode 100644 examples/fuzz_example2/package-lock.json create mode 100644 examples/fuzz_example2/package.json create mode 100644 examples/fuzz_example2/programs/fuzz_example2/Cargo.toml create mode 100644 examples/fuzz_example2/programs/fuzz_example2/Xargo.toml create mode 100644 examples/fuzz_example2/programs/fuzz_example2/src/instructions/initialize.rs create mode 100644 examples/fuzz_example2/programs/fuzz_example2/src/instructions/mod.rs create mode 100644 examples/fuzz_example2/programs/fuzz_example2/src/instructions/withdraw.rs create mode 100644 examples/fuzz_example2/programs/fuzz_example2/src/lib.rs create mode 100644 examples/fuzz_example2/programs/fuzz_example2/src/state.rs create mode 100644 examples/fuzz_example2/tests/fuzz_example2.ts create mode 100644 examples/fuzz_example2/tsconfig.json create mode 100644 examples/fuzz_example2/yarn.lock diff --git a/examples/fuzz_example1/Anchor.toml b/examples/fuzz_example1/Anchor.toml new file mode 100644 index 00000000..0ae98aba --- /dev/null +++ b/examples/fuzz_example1/Anchor.toml @@ -0,0 +1,15 @@ +[features] +seeds = false +skip-lint = false +[programs.localnet] +fuzz_example1 = "7sP6fczLZFSxCYSMbVcHt35sMTMzbTS1oT9Qcsxc61Kt" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "/home/andrej/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/examples/fuzz_example1/Cargo.lock b/examples/fuzz_example1/Cargo.lock new file mode 100644 index 00000000..35cc7587 --- /dev/null +++ b/examples/fuzz_example1/Cargo.lock @@ -0,0 +1,1764 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +dependencies = [ + "anchor-syn", + "anyhow", + "bs58 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +dependencies = [ + "anchor-syn", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +dependencies = [ + "anchor-syn", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-space", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.11", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-syn" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "heck", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", + "proc-macro-crate", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fuzz_example1" +version = "0.1.0" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro2" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "solana-frozen-abi" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d229588852b514378c88ea74ef6fb93c5575758d2aa3a6a300872ccf5be51772" +dependencies = [ + "ahash 0.8.6", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad75a8290906967a9737c76bb5cc9769cee2097a6a6fbda08017562454ead020" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.42", +] + +[[package]] +name = "solana-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de52673b07eda66299b6ff858c54f3d08bdf4addc5c56969f0a94a09bb63f853" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.5", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.11", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5c5ae1f2b5e7dec7dcab0199a642e1900b981c156547942156c5c4fbcc3eafa" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.42", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.42", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.42", +] diff --git a/examples/fuzz_example1/Cargo.toml b/examples/fuzz_example1/Cargo.toml new file mode 100644 index 00000000..f077205f --- /dev/null +++ b/examples/fuzz_example1/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +members = ["programs/*"] +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 + +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/examples/fuzz_example1/migrations/deploy.ts b/examples/fuzz_example1/migrations/deploy.ts new file mode 100644 index 00000000..82fb175f --- /dev/null +++ b/examples/fuzz_example1/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/examples/fuzz_example1/package-lock.json b/examples/fuzz_example1/package-lock.json new file mode 100644 index 00000000..0d6d87dd --- /dev/null +++ b/examples/fuzz_example1/package-lock.json @@ -0,0 +1,1883 @@ +{ + "name": "fuzz_example1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@coral-xyz/anchor": "^0.28.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.1.1", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } + }, + "node_modules/@babel/runtime": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.6.tgz", + "integrity": "sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@coral-xyz/anchor": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.28.0.tgz", + "integrity": "sha512-kQ02Hv2ZqxtWP30WN1d4xxT4QqlOXYDxmEd3k/bbneqhV3X5QMO4LAtoUFs7otxyivOgoqam5Il5qx81FuI4vw==", + "dependencies": { + "@coral-xyz/borsh": "^0.28.0", + "@solana/web3.js": "^1.68.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@coral-xyz/borsh": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.28.0.tgz", + "integrity": "sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ==", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.87.6", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.87.6.tgz", + "integrity": "sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.1", + "@solana/buffer-layout": "^4.0.0", + "agentkeepalive": "^4.3.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.6.12", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + } + }, + "node_modules/@solana/web3.js/node_modules/superstruct": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", + "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + }, + "node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", + "dev": true + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "optional": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", + "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", + "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "eventemitter3": "^4.0.7", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", + "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superstruct": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz", + "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", + "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", + "dev": true, + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "optional": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/examples/fuzz_example1/package.json b/examples/fuzz_example1/package.json new file mode 100644 index 00000000..f89aea07 --- /dev/null +++ b/examples/fuzz_example1/package.json @@ -0,0 +1,19 @@ +{ + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.28.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.1.1", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/Cargo.toml b/examples/fuzz_example1/programs/fuzz_example1/Cargo.toml new file mode 100644 index 00000000..6f707b0c --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "fuzz_example1" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "fuzz_example1" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +anchor-lang = "0.28.0" diff --git a/examples/fuzz_example1/programs/fuzz_example1/Xargo.toml b/examples/fuzz_example1/programs/fuzz_example1/Xargo.toml new file mode 100644 index 00000000..475fb71e --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/error.rs b/examples/fuzz_example1/programs/fuzz_example1/src/error.rs new file mode 100644 index 00000000..a4916b46 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/error.rs @@ -0,0 +1,9 @@ +use anchor_lang::prelude::*; + +#[error_code] +pub enum CustomError { + #[msg("Cannot invested, amount overflow occured")] + AmountOverflow, + #[msg("Registration round is still open, cannot invest right now!")] + RegistrationRoundOpen, +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/instructions/end_registrations.rs b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/end_registrations.rs new file mode 100644 index 00000000..f92cee46 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/end_registrations.rs @@ -0,0 +1,22 @@ +pub use anchor_lang::prelude::*; + +use crate::state::{State, STATE_SEED}; + +pub fn _end_registration(ctx: Context) -> Result<()> { + let state = &mut ctx.accounts.state; + + state.registrations_round = false; + Ok(()) +} + +#[derive(Accounts)] +pub struct EndRegistration<'info> { + pub author: Signer<'info>, + #[account( + mut, + has_one = author, + seeds = [author.key().as_ref(), STATE_SEED.as_ref()], + bump = state.bump + )] + pub state: Account<'info, State>, +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/instructions/initialize.rs b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/initialize.rs new file mode 100644 index 00000000..d94c0ef4 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/initialize.rs @@ -0,0 +1,27 @@ +pub use anchor_lang::prelude::*; + +use crate::state::{State, STATE_SEED}; + +pub fn _initialize(ctx: Context) -> Result<()> { + let state = &mut ctx.accounts.state; + + state.author = ctx.accounts.author.key(); + state.total_invested = 0; + state.bump = *ctx.bumps.get("state").unwrap(); + Ok(()) +} + +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account(mut)] + pub author: Signer<'info>, + #[account( + init, + payer = author, + space = 8 + State::LEN, + seeds = [author.key().as_ref(), STATE_SEED.as_ref()], + bump + )] + pub state: Account<'info, State>, + pub system_program: Program<'info, System>, +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/instructions/invest.rs b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/invest.rs new file mode 100644 index 00000000..248fcf3b --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/invest.rs @@ -0,0 +1,60 @@ +use anchor_lang::{prelude::*, system_program}; + +use crate::{ + error::CustomError, + state::{Project, State, PROJECT_SEED, STATE_SEED}, +}; +pub fn _invest(ctx: Context, amount: u64) -> Result<()> { + let project = &mut ctx.accounts.project; + let state = &mut ctx.accounts.state; + + // INFO this bool is not set within the inicialization so it is + // false from the start , so it is possible to call invest even + // without closing registration round. + require!( + !state.registrations_round, + CustomError::RegistrationRoundOpen + ); + + project.invested_amount = project + .invested_amount + .checked_add(amount) + .ok_or(CustomError::AmountOverflow)?; + + state.total_invested = state + .total_invested + .checked_add(amount) + .ok_or(CustomError::AmountOverflow)?; + + system_program::transfer( + CpiContext::new( + ctx.accounts.system_program.to_account_info(), + system_program::Transfer { + from: ctx.accounts.investor.to_account_info(), + to: ctx.accounts.project.to_account_info(), + }, + ), + amount, + )?; + + Ok(()) +} + +#[derive(Accounts)] +pub struct Invest<'info> { + #[account(mut)] + pub investor: Signer<'info>, + #[account( + mut, + seeds = [project.project_author.key().as_ref(), state.key().as_ref() ,PROJECT_SEED.as_ref()], + bump = project.bump + )] + pub project: Account<'info, Project>, + #[account( + mut, + seeds = [state.author.key().as_ref(), STATE_SEED.as_ref()], + bump = state.bump + )] + pub state: Account<'info, State>, + pub system_program: Program<'info, System>, +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/instructions/mod.rs b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/mod.rs new file mode 100644 index 00000000..e6fcaa57 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/mod.rs @@ -0,0 +1,11 @@ +pub mod end_registrations; +pub use end_registrations::*; + +pub mod initialize; +pub use initialize::*; + +pub mod register; +pub use register::*; + +pub mod invest; +pub use invest::*; diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/instructions/register.rs b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/register.rs new file mode 100644 index 00000000..3c48ee38 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/instructions/register.rs @@ -0,0 +1,34 @@ +pub use anchor_lang::prelude::*; + +use crate::state::{Project, State, PROJECT_SEED, STATE_SEED}; + +pub fn _register(ctx: Context) -> Result<()> { + let project = &mut ctx.accounts.project; + + project.project_author = ctx.accounts.project_author.key(); + project.invested_amount = 0; + project.bump = *ctx.bumps.get("project").unwrap(); + + Ok(()) +} + +#[derive(Accounts)] +pub struct Register<'info> { + #[account(mut)] + pub project_author: Signer<'info>, + #[account( + init, + payer = project_author, + space = 8 + Project::LEN, + seeds = [project_author.key().as_ref(), state.key().as_ref() ,PROJECT_SEED.as_ref()], + bump + )] + pub project: Account<'info, Project>, + #[account( + mut, + seeds = [state.author.key().as_ref(), STATE_SEED.as_ref()], + bump = state.bump + )] + pub state: Account<'info, State>, + pub system_program: Program<'info, System>, +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/lib.rs b/examples/fuzz_example1/programs/fuzz_example1/src/lib.rs new file mode 100644 index 00000000..444c4eb4 --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/lib.rs @@ -0,0 +1,27 @@ +use crate::instructions::*; +use anchor_lang::prelude::*; + +pub mod error; +pub mod instructions; +pub mod state; + +declare_id!("7sP6fczLZFSxCYSMbVcHt35sMTMzbTS1oT9Qcsxc61Kt"); + +#[program] +pub mod fuzz_example1 { + + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + _initialize(ctx) + } + pub fn register(ctx: Context) -> Result<()> { + _register(ctx) + } + pub fn end_registrations(ctx: Context) -> Result<()> { + _end_registration(ctx) + } + pub fn invest(ctx: Context, amount: u64) -> Result<()> { + _invest(ctx, amount) + } +} diff --git a/examples/fuzz_example1/programs/fuzz_example1/src/state.rs b/examples/fuzz_example1/programs/fuzz_example1/src/state.rs new file mode 100644 index 00000000..542bdfdc --- /dev/null +++ b/examples/fuzz_example1/programs/fuzz_example1/src/state.rs @@ -0,0 +1,27 @@ +use anchor_lang::prelude::*; + +pub const STATE_SEED: &str = "state_seed"; +pub const PROJECT_SEED: &str = "project_seed"; + +#[account] +pub struct State { + pub author: Pubkey, + pub registrations_round: bool, + pub total_invested: u64, + pub bump: u8, +} + +impl State { + pub const LEN: usize = 32 + 1 + 8 + 1; +} + +#[account] +pub struct Project { + pub project_author: Pubkey, + pub invested_amount: u64, + pub bump: u8, +} + +impl Project { + pub const LEN: usize = 32 + 8 + 1; +} diff --git a/examples/fuzz_example1/tests/fuzz_example1.ts b/examples/fuzz_example1/tests/fuzz_example1.ts new file mode 100644 index 00000000..b548ce35 --- /dev/null +++ b/examples/fuzz_example1/tests/fuzz_example1.ts @@ -0,0 +1,147 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { FuzzExample1 } from "../target/types/fuzz_example1"; +import { assert } from "chai"; + +const STATE_SEED = "state_seed"; +const PROJECT_SEED = "project_seed"; + + +describe("fuzz_example1", () => { + // Configure the client to use the local cluster. + + const provider = anchor.AnchorProvider.env() + anchor.setProvider(provider); + + const program = anchor.workspace.FuzzExample1 as Program; + + const authority = anchor.web3.Keypair.generate(); + const project_author = anchor.web3.Keypair.generate(); + const investor = anchor.web3.Keypair.generate(); + + + it("Initializing state!", async () => { + await airdrop(provider.connection, authority.publicKey); + + const [state, state_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + authority.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(STATE_SEED), + ], program.programId) + + + await program.methods.initialize().accounts({ + author: authority.publicKey, + state: state, + systemProgram: anchor.web3.SystemProgram.programId + }).signers([authority]).rpc({ commitment: "confirmed" }); + + + + const state_data = await program.account.state.fetch(state); + + assert.strictEqual(state_data.registrationsRound, false); + assert.strictEqual(state_data.author.toString(), authority.publicKey.toString()); + + }); + + it.skip("End registrations", async () => { + const [state, state_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + authority.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(STATE_SEED), + ], program.programId) + + + await program.methods.endRegistrations().accounts({ + author: authority.publicKey, + state: state + }).signers([authority]).rpc({ commitment: "confirmed" }); + + + const state_data = await program.account.state.fetch(state); + + assert.strictEqual(state_data.registrationsRound, false); + assert.strictEqual(state_data.author.toString(), authority.publicKey.toString()); + }); + + + it("Register project", async () => { + await airdrop(provider.connection, project_author.publicKey); + + const [state, state_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + authority.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(STATE_SEED), + ], program.programId) + + + const [project, project_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + project_author.publicKey.toBuffer(), + state.toBuffer(), + anchor.utils.bytes.utf8.encode(PROJECT_SEED), + ], program.programId) + + + + await program.methods.register().accounts({ + projectAuthor: project_author.publicKey, + project: project, + state: state, + systemProgram: anchor.web3.SystemProgram.programId + }).signers([project_author]).rpc({ + commitment: "confirmed" + }); + + + const project_data = await program.account.project.fetch(project); + + assert.strictEqual(project_data.investedAmount.toString(), new anchor.BN(0).toString()); + assert.strictEqual(project_data.projectAuthor.toString(), project_author.publicKey.toString()); + + }); + + it("Invest into project", async () => { + await airdrop(provider.connection, investor.publicKey); + + const [state, state_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + authority.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(STATE_SEED), + ], program.programId) + + + const [project, project_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + project_author.publicKey.toBuffer(), + state.toBuffer(), + anchor.utils.bytes.utf8.encode(PROJECT_SEED), + ], program.programId) + + + const stateDataBefore = await program.account.state.fetch(state); + const projectDataBefore = await program.account.project.fetch(project); + const projectBalaanceBefore = await provider.connection.getBalance(project); + + const investing_amount = new anchor.BN(50); + + await program.methods.invest(investing_amount).accounts({ + investor: investor.publicKey, + project: project, + state: state, + }).signers([investor]).rpc({ commitment: "confirmed" }); + + + const stateDataAfter = await program.account.state.fetch(state); + const projectDataAfter = await program.account.project.fetch(project); + const projectBalaanceAfter = await provider.connection.getBalance(project); + + + + assert.strictEqual(projectDataAfter.investedAmount.toString(), projectDataBefore.investedAmount.add(investing_amount).toString()); + assert.strictEqual(stateDataAfter.totalInvested.toString(), stateDataBefore.totalInvested.add(investing_amount).toString()); + assert.strictEqual(projectBalaanceAfter, projectBalaanceBefore + investing_amount.toNumber()); + + + }); +}); + + +async function airdrop(connection: any, address: any, amount = 1000000000) { + await connection.confirmTransaction(await connection.requestAirdrop(address, amount), "confirmed"); +} diff --git a/examples/fuzz_example1/tsconfig.json b/examples/fuzz_example1/tsconfig.json new file mode 100644 index 00000000..539ced2a --- /dev/null +++ b/examples/fuzz_example1/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "types": [ + "mocha", + "chai" + ], + "typeRoots": [ + "./node_modules/@types" + ], + "lib": [ + "es2015" + ], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } +} diff --git a/examples/fuzz_example1/yarn.lock b/examples/fuzz_example1/yarn.lock new file mode 100644 index 00000000..64537cf7 --- /dev/null +++ b/examples/fuzz_example1/yarn.lock @@ -0,0 +1,2322 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.23.2": + version: 7.23.6 + resolution: "@babel/runtime@npm:7.23.6" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 1a8eaf3d3a103ef5227b60ca7ab5c589118c36ca65ef2d64e65380b32a98a3f3b5b3ef96660fa0471b079a18b619a8317f3e7f03ab2b930c45282a8b69ed9a16 + languageName: node + linkType: hard + +"@coral-xyz/anchor@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/anchor@npm:0.28.0" + dependencies: + "@coral-xyz/borsh": ^0.28.0 + "@solana/web3.js": ^1.68.0 + base64-js: ^1.5.1 + bn.js: ^5.1.2 + bs58: ^4.0.1 + buffer-layout: ^1.2.2 + camelcase: ^6.3.0 + cross-fetch: ^3.1.5 + crypto-hash: ^1.3.0 + eventemitter3: ^4.0.7 + js-sha256: ^0.9.0 + pako: ^2.0.3 + snake-case: ^3.0.4 + superstruct: ^0.15.4 + toml: ^3.0.0 + checksum: 58b3677b5b2ce2c779045184ce4a0ef696966a6a58f41c1c56f6f178db0491acecb6ec677ce0502f0b382a2c724f9c2860d82cc88601784d556d95fbeda415e5 + languageName: node + linkType: hard + +"@coral-xyz/borsh@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/borsh@npm:0.28.0" + dependencies: + bn.js: ^5.1.2 + buffer-layout: ^1.2.0 + peerDependencies: + "@solana/web3.js": ^1.68.0 + checksum: bc2b06b777f9ed43d3b886d2350826bd44d5b932c4fd4471af5956e8755236f5854938c890ee4986d88f61d1439e1d84e715c43dcb6dca4e76198c1ce8dc7a58 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@noble/curves@npm:^1.2.0": + version: 1.3.0 + resolution: "@noble/curves@npm:1.3.0" + dependencies: + "@noble/hashes": 1.3.3 + checksum: b65342ee66c4a440eee2978524412eabba9a9efdd16d6370e15218c6a7d80bddf35e66bb57ed52c0dfd32cb9a717b439ab3a72db618f1a0066dfebe3fd12a421 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.1": + version: 1.3.3 + resolution: "@noble/hashes@npm:1.3.3" + checksum: 8a6496d1c0c64797339bc694ad06cdfaa0f9e56cd0c3f68ae3666cfb153a791a55deb0af9c653c7ed2db64d537aa3e3054629740d2f2338bb1dcb7ab60cd205b + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.0 + resolution: "@npmcli/agent@npm:2.2.0" + dependencies: + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.1 + checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@solana/buffer-layout@npm:^4.0.0": + version: 4.0.1 + resolution: "@solana/buffer-layout@npm:4.0.1" + dependencies: + buffer: ~6.0.3 + checksum: bf846888e813187243d4008a7a9f58b49d16cbd995b9d7f1b72898aa510ed77b1ce5e8468e7b2fd26dd81e557a4e74a666e21fccb95f123c1f740d41138bbacd + languageName: node + linkType: hard + +"@solana/web3.js@npm:^1.68.0": + version: 1.87.6 + resolution: "@solana/web3.js@npm:1.87.6" + dependencies: + "@babel/runtime": ^7.23.2 + "@noble/curves": ^1.2.0 + "@noble/hashes": ^1.3.1 + "@solana/buffer-layout": ^4.0.0 + agentkeepalive: ^4.3.0 + bigint-buffer: ^1.1.5 + bn.js: ^5.2.1 + borsh: ^0.7.0 + bs58: ^4.0.1 + buffer: 6.0.3 + fast-stable-stringify: ^1.0.0 + jayson: ^4.1.0 + node-fetch: ^2.6.12 + rpc-websockets: ^7.5.1 + superstruct: ^0.14.2 + checksum: 182eb2a953f6ebebdfbc7dfda031d1985fb1591a2aa38b388d5dfb9fd3df0fb53a3962373384dbd91df343e148ec3d42a579324effab9ca86f0560c4f6f08481 + languageName: node + linkType: hard + +"@types/bn.js@npm:^5.1.0": + version: 5.1.5 + resolution: "@types/bn.js@npm:5.1.5" + dependencies: + "@types/node": "*" + checksum: c87b28c4af74545624f8a3dae5294b16aa190c222626e8d4b2e327b33b1a3f1eeb43e7a24d914a9774bca43d8cd6e1cb0325c1f4b3a244af6693a024e1d918e6 + languageName: node + linkType: hard + +"@types/chai@npm:^4.3.0": + version: 4.3.11 + resolution: "@types/chai@npm:4.3.11" + checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 + languageName: node + linkType: hard + +"@types/connect@npm:^3.4.33": + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" + dependencies: + "@types/node": "*" + checksum: 7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 + languageName: node + linkType: hard + +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac + languageName: node + linkType: hard + +"@types/mocha@npm:^9.1.1": + version: 9.1.1 + resolution: "@types/mocha@npm:9.1.1" + checksum: 516077c0acd9806dc78317f88aaac0df5aaf0bdc2f63dfdadeabdf0b0137953b6ca65472e6ff7c30bc93ce4e0ae76eae70e8d46764b9a8eae4877a928b6ef49a + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.10.5 + resolution: "@types/node@npm:20.10.5" + dependencies: + undici-types: ~5.26.4 + checksum: e216b679f545a8356960ce985a0e53c3a58fff0eacd855e180b9e223b8db2b5bd07b744a002b8c1f0c37f9194648ab4578533b5c12df2ec10cc02f61d20948d2 + languageName: node + linkType: hard + +"@types/node@npm:^12.12.54": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + +"@types/ws@npm:^7.4.4": + version: 7.4.7 + resolution: "@types/ws@npm:7.4.7" + dependencies: + "@types/node": "*" + checksum: b4c9b8ad209620c9b21e78314ce4ff07515c0cadab9af101c1651e7bfb992d7fd933bd8b9c99d110738fd6db523ed15f82f29f50b45510288da72e964dedb1a3 + languageName: node + linkType: hard + +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 08d37fdfa23a6fe8139f1305313562ebad973f3fac01bcce2773b2bda5bcb0146dfdcf3cb6a722cf0a5f2ca0bc56a827eac8f1e7b3beddc548f654addf1fc34c + languageName: node + linkType: hard + +"JSONStream@npm:^1.3.5": + version: 1.3.5 + resolution: "JSONStream@npm:1.3.5" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: 2605fa124260c61bad38bb65eba30d2f72216a78e94d0ab19b11b4e0327d572b8d530c0c9cc3b0764f727ad26d39e00bf7ebad57781ca6368394d73169c59e46 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" + dependencies: + debug: ^4.3.4 + checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + languageName: node + linkType: hard + +"agentkeepalive@npm:^4.3.0": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: ^1.2.1 + checksum: 13278cd5b125e51eddd5079f04d6fe0914ac1b8b91c1f3db2c1822f99ac1a7457869068997784342fe455d59daaff22e14fb7b8c3da4e741896e7e31faf92481 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: ^2.0.0 + indent-string: ^4.0.0 + checksum: 1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: ^2.0.1 + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: ^3.0.0 + picomatch: ^2.0.4 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced + languageName: node + linkType: hard + +"arrify@npm:^1.0.0": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 + languageName: node + linkType: hard + +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base-x@npm:^3.0.2": + version: 3.0.9 + resolution: "base-x@npm:3.0.9" + dependencies: + safe-buffer: ^5.0.1 + checksum: 957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"bigint-buffer@npm:^1.1.5": + version: 1.1.5 + resolution: "bigint-buffer@npm:1.1.5" + dependencies: + bindings: ^1.3.0 + node-gyp: latest + checksum: d010c9f57758bcdaccb435d88b483ffcc95fe8bbc6e7fb3a44fb5221f29c894ffaf4a3c5a4a530e0e7d6608203c2cde9b79ee4f2386cd6d4462d1070bc8c9f4e + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.2.0 + resolution: "binary-extensions@npm:2.2.0" + checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + languageName: node + linkType: hard + +"bindings@npm:^1.3.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: 1.0.0 + checksum: 65b6b48095717c2e6105a021a7da4ea435aa8d3d3cd085cb9e85bcb6e5773cf318c4745c3f7c504412855940b585bdf9b918236612a1c7a7942491de176f1ae7 + languageName: node + linkType: hard + +"bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 + languageName: node + linkType: hard + +"borsh@npm:^0.7.0": + version: 0.7.0 + resolution: "borsh@npm:0.7.0" + dependencies: + bn.js: ^5.2.0 + bs58: ^4.0.0 + text-encoding-utf-8: ^1.0.2 + checksum: e98bfb5f7cfb820819c2870b884dac58dd4b4ce6a86c286c8fbf5c9ca582e73a8c6094df67e81a28c418ff07a309c6b118b2e27fdfea83fd92b8100c741da0b5 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: ^1.0.0 + concat-map: 0.0.1 + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: ^1.0.0 + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:~3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: ^7.0.1 + checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + languageName: node + linkType: hard + +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: b717b19b25952dd6af483e368f9bcd6b14b87740c3d226c2977a65e84666ffd67000bddea7d911f111a9b6ddc822b234de42d52ab6507bce4119a4cc003ef7b3 + languageName: node + linkType: hard + +"bs58@npm:^4.0.0, bs58@npm:^4.0.1": + version: 4.0.1 + resolution: "bs58@npm:4.0.1" + dependencies: + base-x: ^3.0.2 + checksum: b3c5365bb9e0c561e1a82f1a2d809a1a692059fae016be233a6127ad2f50a6b986467c3a50669ce4c18929dcccb297c5909314dd347a25a68c21b68eb3e95ac2 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer-layout@npm:^1.2.0, buffer-layout@npm:^1.2.2": + version: 1.2.2 + resolution: "buffer-layout@npm:1.2.2" + checksum: e5809ba275530bf4e52fd09558b7c2111fbda5b405124f581acf364261d9c154e271800271898cd40473f9bcbb42c31584efb04219bde549d3460ca4bafeaa07 + languageName: node + linkType: hard + +"buffer@npm:6.0.3, buffer@npm:~6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + +"bufferutil@npm:^4.0.1": + version: 4.0.8 + resolution: "bufferutil@npm:4.0.8" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 7e9a46f1867dca72fda350966eb468eca77f4d623407b0650913fadf73d5750d883147d6e5e21c56f9d3b0bdc35d5474e80a600b9f31ec781315b4d2469ef087 + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.1 + resolution: "cacache@npm:18.0.1" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + languageName: node + linkType: hard + +"camelcase@npm:^6.0.0, camelcase@npm:^6.3.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"chai@npm:^4.3.4": + version: 4.3.10 + resolution: "chai@npm:4.3.10" + dependencies: + assertion-error: ^1.1.0 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 + pathval: ^1.1.1 + type-detect: ^4.0.8 + checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: ^2.0.2 + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + +"chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: ~3.1.2 + braces: ~3.0.2 + fsevents: ~2.3.2 + glob-parent: ~5.1.2 + is-binary-path: ~2.1.0 + is-glob: ~4.0.1 + normalize-path: ~3.0.0 + readdirp: ~3.6.0 + dependenciesMeta: + fsevents: + optional: true + checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^7.0.0 + checksum: ce2e8f578a4813806788ac399b9e866297740eecd4ad1823c27fd344d78b22c5f8597d548adbcc46f0573e43e21e751f39446c5a5e804a12aace402b7a315d7f + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: ~1.1.4 + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"commander@npm:^2.20.3": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"cross-fetch@npm:^3.1.5": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: ^2.6.12 + checksum: 78f993fa099eaaa041122ab037fe9503ecbbcb9daef234d1d2e0b9230a983f64d645d088c464e21a247b825a08dc444a6e7064adfa93536d3a9454b4745b3632 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: ^3.1.0 + shebang-command: ^2.0.0 + which: ^2.0.1 + checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52 + languageName: node + linkType: hard + +"crypto-hash@npm:^1.3.0": + version: 1.3.0 + resolution: "crypto-hash@npm:1.3.0" + checksum: a3a507e0d2b18fbd2da8088a1c62d0c53c009a99bbfa6d851cac069734ffa546922fa51bdd776d006459701cdda873463e5059ece3431aca048fd99e7573d138 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16 + languageName: node + linkType: hard + +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: ^4.0.0 + checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f + languageName: node + linkType: hard + +"delay@npm:^5.0.0": + version: 5.0.0 + resolution: "delay@npm:5.0.0" + checksum: 62f151151ecfde0d9afbb8a6be37a6d103c4cb24f35a20ef3fe56f920b0d0d0bb02bc9c0a3084d0179ef669ca332b91155f2ee4d9854622cd2cdba5fc95285f9 + languageName: node + linkType: hard + +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 + languageName: node + linkType: hard + +"diff@npm:^3.1.0": + version: 3.5.0 + resolution: "diff@npm:3.5.0" + checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b + languageName: node + linkType: hard + +"dot-case@npm:^3.0.4": + version: 3.0.4 + resolution: "dot-case@npm:3.0.4" + dependencies: + no-case: ^3.0.4 + tslib: ^2.0.3 + checksum: a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: ^0.6.2 + checksum: bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 + languageName: node + linkType: hard + +"es6-promise@npm:^4.0.3": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-promisify@npm:^5.0.0": + version: 5.0.0 + resolution: "es6-promisify@npm:5.0.0" + dependencies: + es6-promise: ^4.0.3 + checksum: fbed9d791598831413be84a5374eca8c24800ec71a16c1c528c43a98e2dadfb99331483d83ae6094ddb9b87e6f799a15d1553cebf756047e0865c753bc346b92 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 + languageName: node + linkType: hard + +"escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"eventemitter3@npm:^4.0.7": + version: 4.0.7 + resolution: "eventemitter3@npm:4.0.7" + checksum: 1875311c42fcfe9c707b2712c32664a245629b42bb0a5a84439762dd0fd637fc54d078155ea83c2af9e0323c9ac13687e03cfba79b03af9f40c89b4960099374 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + +"eyes@npm:^0.1.8": + version: 0.1.8 + resolution: "eyes@npm:0.1.8" + checksum: c31703a92bf36ba75ee8d379ee7985c24ee6149f3a6175f44cec7a05b178c38bce9836d3ca48c9acb0329a960ac2c4b2ead4e60cdd4fe6e8c92cad7cd6913687 + languageName: node + linkType: hard + +"fast-stable-stringify@npm:^1.0.0": + version: 1.0.0 + resolution: "fast-stable-stringify@npm:1.0.0" + checksum: ef1203d246a7e8ac15e2bfbda0a89fa375947bccf9f7910be0ea759856dbe8ea5024a0d8cc2cceabe18a9cb67e95927b78bb6173a3ae37ec55a518cf36e5244b + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: b648580bdd893a008c92c7ecc96c3ee57a5e7b6c4c18a9a09b44fb5d36d79146f8e442578bc0e173dc027adf3987e254ba1dfd6e3ec998b7c282873010502144 + languageName: node + linkType: hard + +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + languageName: node + linkType: hard + +"find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 12a1536ac746db74881316a181499a78ef953632ddd28050b7a3a43c62ef5462e3357c8c29d76072bb635f147f7a9a1f0c02efef6b4be28f8db62ceb3d5c7f5d + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: ^3.0.0 + checksum: 1b8d128dae2ac6cc94230cc5ead341ba3e0efaef82dab46a33d171c044caaa6ca001364178d42069b2809c35a1c3c35079a32107c770e9ffab3901b59af8c8b1 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@~2.3.2#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: ^4.0.1 + checksum: f4f2bfe2425296e8a47e36864e4f42be38a996db40420fe434565e4480e3322f18eb37589617a98640c5dc8fdec1a387007ee18dbb1f3f5553409c34d17f425e + languageName: node + linkType: hard + +"glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134 + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 4b86685de6831cebcbb19f93870bea624afee61124b0a20c49017013987cd129e73a8c4baeca295728f41d21265e1f859d25ef36731b142ca59c655fea94bb1a + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" + dependencies: + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + languageName: node + linkType: hard + +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: ^2.0.0 + checksum: 9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: ">= 2.1.2 < 3.0.0" + checksum: 3f60d47a5c8fc3313317edfd29a00a692cc87a19cac0159e2ce711d0ebc9019064108323b5e493625e25594f11c6236647d8e256fbe7a58f4a3b33b89e6d30bf + languageName: node + linkType: hard + +"ieee754@npm:^1.2.1": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 7cae75c8cd9a50f57dadd77482359f659eaebac0319dd9368bcd1714f55e65badd6929ca58569da2b6494ef13fdd5598cd700b1eba23f8b79c5f19d195a3ecf7 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: ^1.3.0 + wrappy: 1 + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: ^2.0.0 + checksum: 84192eb88cff70d320426f35ecd63c3d6d495da9d805b19bc65b518984b7c0760280e57dbf119b7e9be6b161784a5a673ab2c6abe83abb5198a432232ad5b35c + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: ^2.1.1 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isomorphic-ws@npm:^4.0.1": + version: 4.0.1 + resolution: "isomorphic-ws@npm:4.0.1" + peerDependencies: + ws: "*" + checksum: d7190eadefdc28bdb93d67b5f0c603385aaf87724fa2974abb382ac1ec9756ed2cfb27065cbe76122879c2d452e2982bc4314317f3d6c737ddda6c047328771a + languageName: node + linkType: hard + +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + languageName: node + linkType: hard + +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" + dependencies: + "@types/connect": ^3.4.33 + "@types/node": ^12.12.54 + "@types/ws": ^7.4.4 + JSONStream: ^1.3.5 + commander: ^2.20.3 + delay: ^5.0.0 + es6-promisify: ^5.0.0 + eyes: ^0.1.8 + isomorphic-ws: ^4.0.1 + json-stringify-safe: ^5.0.1 + uuid: ^8.3.2 + ws: ^7.4.5 + bin: + jayson: bin/jayson.js + checksum: 86464322fbdc6db65d2bb4fc278cb6c86fad5c2a506065490d39459f09ba0d30f2b4fb740b33828a1424791419b6c8bd295dc54d361a4ad959bf70cc62b1ca7e + languageName: node + linkType: hard + +"js-sha256@npm:^0.9.0": + version: 0.9.0 + resolution: "js-sha256@npm:0.9.0" + checksum: ffad54b3373f81581e245866abfda50a62c483803a28176dd5c28fd2d313e0bdf830e77dac7ff8afd193c53031618920f3d98daf21cbbe80082753ab639c0365 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + languageName: node + linkType: hard + +"json-stringify-safe@npm:^5.0.1": + version: 5.0.1 + resolution: "json-stringify-safe@npm:5.0.1" + checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee + languageName: node + linkType: hard + +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: ^1.2.0 + bin: + json5: lib/cli.js + checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7 + languageName: node + linkType: hard + +"jsonparse@npm:^1.2.0": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 6514a7be4674ebf407afca0eda3ba284b69b07f9958a8d3113ef1005f7ec610860c312be067e450c569aab8b89635e332cee3696789c750692bb60daba627f4d + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: ^5.0.0 + checksum: 72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: ^2.0.1 + checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b + languageName: node + linkType: hard + +"lower-case@npm:^2.0.2": + version: 2.0.2 + resolution: "lower-case@npm:2.0.2" + dependencies: + tslib: ^2.0.3 + checksum: 83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + languageName: node + linkType: hard + +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: ^4.0.0 + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" + dependencies: + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 + is-lambda: ^1.0.1 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + promise-retry: ^2.0.1 + ssri: ^10.0.0 + checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + languageName: node + linkType: hard + +"minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: ^1.1.7 + checksum: 2b1514e3d0f29a549912f0db7ae7b82c5cab4a8f2dd0369f1c6451a325b3f12b2cf473c95873b6157bb8df183d6cf6db82ff03614b6adaaf1d7e055beccdfd01 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: ^1.1.7 + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.0, minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" + dependencies: + encoding: ^0.1.13 + minipass: ^7.0.3 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: ^3.0.0 + checksum: 56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: ^3.0.0 + checksum: b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: ^3.0.0 + checksum: 79076749fcacf21b5d16dd596d32c3b6bf4d6e62abb43868fac21674078505c8b15eaca4e47ed844985a4514854f917d78f588fcd029693709417d8f98b2bd60 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: ^4.0.0 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.4 + resolution: "minipass@npm:7.0.4" + checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: ^3.0.0 + yallist: ^4.0.0 + checksum: f1fdeac0b07cf8f30fcf12f4b586795b97be856edea22b5e9072707be51fc95d41487faec3f265b42973a304fe3a64acd91a44a3826a963e37b37bafde0212c3 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.1": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: ^1.2.6 + bin: + mkdirp: bin/cmd.js + checksum: 0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + +"mocha@npm:^9.0.3": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.3 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 4.2.1 + ms: 2.1.3 + nanoid: 3.3.1 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.2.0 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 4d5ca4ce33fc66627e63acdf09a634e2358c9a00f61de7788b1091b6aad430da04f97f9ecb82d56dc034b623cb833b65576136fd010d77679c03fcea5bc1e12d + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.0.0": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 4ef0969e1bbe866fc223eb32276cbccb0961900bfe79104fa5abe34361979dead8d0e061410a5c03bc3d47455685adf32c09d6f27790f4a6898fb51f7df7ec86 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 + languageName: node + linkType: hard + +"no-case@npm:^3.0.4": + version: 3.0.4 + resolution: "no-case@npm:3.0.4" + dependencies: + lower-case: ^2.0.2 + tslib: ^2.0.3 + checksum: 0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c + languageName: node + linkType: hard + +"node-fetch@npm:^2.6.12": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.3.0": + version: 4.7.1 + resolution: "node-gyp-build@npm:4.7.1" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 2ef8248021489db03be3e8098977cdc797b80a9b12b77c6dcb89b0dc89b8c62e6a482672ee298f61021740ae7f080fb33154cfec8fb158cec620f57b0fae87c0 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" + dependencies: + env-paths: ^2.2.0 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 + graceful-fs: ^4.2.6 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + tar: ^6.1.2 + which: ^4.0.0 + bin: + node-gyp: bin/node-gyp.js + checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.0 + resolution: "nopt@npm:7.2.0" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: 1 + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: ^0.1.0 + checksum: 7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: ^3.0.2 + checksum: 1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: ^3.0.0 + checksum: cb0ab21ec0f32ddffd31dfc250e3afa61e103ef43d957cc45497afe37513634589316de4eb88abdfd969fe6410c22c0b93ab24328833b8eb1ccc087fc0442a1c + languageName: node + linkType: hard + +"pako@npm:^2.0.3": + version: 2.1.0 + resolution: "pako@npm:2.1.0" + checksum: 71666548644c9a4d056bcaba849ca6fd7242c6cf1af0646d3346f3079a1c7f4a66ffec6f7369ee0dc88f61926c10d6ab05da3e1fca44b83551839e89edd75a3e + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: ^9.1.1 || ^10.0.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 090e3147716647fb7fb5b4b8c8e5b55e5d0a6086d085b6cd23f3d3c01fcf0ff56fd3cc22f2f4a033bd2e46ed55d61ed8379e123b42afe7d531a2a5fc8bb556d6 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf + languageName: node + linkType: hard + +"prettier@npm:^2.6.2": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: ^2.0.2 + retry: ^0.12.0 + checksum: f96a3f6d90b92b568a26f71e966cbbc0f63ab85ea6ff6c81284dc869b41510e6cdef99b6b65f9030f0db422bf7c96652a3fff9f2e8fb4a0f069d8f4430359429 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: ^5.1.0 + checksum: d779499376bd4cbb435ef3ab9a957006c8682f343f14089ed5f27764e4645114196e75b7f6abf1cbd84fd247c0cb0651698444df8c9bf30e62120fbbc52269d6 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: ^2.2.1 + checksum: 1ced032e6e45670b6d7352d71d21ce7edf7b9b928494dcaba6f11fba63180d9da6cd7061ebc34175ffda6ff529f481818c962952004d273178acd70f7059b320 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 9f57c93277b5585d3c83b0cf76be47b473ae8c6d9142a46ce8b0291a04bb2cf902059f0f8445dcabb3fb7378e5fe4bb4ea1e008876343d42e46d3b484534ce38 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 623bd7d2e5119467ba66202d733ec3c2e2e26568074923bc0585b6b99db14f357e79bdedb63cab56cec47491c4a0da7e6021a7465ca6dc4f481d3898fdd3158c + languageName: node + linkType: hard + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@types/bn.js": ^5.1.0 + "@types/chai": ^4.3.0 + "@types/mocha": ^9.1.1 + chai: ^4.3.4 + mocha: ^9.0.3 + prettier: ^2.6.2 + ts-mocha: ^10.0.0 + typescript: ^4.3.5 + languageName: unknown + linkType: soft + +"rpc-websockets@npm:^7.5.1": + version: 7.9.0 + resolution: "rpc-websockets@npm:7.9.0" + dependencies: + "@babel/runtime": ^7.17.2 + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3ddd79ea7cf63b7a6a8d32356c7f9b363e41f26a6a8bbe889f9d2c5267811d492e194340fbad1a21ecfa457d5d1f253af3357a94d0118f66fcdea1fd9236adc + languageName: node + linkType: hard + +"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 + languageName: node + linkType: hard + +"semver@npm:^7.3.5": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: ^2.1.0 + checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: ^3.0.0 + checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: b5167a7142c1da704c0e3af85c402002b597081dd9575031a90b4f229ca5678e9a36e8a374f1814c8156a725d17008ae3bde63b92f9cfd132526379e580bec8b + languageName: node + linkType: hard + +"snake-case@npm:^3.0.4": + version: 3.0.4 + resolution: "snake-case@npm:3.0.4" + dependencies: + dot-case: ^3.0.4 + tslib: ^2.0.3 + checksum: 0a7a79900bbb36f8aaa922cf111702a3647ac6165736d5dc96d3ef367efc50465cac70c53cd172c382b022dac72ec91710608e5393de71f76d7142e6fd80e8a3 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: ^2.0.0 + smart-buffer: ^4.2.0 + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.6": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" + dependencies: + minipass: ^7.0.3 + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: ^0.2.0 + emoji-regex: ^9.2.2 + strip-ansi: ^7.0.1 + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: ^6.0.1 + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d + languageName: node + linkType: hard + +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + +"strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"superstruct@npm:^0.14.2": + version: 0.14.2 + resolution: "superstruct@npm:0.14.2" + checksum: c5c4840f432da82125b923ec45faca5113217e83ae416e314d80eae012b8bb603d2e745025d173450758d116348820bc7028157f8c9a72b6beae879f94b837c0 + languageName: node + linkType: hard + +"superstruct@npm:^0.15.4": + version: 0.15.5 + resolution: "superstruct@npm:0.15.5" + checksum: 6d1f5249fee789424b7178fa0a1ffb2ace629c5480c39505885bd8c0046a4ff8b267569a3442fa53b8c560a7ba6599cf3f8af94225aebeb2cf6023f7dd911050 + languageName: node + linkType: hard + +"supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: ^4.0.0 + checksum: 3dda818de06ebbe5b9653e07842d9479f3555ebc77e9a0280caf5a14fb877ffee9ed57007c3b78f5a6324b8dbeec648d9e97a24e2ed9fdb81ddc69ea07100f4a + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.0 + resolution: "tar@npm:6.2.0" + dependencies: + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + minipass: ^5.0.0 + minizlib: ^2.1.1 + mkdirp: ^1.0.3 + yallist: ^4.0.0 + checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + languageName: node + linkType: hard + +"text-encoding-utf-8@npm:^1.0.2": + version: 1.0.2 + resolution: "text-encoding-utf-8@npm:1.0.2" + checksum: ec4c15d50e738c5dba7327ad432ebf0725ec75d4d69c0bd55609254c5a3bc5341272d7003691084a0a73d60d981c8eb0e87603676fdb6f3fed60f4c9192309f9 + languageName: node + linkType: hard + +"through@npm:>=2.2.7 <3": + version: 2.3.8 + resolution: "through@npm:2.3.8" + checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: ^7.0.0 + checksum: f76fa01b3d5be85db6a2a143e24df9f60dd047d151062d0ba3df62953f2f697b16fe5dad9b0ac6191c7efc7b1d9dcaa4b768174b7b29da89d4428e64bc0a20ed + languageName: node + linkType: hard + +"toml@npm:^3.0.0": + version: 3.0.0 + resolution: "toml@npm:3.0.0" + checksum: 5d7f1d8413ad7780e9bdecce8ea4c3f5130dd53b0a4f2e90b93340979a137739879d7b9ce2ce05c938b8cc828897fe9e95085197342a1377dd8850bf5125f15f + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + +"ts-mocha@npm:^10.0.0": + version: 10.0.0 + resolution: "ts-mocha@npm:10.0.0" + dependencies: + ts-node: 7.0.1 + tsconfig-paths: ^3.5.0 + peerDependencies: + mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X + dependenciesMeta: + tsconfig-paths: + optional: true + bin: + ts-mocha: bin/ts-mocha + checksum: b11f2a8ceecf195b0db724da429159982fef12e4357088fe900289223587217e8c126ead7929679edd58bf19ad96c5da5911535d26f535386632e18fbff10c40 + languageName: node + linkType: hard + +"ts-node@npm:7.0.1": + version: 7.0.1 + resolution: "ts-node@npm:7.0.1" + dependencies: + arrify: ^1.0.0 + buffer-from: ^1.1.0 + diff: ^3.1.0 + make-error: ^1.1.1 + minimist: ^1.2.0 + mkdirp: ^0.5.1 + source-map-support: ^0.5.6 + yn: ^2.0.0 + bin: + ts-node: dist/bin.js + checksum: 07ed6ea1805361828737a767cfd6c57ea6e267ee8679282afb933610af02405e1a87c1f2aea1d38ed8e66b34fcbf6272b6021ab95d78849105d2e57fc283870b + languageName: node + linkType: hard + +"tsconfig-paths@npm:^3.5.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" + dependencies: + "@types/json5": ^0.0.29 + json5: ^1.0.2 + minimist: ^1.2.6 + strip-bom: ^3.0.0 + checksum: 59f35407a390d9482b320451f52a411a256a130ff0e7543d18c6f20afab29ac19fbe55c360a93d6476213cc335a4d76ce90f67df54c4e9037f7d240920832201 + languageName: node + linkType: hard + +"tslib@npm:^2.0.3": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 + languageName: node + linkType: hard + +"typescript@npm:^4.3.5": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db + languageName: node + linkType: hard + +"typescript@patch:typescript@^4.3.5#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d + languageName: node + linkType: hard + +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + +"utf-8-validate@npm:^5.0.2": + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 5579350a023c66a2326752b6c8804cc7b39dcd251bb088241da38db994b8d78352e388dcc24ad398ab98385ba3c5ffcadb6b5b14b2637e43f767869055e46ba6 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 5575a8a75c13120e2f10e6ddc801b2c7ed7d8f3c8ac22c7ed0c7b2ba6383ec0abda88c905085d630e251719e0777045ae3236f04c812184b7c765f63a70e58df + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + +"which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: ^2.0.0 + bin: + node-which: ./bin/node-which + checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1 + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 3493b4f0ef979a23d2c1583d7ef85f62fc9463cc02f82829d3e7e663b517f8ae9707da0249b382e46ac58986deb0ca2232ee1081713741211bda9254b429c9bb + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"ws@npm:^7.4.5": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + +"ws@npm:^8.5.0": + version: 8.15.1 + resolution: "ws@npm:8.15.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 54f0fb95621ee60898a38c572c515659e51cc9d9f787fb109cef6fde4befbe1c4602dc999d30110feee37456ad0f1660fa2edcfde6a9a740f86a290999550d30 + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5 + languageName: node + linkType: hard + +"yargs-parser@npm:20.2.4, yargs-parser@npm:^20.2.2": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924 + languageName: node + linkType: hard + +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: ^6.0.0 + decamelize: ^4.0.0 + flat: ^5.0.2 + is-plain-obj: ^2.1.0 + checksum: 68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: ^7.0.2 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.0 + y18n: ^5.0.5 + yargs-parser: ^20.2.2 + checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59 + languageName: node + linkType: hard + +"yn@npm:^2.0.0": + version: 2.0.0 + resolution: "yn@npm:2.0.0" + checksum: 9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard diff --git a/examples/fuzz_example2/Anchor.toml b/examples/fuzz_example2/Anchor.toml new file mode 100644 index 00000000..b92d71ee --- /dev/null +++ b/examples/fuzz_example2/Anchor.toml @@ -0,0 +1,15 @@ +[features] +seeds = false +skip-lint = false +[programs.localnet] +fuzz_example2 = "7fd3w1z9biVCPkAJ8AtLVLUCv2WQjFvDPg27Z2tJmFVe" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "/home/andrej/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/examples/fuzz_example2/Cargo.lock b/examples/fuzz_example2/Cargo.lock new file mode 100644 index 00000000..938d6236 --- /dev/null +++ b/examples/fuzz_example2/Cargo.lock @@ -0,0 +1,6200 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom 0.2.11", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom 0.2.11", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.71", + "quote 1.0.33", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +dependencies = [ + "anchor-syn", + "anyhow", + "bs58 0.5.0", + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.71", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-client" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" +dependencies = [ + "anchor-lang", + "anyhow", + "futures", + "regex", + "serde", + "solana-account-decoder", + "solana-client", + "solana-sdk", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-space", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.11", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-syn" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "heck 0.3.3", + "proc-macro2 1.0.71", + "quote 1.0.33", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint 0.4.4", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint 0.4.4", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.71", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.71", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "brotli" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "cargo-platform" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.0", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.71", + "quote 1.0.33", + "strsim 0.10.0", + "syn 2.0.43", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", + "rayon", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.4", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "dlopen" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +dependencies = [ + "dlopen_derive", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "dlopen_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +dependencies = [ + "libc", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.8", +] + +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fehler" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5729fe49ba028cd550747b6e62cd3d841beccab5390aa398538c31a2d983635" +dependencies = [ + "fehler-macros", +] + +[[package]] +name = "fehler-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.52.0", +] + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fuzz_0" +version = "0.1.0" +dependencies = [ + "arbitrary", + "assert_matches", + "fuzz_example2", + "honggfuzz", + "program_client", + "trdelnik-client", +] + +[[package]] +name = "fuzz_example2" +version = "0.1.0" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "goblin" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util 0.7.10", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "honggfuzz" +version = "0.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2", + "rustc_version", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls 0.21.10", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "index_list" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.3", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +dependencies = [ + "num_enum_derive 0.7.1", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +dependencies = [ + "proc-macro-crate 2.0.1", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "pretty-hex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "program_client" +version = "0.1.0" +dependencies = [ + "fuzz_example2", + "trdelnik-client", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "arbitrary", + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2 1.0.71", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom 0.2.11", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "async-compression", + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util 0.7.10", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.3", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "serde_yaml" +version = "0.9.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" +dependencies = [ + "indexmap 2.1.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "solana-account-decoder" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1061ae0eecf24b58e57abce2fad5b962092887c6afcfd14ce8cc24818dac7ae4" +dependencies = [ + "Inflector", + "base64 0.21.5", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "spl-token", + "spl-token-2022", + "spl-token-metadata-interface", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a8cfddfed87fae43af3a539171267f8d47fd9a1f9a8e3fd2b7508b52ebb593" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-banks-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78fa99fb3c089a5ecc455c1b6eff7aed6833782ccffe8c2c35bc75138efe55c7" +dependencies = [ + "borsh 0.10.3", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6855f9fb2bbcaa5db359701bad0f4fa39647a21b2899db54d8843d64c26c5359" +dependencies = [ + "serde", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-banks-server" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b013dd7bc7b6a46b04c7ba2180c0814709b6a7dfe1365827d8c6b759bf538b73" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98a1e2ca4df9b8d33eaa97576f0e8041b6f9c907772fe35b170c1eead5382e2" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-bucket-map" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a6f74d4215c0425c732ade3371639bda4c16a723b5ac33a91cb634f0acc376" +dependencies = [ + "bv", + "log", + "memmap2", + "modular-bitfield", + "num_enum 0.6.1", + "rand 0.7.3", + "solana-measure", + "solana-sdk", + "tempfile", +] + +[[package]] +name = "solana-clap-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8460c35e48160995b9e6c377f8fd08ce478cae833decb1d54214253e76321f0" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25a9c58e392288570294d45544fe39ed1c2b4d0bcb8e5552deaa3e85ffcea9b" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-cli-output" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede6a6d9798a56a08e1cfaee2ca92ba93c631af8ff7d1e46998513dc31013c02" +dependencies = [ + "Inflector", + "base64 0.21.5", + "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.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffe77e35669aeda1c640153e8c7bc15b9b725e8957fd5911022980952e1dddb" +dependencies = [ + "async-trait", + "bincode", + "futures", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "quinn", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-compute-budget-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed90e87a7381cc4a93cd63c52fff8f60796144c797f7d2548efa0856e3cc35a" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-config-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "103c05b62d8b321cf3a3531a2b96ebb105df4eac2f80f26a7205d6bd7b9882ce" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-connection-cache" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c3df783562f7bca6d35c9d5dd17db3a1e7f22d54144d4180f1db5ccb3fdf0" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "log", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d229588852b514378c88ea74ef6fb93c5575758d2aa3a6a300872ccf5be51772" +dependencies = [ + "ahash 0.8.6", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad75a8290906967a9737c76bb5cc9769cee2097a6a6fbda08017562454ead020" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustc_version", + "syn 2.0.43", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0956aca0aa3a990a9bb341e13b541f1f18284db252f06185dbb7d040cb564c0" +dependencies = [ + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + +[[package]] +name = "solana-logger" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4896bca227a92b31c7be15f524850aba3255d94dcb837a4097daba723a84757" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b0389a4a6f956173904d7ad0eb5058723c25d68d7c75bdc434637e8a4e08a3" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7a9cbc8b9d706398e7653123c526aba0ffbf4bf4184e0190cdba386c8b600c" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f987bdd6a27eb48320f409b020f9d2646a2ec0ca8d9361de53be759bdd209e65" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.4.10", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897cee370814792aff81ae93578ead9e5bd35b2f7e45a956aa2b12536f6d81e3" +dependencies = [ + "ahash 0.8.6", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de52673b07eda66299b6ff858c54f3d08bdf4addc5c56969f0a94a09bb63f853" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.5", + "bincode", + "bitflags 1.3.2", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.11", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.9.0", + "num-bigint 0.4.4", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1046f13174ed22f56fa8658265dc952372407772c7bb3d8f60505afa1b30c1" +dependencies = [ + "base64 0.21.5", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "log", + "num-derive 0.3.3", + "num-traits", + "percentage", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-program-test" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b21eb50e63a6904a4b3dc0a265e61f10b83e0c9076d0e2a57b8279c928b712e" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.5", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a09f7e643a075001dc7362955b829181e027ff23b12049f576277e2ffb1d0a0c" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2c1955a009913174433ba086590b9baf785d7023248abf11b42534b1ac70e53" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls 0.20.9", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856ff9020c43ae49ed341572454e8b33d400c787f9f2a9f48783f3607c7e399a" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56a5a567539d6585acc0a0038da5f1350cfca6574272fef545988a469e87286b" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-rpc-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54fda1c759f8aa828052659ff1553d0383e721676110842b69e5e0ae997d6441" +dependencies = [ + "async-trait", + "base64 0.21.5", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29959e74308d074a88339712cf407a091bc9382a67298b8a83f02d0279aca1e" +dependencies = [ + "base64 0.21.5", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b14d3733afbe844ec9a6210982e7ea7bda23b5bce4af637e08a7a92f78b4b4" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c251f2b7656e22f31f4feb389e269015dde50fda994eea115ce0df8c4d27280" +dependencies = [ + "arrayref", + "base64 0.21.5", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive 0.3.3", + "num-traits", + "num_cpus", + "num_enum 0.6.1", + "once_cell", + "ouroboros", + "percentage", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d5e51b30ff694f1353755b0e1672bc01a6b72ad12353fac4e53957a2a1f783" +dependencies = [ + "assert_matches", + "base64 0.21.5", + "bincode", + "bitflags 1.3.2", + "borsh 0.10.3", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5c5ae1f2b5e7dec7dcab0199a642e1900b981c156547942156c5c4fbcc3eafa" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustversion", + "syn 2.0.43", +] + +[[package]] +name = "solana-send-transaction-service" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5360bf4af2b98b8cfea90cd497490c3741e4f822c4fa75a4b4aba4f58414c0c2" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3abec79a2978cbd92567edbaf71bf7be16b0275123c1a67b5bb3902ea26b3e" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-streamer" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e552da2c1b63fed220858d4cf6dd585d8a5175a1e0a5fafbc56dda21630d57" +dependencies = [ + "async-channel", + "bytes", + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 1.9.3", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "quinn-proto", + "quinn-udp", + "rand 0.7.3", + "rcgen", + "rustls 0.20.9", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-system-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ed773979d7a5ccef68083f526f58c1196d8942f9f7e8f5f8dee744a1053fda" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c7d72a9ea3ac06bdcee2511c99fc14470edf0bda3d629cc50758438c2580b4" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cb713f3fd335ce1b3699314027605ca80231e9347ad1d09e1b7e1c58bf31d3" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-transaction-status" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e13704102abe15f421d6a59e65db6d8aa0c1a61540ab1c744c5ce58a086bc1c" +dependencies = [ + "Inflector", + "base64 0.21.5", + "bincode", + "borsh 0.10.3", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-sdk", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-udp-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96136ce9b671d9a0dc3c1231236fa2fa8aa5b7379c53449eb9bcb2214b6e8455" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32dc5d88030e9930b5e306e3562e7c81347165b42dc3ad6586d4ce91c9bba70a" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520cb33e0d3bf61075ca7919a5ec30ad34e95e1f467ecc1bea55d5a1f887cc88" +dependencies = [ + "bincode", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96da20016bf0e9d59cc2d262871d810f396fdda31fee7175c934d6f92cc3be8b" +dependencies = [ + "bytemuck", + "getrandom 0.1.16", + "num-derive 0.3.3", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66b682b70d18374f8619a1e61ec461d481d5ee7dc2057d53d7370176f41027c" +dependencies = [ + "aes-gcm-siv", + "base64 0.21.5", + "bincode", + "bytemuck", + "byteorder", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive 0.3.3", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "solana_rbpf" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" +dependencies = [ + "quote 1.0.33", + "spl-discriminator-syn", + "syn 2.0.43", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.43", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + +[[package]] +name = "spl-program-error" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.43", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.1", + "num-traits", + "num_enum 0.7.1", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", +] + +[[package]] +name = "spl-type-length-value" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "unicode-xid 0.2.4", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tarpc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" +dependencies = [ + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", +] + +[[package]] +name = "tarpc-plugins" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "termcolor" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls 0.20.9", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls 0.20.9", + "tokio", + "tokio-rustls 0.23.4", + "tungstenite", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap 1.9.3", + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "trdelnik-client" +version = "0.5.0" +dependencies = [ + "anchor-client", + "anchor-lang", + "anyhow", + "arbitrary", + "bincode", + "borsh 0.10.3", + "cargo_metadata", + "ed25519-dalek", + "fehler", + "futures", + "heck 0.4.1", + "honggfuzz", + "indicatif", + "log", + "pathdiff", + "quinn-proto", + "quote 1.0.33", + "serde", + "serde_json", + "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", + "toml", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.20.9", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "unsafe-libyaml" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote 1.0.33", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dae5072fe1f8db8f8d29059189ac175196e410e40ba42d5d4684ae2f750995" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.43", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/examples/fuzz_example2/Cargo.toml b/examples/fuzz_example2/Cargo.toml new file mode 100644 index 00000000..f077205f --- /dev/null +++ b/examples/fuzz_example2/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +members = ["programs/*"] +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 + +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/examples/fuzz_example2/Trdelnik.toml b/examples/fuzz_example2/Trdelnik.toml new file mode 100644 index 00000000..e6803594 --- /dev/null +++ b/examples/fuzz_example2/Trdelnik.toml @@ -0,0 +1,30 @@ +[test] +validator_startup_timeout = 15000 + + +# contains default values +[fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) +iterations = 0 +# 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) +keep_output = false +# Disable ANSI console; use simple log output (default: false) +verbose = false +# Exit upon seeing the first crash (default: false) +exit_upon_crash = false +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false diff --git a/examples/fuzz_example2/migrations/deploy.ts b/examples/fuzz_example2/migrations/deploy.ts new file mode 100644 index 00000000..82fb175f --- /dev/null +++ b/examples/fuzz_example2/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/examples/fuzz_example2/package-lock.json b/examples/fuzz_example2/package-lock.json new file mode 100644 index 00000000..182a8549 --- /dev/null +++ b/examples/fuzz_example2/package-lock.json @@ -0,0 +1,1883 @@ +{ + "name": "fuzz_example2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@coral-xyz/anchor": "^0.28.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.1.1", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } + }, + "node_modules/@babel/runtime": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.6.tgz", + "integrity": "sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@coral-xyz/anchor": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.28.0.tgz", + "integrity": "sha512-kQ02Hv2ZqxtWP30WN1d4xxT4QqlOXYDxmEd3k/bbneqhV3X5QMO4LAtoUFs7otxyivOgoqam5Il5qx81FuI4vw==", + "dependencies": { + "@coral-xyz/borsh": "^0.28.0", + "@solana/web3.js": "^1.68.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "js-sha256": "^0.9.0", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, + "node_modules/@coral-xyz/borsh": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.28.0.tgz", + "integrity": "sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ==", + "dependencies": { + "bn.js": "^5.1.2", + "buffer-layout": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@solana/web3.js": "^1.68.0" + } + }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "dependencies": { + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" + } + }, + "node_modules/@solana/web3.js": { + "version": "1.87.6", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.87.6.tgz", + "integrity": "sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.1", + "@solana/buffer-layout": "^4.0.0", + "agentkeepalive": "^4.3.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.6.12", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + } + }, + "node_modules/@solana/web3.js/node_modules/superstruct": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.14.2.tgz", + "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" + }, + "node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz", + "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==", + "dev": true + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "optional": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "dev": true + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/borsh": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz", + "integrity": "sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==", + "dependencies": { + "bn.js": "^5.2.0", + "bs58": "^4.0.0", + "text-encoding-utf-8": "^1.0.2" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/buffer-layout": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", + "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", + "engines": { + "node": ">=4.5" + } + }, + "node_modules/bufferutil": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/crypto-hash": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz", + "integrity": "sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "dependencies": { + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" + }, + "node_modules/js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "optional": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", + "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "dev": true, + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.3", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "4.2.1", + "ms": "2.1.3", + "nanoid": "3.3.1", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "workerpool": "6.2.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nanoid": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", + "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", + "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rpc-websockets": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", + "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", + "dependencies": { + "@babel/runtime": "^7.17.2", + "eventemitter3": "^4.0.7", + "uuid": "^8.3.2", + "ws": "^8.5.0" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/kozjak" + }, + "optionalDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + } + }, + "node_modules/rpc-websockets/node_modules/ws": { + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", + "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/superstruct": { + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz", + "integrity": "sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ==" + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-encoding-utf-8": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", + "integrity": "sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz", + "integrity": "sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==", + "dev": true, + "dependencies": { + "ts-node": "7.0.1" + }, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "optionalDependencies": { + "tsconfig-paths": "^3.5.0" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" + } + }, + "node_modules/ts-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", + "dev": true, + "dependencies": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + }, + "bin": { + "ts-node": "dist/bin.js" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "optional": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", + "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/examples/fuzz_example2/package.json b/examples/fuzz_example2/package.json new file mode 100644 index 00000000..f89aea07 --- /dev/null +++ b/examples/fuzz_example2/package.json @@ -0,0 +1,19 @@ +{ + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.28.0" + }, + "devDependencies": { + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.1.1", + "chai": "^4.3.4", + "mocha": "^9.0.3", + "prettier": "^2.6.2", + "ts-mocha": "^10.0.0", + "typescript": "^4.3.5" + } +} diff --git a/examples/fuzz_example2/programs/fuzz_example2/Cargo.toml b/examples/fuzz_example2/programs/fuzz_example2/Cargo.toml new file mode 100644 index 00000000..83e49e2e --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "fuzz_example2" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "fuzz_example2" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +anchor-lang = "0.28.0" diff --git a/examples/fuzz_example2/programs/fuzz_example2/Xargo.toml b/examples/fuzz_example2/programs/fuzz_example2/Xargo.toml new file mode 100644 index 00000000..475fb71e --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/examples/fuzz_example2/programs/fuzz_example2/src/instructions/initialize.rs b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/initialize.rs new file mode 100644 index 00000000..a1fc7979 --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/initialize.rs @@ -0,0 +1,56 @@ +use anchor_lang::{prelude::*, system_program}; + +use crate::state::{Escrow, ESCROW_SEED}; + +use super::MyStruct; + +pub fn _initialize( + ctx: Context, + receiver: Pubkey, + amount: u64, + options: AnotherOptions, + i_struct: MyStruct, +) -> Result<()> { + let escorw = &mut ctx.accounts.escrow; + + escorw.author = ctx.accounts.author.key(); + escorw.amount = amount; + escorw.receiver = receiver; + escorw.bump = *ctx.bumps.get("escrow").unwrap(); + + system_program::transfer( + CpiContext::new( + ctx.accounts.system_program.to_account_info(), + system_program::Transfer { + from: ctx.accounts.author.to_account_info(), + to: ctx.accounts.escrow.to_account_info(), + }, + ), + amount, + )?; + + Ok(()) +} + +#[derive(Accounts)] +#[instruction(receiver: Pubkey)] +pub struct Initialize<'info> { + #[account(mut)] + pub author: Signer<'info>, + #[account( + init, + payer = author, + space = 8 + Escrow::LEN, + seeds = [author.key().as_ref(),receiver.as_ref(),ESCROW_SEED.as_ref()], + bump + )] + pub escrow: Account<'info, Escrow>, + pub system_program: Program<'info, System>, +} + +#[derive(AnchorDeserialize, AnchorSerialize, Clone)] +pub enum AnotherOptions { + Option1, + Option2, + Option3, +} diff --git a/examples/fuzz_example2/programs/fuzz_example2/src/instructions/mod.rs b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/mod.rs new file mode 100644 index 00000000..6b2f8f8c --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/mod.rs @@ -0,0 +1,5 @@ +pub mod initialize; +pub mod withdraw; + +pub use initialize::*; +pub use withdraw::*; diff --git a/examples/fuzz_example2/programs/fuzz_example2/src/instructions/withdraw.rs b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/withdraw.rs new file mode 100644 index 00000000..9cf07af9 --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/src/instructions/withdraw.rs @@ -0,0 +1,30 @@ +use crate::state::{Escrow, ESCROW_SEED}; +use anchor_lang::prelude::*; + +pub fn _withdraw(_ctx: Context) -> Result<()> { + // close will transfer everything to the receiver + Ok(()) +} + +#[derive(Accounts)] +pub struct Withdraw<'info> { + #[account(mut)] + pub receiver: Signer<'info>, + #[account( + mut, + close = receiver, + // seed is derived from saved receiver not from context receiver + seeds = [escrow.author.key().as_ref(),escrow.receiver.as_ref(),ESCROW_SEED.as_ref()], + bump = escrow.bump, + )] + pub escrow: Account<'info, Escrow>, + pub system_program: Program<'info, System>, +} + +#[derive(AnchorDeserialize, AnchorSerialize, Clone)] + +pub struct MyStruct { + pub input1: u64, + pub input2: u64, + pub input3: u64, +} diff --git a/examples/fuzz_example2/programs/fuzz_example2/src/lib.rs b/examples/fuzz_example2/programs/fuzz_example2/src/lib.rs new file mode 100644 index 00000000..116d638b --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/src/lib.rs @@ -0,0 +1,27 @@ +use anchor_lang::prelude::*; + +pub mod instructions; +pub mod state; + +use crate::instructions::*; + +declare_id!("7fd3w1z9biVCPkAJ8AtLVLUCv2WQjFvDPg27Z2tJmFVe"); + +#[program] +pub mod fuzz_example2 { + + use super::*; + + pub fn initialize( + ctx: Context, + receiver: Pubkey, + amount: u64, + option: AnotherOptions, + i_struct: MyStruct, + ) -> Result<()> { + _initialize(ctx, receiver, amount, option, i_struct) + } + pub fn withdraw(ctx: Context) -> Result<()> { + _withdraw(ctx) + } +} diff --git a/examples/fuzz_example2/programs/fuzz_example2/src/state.rs b/examples/fuzz_example2/programs/fuzz_example2/src/state.rs new file mode 100644 index 00000000..fb79a052 --- /dev/null +++ b/examples/fuzz_example2/programs/fuzz_example2/src/state.rs @@ -0,0 +1,15 @@ +use anchor_lang::prelude::*; + +pub const ESCROW_SEED: &str = "escrow_seed"; + +#[account] +pub struct Escrow { + pub author: Pubkey, + pub receiver: Pubkey, + pub amount: u64, + pub bump: u8, +} + +impl Escrow { + pub const LEN: usize = 32 + 32 + 8 + 1; +} diff --git a/examples/fuzz_example2/tests/fuzz_example2.ts b/examples/fuzz_example2/tests/fuzz_example2.ts new file mode 100644 index 00000000..21553177 --- /dev/null +++ b/examples/fuzz_example2/tests/fuzz_example2.ts @@ -0,0 +1,109 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { FuzzExample2 } from "../target/types/fuzz_example2"; +import { assert } from "chai"; + + +const ESCROW_SEED = "escrow_seed"; + + +describe("fuzz_example2", () => { + // Configure the client to use the local cluster. + const provider = anchor.AnchorProvider.env() + anchor.setProvider(provider); + + const program = anchor.workspace.FuzzExample2 as Program; + + + const author = anchor.web3.Keypair.generate(); + const receiver = anchor.web3.Keypair.generate(); + const hacker = anchor.web3.Keypair.generate(); + + const amount = new anchor.BN(100); + + it("Initialize", async () => { + await airdrop(provider.connection, author.publicKey); + + const [escrow, escrow_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + author.publicKey.toBuffer(), + receiver.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(ESCROW_SEED), + ], program.programId) + + + + + await program.methods.initialize(receiver.publicKey, amount).accounts({ + author: author.publicKey, + escrow: escrow, + }).signers([author]).rpc({ commitment: "confirmed" }); + + + const escrowData = await program.account.escrow.fetch(escrow); + const escorwBalance = await provider.connection.getBalance(escrow); + + const escrowRent = await provider.connection.getMinimumBalanceForRentExemption(program.account.escrow.size); + + assert.strictEqual(escrowData.author.toString(), author.publicKey.toString()); + assert.strictEqual(escrowData.amount.toString(), amount.toString()); + assert.strictEqual(escrowData.receiver.toString(), receiver.publicKey.toString()); + assert.strictEqual(escorwBalance.toString(), amount.addn(escrowRent).toString()); + + }); + + it.skip("Withdraw", async () => { + await airdrop(provider.connection, receiver.publicKey); + + const [escrow, escrow_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + author.publicKey.toBuffer(), + receiver.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(ESCROW_SEED), + ], program.programId) + + const receiverBalanceBefore = await provider.connection.getBalance(receiver.publicKey); + + + await program.methods.withdraw().accounts({ + receiver: receiver.publicKey, + escrow: escrow + }).signers([receiver]).rpc({ commitment: "confirmed" }); + + + const escrowRent = await provider.connection.getMinimumBalanceForRentExemption(program.account.escrow.size); + const receiverBalanceAfter = await provider.connection.getBalance(receiver.publicKey); + + assert.strictEqual((receiverBalanceAfter - receiverBalanceBefore).toString(), amount.addn(escrowRent).toString()); + + }); + + it("Withdraw Hacker", async () => { + await airdrop(provider.connection, hacker.publicKey); + + const [escrow, escrow_bump] = anchor.web3.PublicKey.findProgramAddressSync([ + author.publicKey.toBuffer(), + receiver.publicKey.toBuffer(), + anchor.utils.bytes.utf8.encode(ESCROW_SEED), + ], program.programId) + + const hackerBalanceBefore = await provider.connection.getBalance(hacker.publicKey); + + + await program.methods.withdraw().accounts({ + receiver: hacker.publicKey, + escrow: escrow + }).signers([hacker]).rpc({ commitment: "confirmed" }); + + + const escrowRent = await provider.connection.getMinimumBalanceForRentExemption(program.account.escrow.size); + const hackerBalanceAfter = await provider.connection.getBalance(hacker.publicKey); + + assert.strictEqual((hackerBalanceAfter - hackerBalanceBefore).toString(), amount.addn(escrowRent).toString()); + + }); +}); + + + +async function airdrop(connection: any, address: any, amount = 1000000000) { + await connection.confirmTransaction(await connection.requestAirdrop(address, amount), "confirmed"); +} diff --git a/examples/fuzz_example2/tsconfig.json b/examples/fuzz_example2/tsconfig.json new file mode 100644 index 00000000..558b83e5 --- /dev/null +++ b/examples/fuzz_example2/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } + } + \ No newline at end of file diff --git a/examples/fuzz_example2/yarn.lock b/examples/fuzz_example2/yarn.lock new file mode 100644 index 00000000..64537cf7 --- /dev/null +++ b/examples/fuzz_example2/yarn.lock @@ -0,0 +1,2322 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.23.2": + version: 7.23.6 + resolution: "@babel/runtime@npm:7.23.6" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 1a8eaf3d3a103ef5227b60ca7ab5c589118c36ca65ef2d64e65380b32a98a3f3b5b3ef96660fa0471b079a18b619a8317f3e7f03ab2b930c45282a8b69ed9a16 + languageName: node + linkType: hard + +"@coral-xyz/anchor@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/anchor@npm:0.28.0" + dependencies: + "@coral-xyz/borsh": ^0.28.0 + "@solana/web3.js": ^1.68.0 + base64-js: ^1.5.1 + bn.js: ^5.1.2 + bs58: ^4.0.1 + buffer-layout: ^1.2.2 + camelcase: ^6.3.0 + cross-fetch: ^3.1.5 + crypto-hash: ^1.3.0 + eventemitter3: ^4.0.7 + js-sha256: ^0.9.0 + pako: ^2.0.3 + snake-case: ^3.0.4 + superstruct: ^0.15.4 + toml: ^3.0.0 + checksum: 58b3677b5b2ce2c779045184ce4a0ef696966a6a58f41c1c56f6f178db0491acecb6ec677ce0502f0b382a2c724f9c2860d82cc88601784d556d95fbeda415e5 + languageName: node + linkType: hard + +"@coral-xyz/borsh@npm:^0.28.0": + version: 0.28.0 + resolution: "@coral-xyz/borsh@npm:0.28.0" + dependencies: + bn.js: ^5.1.2 + buffer-layout: ^1.2.0 + peerDependencies: + "@solana/web3.js": ^1.68.0 + checksum: bc2b06b777f9ed43d3b886d2350826bd44d5b932c4fd4471af5956e8755236f5854938c890ee4986d88f61d1439e1d84e715c43dcb6dca4e76198c1ce8dc7a58 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: ^5.1.2 + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: ^7.0.1 + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: ^8.1.0 + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 4a473b9b32a7d4d3cfb7a614226e555091ff0c5a29a1734c28c72a182c2f6699b26fc6b5c2131dfd841e86b185aea714c72201d7c98c2fba5f17709333a67aeb + languageName: node + linkType: hard + +"@noble/curves@npm:^1.2.0": + version: 1.3.0 + resolution: "@noble/curves@npm:1.3.0" + dependencies: + "@noble/hashes": 1.3.3 + checksum: b65342ee66c4a440eee2978524412eabba9a9efdd16d6370e15218c6a7d80bddf35e66bb57ed52c0dfd32cb9a717b439ab3a72db618f1a0066dfebe3fd12a421 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.1": + version: 1.3.3 + resolution: "@noble/hashes@npm:1.3.3" + checksum: 8a6496d1c0c64797339bc694ad06cdfaa0f9e56cd0c3f68ae3666cfb153a791a55deb0af9c653c7ed2db64d537aa3e3054629740d2f2338bb1dcb7ab60cd205b + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.0 + resolution: "@npmcli/agent@npm:2.2.0" + dependencies: + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.1 + checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/fs@npm:3.1.0" + dependencies: + semver: ^7.3.5 + checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 6ad6a00fc4f2f2cfc6bff76fb1d88b8ee20bc0601e18ebb01b6d4be583733a860239a521a7fbca73b612e66705078809483549d2b18f370eb346c5155c8e4a0f + languageName: node + linkType: hard + +"@solana/buffer-layout@npm:^4.0.0": + version: 4.0.1 + resolution: "@solana/buffer-layout@npm:4.0.1" + dependencies: + buffer: ~6.0.3 + checksum: bf846888e813187243d4008a7a9f58b49d16cbd995b9d7f1b72898aa510ed77b1ce5e8468e7b2fd26dd81e557a4e74a666e21fccb95f123c1f740d41138bbacd + languageName: node + linkType: hard + +"@solana/web3.js@npm:^1.68.0": + version: 1.87.6 + resolution: "@solana/web3.js@npm:1.87.6" + dependencies: + "@babel/runtime": ^7.23.2 + "@noble/curves": ^1.2.0 + "@noble/hashes": ^1.3.1 + "@solana/buffer-layout": ^4.0.0 + agentkeepalive: ^4.3.0 + bigint-buffer: ^1.1.5 + bn.js: ^5.2.1 + borsh: ^0.7.0 + bs58: ^4.0.1 + buffer: 6.0.3 + fast-stable-stringify: ^1.0.0 + jayson: ^4.1.0 + node-fetch: ^2.6.12 + rpc-websockets: ^7.5.1 + superstruct: ^0.14.2 + checksum: 182eb2a953f6ebebdfbc7dfda031d1985fb1591a2aa38b388d5dfb9fd3df0fb53a3962373384dbd91df343e148ec3d42a579324effab9ca86f0560c4f6f08481 + languageName: node + linkType: hard + +"@types/bn.js@npm:^5.1.0": + version: 5.1.5 + resolution: "@types/bn.js@npm:5.1.5" + dependencies: + "@types/node": "*" + checksum: c87b28c4af74545624f8a3dae5294b16aa190c222626e8d4b2e327b33b1a3f1eeb43e7a24d914a9774bca43d8cd6e1cb0325c1f4b3a244af6693a024e1d918e6 + languageName: node + linkType: hard + +"@types/chai@npm:^4.3.0": + version: 4.3.11 + resolution: "@types/chai@npm:4.3.11" + checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 + languageName: node + linkType: hard + +"@types/connect@npm:^3.4.33": + version: 3.4.38 + resolution: "@types/connect@npm:3.4.38" + dependencies: + "@types/node": "*" + checksum: 7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 + languageName: node + linkType: hard + +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac + languageName: node + linkType: hard + +"@types/mocha@npm:^9.1.1": + version: 9.1.1 + resolution: "@types/mocha@npm:9.1.1" + checksum: 516077c0acd9806dc78317f88aaac0df5aaf0bdc2f63dfdadeabdf0b0137953b6ca65472e6ff7c30bc93ce4e0ae76eae70e8d46764b9a8eae4877a928b6ef49a + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.10.5 + resolution: "@types/node@npm:20.10.5" + dependencies: + undici-types: ~5.26.4 + checksum: e216b679f545a8356960ce985a0e53c3a58fff0eacd855e180b9e223b8db2b5bd07b744a002b8c1f0c37f9194648ab4578533b5c12df2ec10cc02f61d20948d2 + languageName: node + linkType: hard + +"@types/node@npm:^12.12.54": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + +"@types/ws@npm:^7.4.4": + version: 7.4.7 + resolution: "@types/ws@npm:7.4.7" + dependencies: + "@types/node": "*" + checksum: b4c9b8ad209620c9b21e78314ce4ff07515c0cadab9af101c1651e7bfb992d7fd933bd8b9c99d110738fd6db523ed15f82f29f50b45510288da72e964dedb1a3 + languageName: node + linkType: hard + +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 08d37fdfa23a6fe8139f1305313562ebad973f3fac01bcce2773b2bda5bcb0146dfdcf3cb6a722cf0a5f2ca0bc56a827eac8f1e7b3beddc548f654addf1fc34c + languageName: node + linkType: hard + +"JSONStream@npm:^1.3.5": + version: 1.3.5 + resolution: "JSONStream@npm:1.3.5" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: 2605fa124260c61bad38bb65eba30d2f72216a78e94d0ab19b11b4e0327d572b8d530c0c9cc3b0764f727ad26d39e00bf7ebad57781ca6368394d73169c59e46 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": + version: 7.1.0 + resolution: "agent-base@npm:7.1.0" + dependencies: + debug: ^4.3.4 + checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + languageName: node + linkType: hard + +"agentkeepalive@npm:^4.3.0": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: ^1.2.1 + checksum: 13278cd5b125e51eddd5079f04d6fe0914ac1b8b91c1f3db2c1822f99ac1a7457869068997784342fe455d59daaff22e14fb7b8c3da4e741896e7e31faf92481 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: ^2.0.0 + indent-string: ^4.0.0 + checksum: 1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: ^2.0.1 + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: ^3.0.0 + picomatch: ^2.0.4 + checksum: 3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced + languageName: node + linkType: hard + +"arrify@npm:^1.0.0": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 + languageName: node + linkType: hard + +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"base-x@npm:^3.0.2": + version: 3.0.9 + resolution: "base-x@npm:3.0.9" + dependencies: + safe-buffer: ^5.0.1 + checksum: 957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 + languageName: node + linkType: hard + +"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005 + languageName: node + linkType: hard + +"bigint-buffer@npm:^1.1.5": + version: 1.1.5 + resolution: "bigint-buffer@npm:1.1.5" + dependencies: + bindings: ^1.3.0 + node-gyp: latest + checksum: d010c9f57758bcdaccb435d88b483ffcc95fe8bbc6e7fb3a44fb5221f29c894ffaf4a3c5a4a530e0e7d6608203c2cde9b79ee4f2386cd6d4462d1070bc8c9f4e + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.2.0 + resolution: "binary-extensions@npm:2.2.0" + checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + languageName: node + linkType: hard + +"bindings@npm:^1.3.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: 1.0.0 + checksum: 65b6b48095717c2e6105a021a7da4ea435aa8d3d3cd085cb9e85bcb6e5773cf318c4745c3f7c504412855940b585bdf9b918236612a1c7a7942491de176f1ae7 + languageName: node + linkType: hard + +"bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": + version: 5.2.1 + resolution: "bn.js@npm:5.2.1" + checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 + languageName: node + linkType: hard + +"borsh@npm:^0.7.0": + version: 0.7.0 + resolution: "borsh@npm:0.7.0" + dependencies: + bn.js: ^5.2.0 + bs58: ^4.0.0 + text-encoding-utf-8: ^1.0.2 + checksum: e98bfb5f7cfb820819c2870b884dac58dd4b4ce6a86c286c8fbf5c9ca582e73a8c6094df67e81a28c418ff07a309c6b118b2e27fdfea83fd92b8100c741da0b5 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: ^1.0.0 + concat-map: 0.0.1 + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: ^1.0.0 + checksum: a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:~3.0.2": + version: 3.0.2 + resolution: "braces@npm:3.0.2" + dependencies: + fill-range: ^7.0.1 + checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + languageName: node + linkType: hard + +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: b717b19b25952dd6af483e368f9bcd6b14b87740c3d226c2977a65e84666ffd67000bddea7d911f111a9b6ddc822b234de42d52ab6507bce4119a4cc003ef7b3 + languageName: node + linkType: hard + +"bs58@npm:^4.0.0, bs58@npm:^4.0.1": + version: 4.0.1 + resolution: "bs58@npm:4.0.1" + dependencies: + base-x: ^3.0.2 + checksum: b3c5365bb9e0c561e1a82f1a2d809a1a692059fae016be233a6127ad2f50a6b986467c3a50669ce4c18929dcccb297c5909314dd347a25a68c21b68eb3e95ac2 + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"buffer-layout@npm:^1.2.0, buffer-layout@npm:^1.2.2": + version: 1.2.2 + resolution: "buffer-layout@npm:1.2.2" + checksum: e5809ba275530bf4e52fd09558b7c2111fbda5b405124f581acf364261d9c154e271800271898cd40473f9bcbb42c31584efb04219bde549d3460ca4bafeaa07 + languageName: node + linkType: hard + +"buffer@npm:6.0.3, buffer@npm:~6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + +"bufferutil@npm:^4.0.1": + version: 4.0.8 + resolution: "bufferutil@npm:4.0.8" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 7e9a46f1867dca72fda350966eb468eca77f4d623407b0650913fadf73d5750d883147d6e5e21c56f9d3b0bdc35d5474e80a600b9f31ec781315b4d2469ef087 + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.1 + resolution: "cacache@npm:18.0.1" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: 5a0b3b2ea451a0379814dc1d3c81af48c7c6db15cd8f7d72e028501ae0036a599a99bbac9687bfec307afb2760808d1c7708e9477c8c70d2b166e7d80b162a23 + languageName: node + linkType: hard + +"camelcase@npm:^6.0.0, camelcase@npm:^6.3.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"chai@npm:^4.3.4": + version: 4.3.10 + resolution: "chai@npm:4.3.10" + dependencies: + assertion-error: ^1.1.0 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 + pathval: ^1.1.1 + type-detect: ^4.0.8 + checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: ^2.0.2 + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + +"chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: ~3.1.2 + braces: ~3.0.2 + fsevents: ~2.3.2 + glob-parent: ~5.1.2 + is-binary-path: ~2.1.0 + is-glob: ~4.0.1 + normalize-path: ~3.0.0 + readdirp: ~3.6.0 + dependenciesMeta: + fsevents: + optional: true + checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^7.0.0 + checksum: ce2e8f578a4813806788ac399b9e866297740eecd4ad1823c27fd344d78b22c5f8597d548adbcc46f0573e43e21e751f39446c5a5e804a12aace402b7a315d7f + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: ~1.1.4 + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"commander@npm:^2.20.3": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: ab8c07884e42c3a8dbc5dd9592c606176c7eb5c1ca5ff274bcf907039b2c41de3626f684ea75ccf4d361ba004bbaff1f577d5384c155f3871e456bdf27becf9e + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"cross-fetch@npm:^3.1.5": + version: 3.1.8 + resolution: "cross-fetch@npm:3.1.8" + dependencies: + node-fetch: ^2.6.12 + checksum: 78f993fa099eaaa041122ab037fe9503ecbbcb9daef234d1d2e0b9230a983f64d645d088c464e21a247b825a08dc444a6e7064adfa93536d3a9454b4745b3632 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: ^3.1.0 + shebang-command: ^2.0.0 + which: ^2.0.1 + checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52 + languageName: node + linkType: hard + +"crypto-hash@npm:^1.3.0": + version: 1.3.0 + resolution: "crypto-hash@npm:1.3.0" + checksum: a3a507e0d2b18fbd2da8088a1c62d0c53c009a99bbfa6d851cac069734ffa546922fa51bdd776d006459701cdda873463e5059ece3431aca048fd99e7573d138 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16 + languageName: node + linkType: hard + +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: ^4.0.0 + checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f + languageName: node + linkType: hard + +"delay@npm:^5.0.0": + version: 5.0.0 + resolution: "delay@npm:5.0.0" + checksum: 62f151151ecfde0d9afbb8a6be37a6d103c4cb24f35a20ef3fe56f920b0d0d0bb02bc9c0a3084d0179ef669ca332b91155f2ee4d9854622cd2cdba5fc95285f9 + languageName: node + linkType: hard + +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 + languageName: node + linkType: hard + +"diff@npm:^3.1.0": + version: 3.5.0 + resolution: "diff@npm:3.5.0" + checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b + languageName: node + linkType: hard + +"dot-case@npm:^3.0.4": + version: 3.0.4 + resolution: "dot-case@npm:3.0.4" + dependencies: + no-case: ^3.0.4 + tslib: ^2.0.3 + checksum: a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 7d00d7cd8e49b9afa762a813faac332dee781932d6f2c848dc348939c4253f1d4564341b7af1d041853bc3f32c2ef141b58e0a4d9862c17a7f08f68df1e0f1ed + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: ^0.6.2 + checksum: bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 8b7b1be20d2de12d2255c0bc2ca638b7af5171142693299416e6a9339bd7d88fc8d7707d913d78e0993176005405a236b066b45666b27b797252c771156ace54 + languageName: node + linkType: hard + +"es6-promise@npm:^4.0.3": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-promisify@npm:^5.0.0": + version: 5.0.0 + resolution: "es6-promisify@npm:5.0.0" + dependencies: + es6-promise: ^4.0.3 + checksum: fbed9d791598831413be84a5374eca8c24800ec71a16c1c528c43a98e2dadfb99331483d83ae6094ddb9b87e6f799a15d1553cebf756047e0865c753bc346b92 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 + languageName: node + linkType: hard + +"escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"eventemitter3@npm:^4.0.7": + version: 4.0.7 + resolution: "eventemitter3@npm:4.0.7" + checksum: 1875311c42fcfe9c707b2712c32664a245629b42bb0a5a84439762dd0fd637fc54d078155ea83c2af9e0323c9ac13687e03cfba79b03af9f40c89b4960099374 + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + +"eyes@npm:^0.1.8": + version: 0.1.8 + resolution: "eyes@npm:0.1.8" + checksum: c31703a92bf36ba75ee8d379ee7985c24ee6149f3a6175f44cec7a05b178c38bce9836d3ca48c9acb0329a960ac2c4b2ead4e60cdd4fe6e8c92cad7cd6913687 + languageName: node + linkType: hard + +"fast-stable-stringify@npm:^1.0.0": + version: 1.0.0 + resolution: "fast-stable-stringify@npm:1.0.0" + checksum: ef1203d246a7e8ac15e2bfbda0a89fa375947bccf9f7910be0ea759856dbe8ea5024a0d8cc2cceabe18a9cb67e95927b78bb6173a3ae37ec55a518cf36e5244b + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: b648580bdd893a008c92c7ecc96c3ee57a5e7b6c4c18a9a09b44fb5d36d79146f8e442578bc0e173dc027adf3987e254ba1dfd6e3ec998b7c282873010502144 + languageName: node + linkType: hard + +"fill-range@npm:^7.0.1": + version: 7.0.1 + resolution: "fill-range@npm:7.0.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + languageName: node + linkType: hard + +"find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 12a1536ac746db74881316a181499a78ef953632ddd28050b7a3a43c62ef5462e3357c8c29d76072bb635f147f7a9a1f0c02efef6b4be28f8db62ceb3d5c7f5d + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.1.1 + resolution: "foreground-child@npm:3.1.1" + dependencies: + cross-spawn: ^7.0.0 + signal-exit: ^4.0.1 + checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: ^3.0.0 + checksum: 1b8d128dae2ac6cc94230cc5ead341ba3e0efaef82dab46a33d171c044caaa6ca001364178d42069b2809c35a1c3c35079a32107c770e9ffab3901b59af8c8b1 + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@~2.3.2#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: ^4.0.1 + checksum: f4f2bfe2425296e8a47e36864e4f42be38a996db40420fe434565e4480e3322f18eb37589617a98640c5dc8fdec1a387007ee18dbb1f3f5553409c34d17f425e + languageName: node + linkType: hard + +"glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134 + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.3.10 + resolution: "glob@npm:10.3.10" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.5 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/esm/bin.mjs + checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 4b86685de6831cebcbb19f93870bea624afee61124b0a20c49017013987cd129e73a8c4baeca295728f41d21265e1f859d25ef36731b142ca59c655fea94bb1a + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "http-proxy-agent@npm:7.0.0" + dependencies: + agent-base: ^7.1.0 + debug: ^4.3.4 + checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.2 + resolution: "https-proxy-agent@npm:7.0.2" + dependencies: + agent-base: ^7.0.2 + debug: 4 + checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + languageName: node + linkType: hard + +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: ^2.0.0 + checksum: 9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: ">= 2.1.2 < 3.0.0" + checksum: 3f60d47a5c8fc3313317edfd29a00a692cc87a19cac0159e2ce711d0ebc9019064108323b5e493625e25594f11c6236647d8e256fbe7a58f4a3b33b89e6d30bf + languageName: node + linkType: hard + +"ieee754@npm:^1.2.1": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 7cae75c8cd9a50f57dadd77482359f659eaebac0319dd9368bcd1714f55e65badd6929ca58569da2b6494ef13fdd5598cd700b1eba23f8b79c5f19d195a3ecf7 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 824cfb9929d031dabf059bebfe08cf3137365e112019086ed3dcff6a0a7b698cb80cf67ccccde0e25b9e2d7527aa6cc1fed1ac490c752162496caba3e6699612 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: ^1.3.0 + wrappy: 1 + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: ^2.0.0 + checksum: 84192eb88cff70d320426f35ecd63c3d6d495da9d805b19bc65b518984b7c0760280e57dbf119b7e9be6b161784a5a673ab2c6abe83abb5198a432232ad5b35c + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: ^2.1.1 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"isomorphic-ws@npm:^4.0.1": + version: 4.0.1 + resolution: "isomorphic-ws@npm:4.0.1" + peerDependencies: + ws: "*" + checksum: d7190eadefdc28bdb93d67b5f0c603385aaf87724fa2974abb382ac1ec9756ed2cfb27065cbe76122879c2d452e2982bc4314317f3d6c737ddda6c047328771a + languageName: node + linkType: hard + +"jackspeak@npm:^2.3.5": + version: 2.3.6 + resolution: "jackspeak@npm:2.3.6" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + languageName: node + linkType: hard + +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" + dependencies: + "@types/connect": ^3.4.33 + "@types/node": ^12.12.54 + "@types/ws": ^7.4.4 + JSONStream: ^1.3.5 + commander: ^2.20.3 + delay: ^5.0.0 + es6-promisify: ^5.0.0 + eyes: ^0.1.8 + isomorphic-ws: ^4.0.1 + json-stringify-safe: ^5.0.1 + uuid: ^8.3.2 + ws: ^7.4.5 + bin: + jayson: bin/jayson.js + checksum: 86464322fbdc6db65d2bb4fc278cb6c86fad5c2a506065490d39459f09ba0d30f2b4fb740b33828a1424791419b6c8bd295dc54d361a4ad959bf70cc62b1ca7e + languageName: node + linkType: hard + +"js-sha256@npm:^0.9.0": + version: 0.9.0 + resolution: "js-sha256@npm:0.9.0" + checksum: ffad54b3373f81581e245866abfda50a62c483803a28176dd5c28fd2d313e0bdf830e77dac7ff8afd193c53031618920f3d98daf21cbbe80082753ab639c0365 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + languageName: node + linkType: hard + +"json-stringify-safe@npm:^5.0.1": + version: 5.0.1 + resolution: "json-stringify-safe@npm:5.0.1" + checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee + languageName: node + linkType: hard + +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: ^1.2.0 + bin: + json5: lib/cli.js + checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7 + languageName: node + linkType: hard + +"jsonparse@npm:^1.2.0": + version: 1.3.1 + resolution: "jsonparse@npm:1.3.1" + checksum: 6514a7be4674ebf407afca0eda3ba284b69b07f9958a8d3113ef1005f7ec610860c312be067e450c569aab8b89635e332cee3696789c750692bb60daba627f4d + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: ^5.0.0 + checksum: 72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: ^2.0.1 + checksum: 96c058ec7167598e238bb7fb9def2f9339215e97d6685d9c1e3e4bdb33d14600e11fe7a812cf0c003dfb73ca2df374f146280b2287cae9e8d989e9d7a69a203b + languageName: node + linkType: hard + +"lower-case@npm:^2.0.2": + version: 2.0.2 + resolution: "lower-case@npm:2.0.2" + dependencies: + tslib: ^2.0.3 + checksum: 83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.1.0 + resolution: "lru-cache@npm:10.1.0" + checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + languageName: node + linkType: hard + +"lru-cache@npm:^6.0.0": + version: 6.0.0 + resolution: "lru-cache@npm:6.0.0" + dependencies: + yallist: ^4.0.0 + checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.0 + resolution: "make-fetch-happen@npm:13.0.0" + dependencies: + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 + is-lambda: ^1.0.1 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + promise-retry: ^2.0.1 + ssri: ^10.0.0 + checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + languageName: node + linkType: hard + +"minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: ^1.1.7 + checksum: 2b1514e3d0f29a549912f0db7ae7b82c5cab4a8f2dd0369f1c6451a325b3f12b2cf473c95873b6157bb8df183d6cf6db82ff03614b6adaaf1d7e055beccdfd01 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: ^1.1.7 + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"minimatch@npm:^9.0.1": + version: 9.0.3 + resolution: "minimatch@npm:9.0.3" + dependencies: + brace-expansion: ^2.0.1 + checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.0, minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" + dependencies: + encoding: ^0.1.13 + minipass: ^7.0.3 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: ^3.0.0 + checksum: 56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: ^3.0.0 + checksum: b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: ^3.0.0 + checksum: 79076749fcacf21b5d16dd596d32c3b6bf4d6e62abb43868fac21674078505c8b15eaca4e47ed844985a4514854f917d78f588fcd029693709417d8f98b2bd60 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: ^4.0.0 + checksum: a30d083c8054cee83cdcdc97f97e4641a3f58ae743970457b1489ce38ee1167b3aaf7d815cd39ec7a99b9c40397fd4f686e83750e73e652b21cb516f6d845e48 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 425dab288738853fded43da3314a0b5c035844d6f3097a8e3b5b29b328da8f3c1af6fc70618b32c29ff906284cf6406b6841376f21caaadd0793c1d5a6a620ea + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": + version: 7.0.4 + resolution: "minipass@npm:7.0.4" + checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: ^3.0.0 + yallist: ^4.0.0 + checksum: f1fdeac0b07cf8f30fcf12f4b586795b97be856edea22b5e9072707be51fc95d41487faec3f265b42973a304fe3a64acd91a44a3826a963e37b37bafde0212c3 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.1": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: ^1.2.6 + bin: + mkdirp: bin/cmd.js + checksum: 0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: a96865108c6c3b1b8e1d5e9f11843de1e077e57737602de1b82030815f311be11f96f09cce59bd5b903d0b29834733e5313f9301e3ed6d6f6fba2eae0df4298f + languageName: node + linkType: hard + +"mocha@npm:^9.0.3": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.3 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 4.2.1 + ms: 2.1.3 + nanoid: 3.3.1 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.2.0 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 4d5ca4ce33fc66627e63acdf09a634e2358c9a00f61de7788b1091b6aad430da04f97f9ecb82d56dc034b623cb833b65576136fd010d77679c03fcea5bc1e12d + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.0.0": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 4ef0969e1bbe866fc223eb32276cbccb0961900bfe79104fa5abe34361979dead8d0e061410a5c03bc3d47455685adf32c09d6f27790f4a6898fb51f7df7ec86 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 + languageName: node + linkType: hard + +"no-case@npm:^3.0.4": + version: 3.0.4 + resolution: "no-case@npm:3.0.4" + dependencies: + lower-case: ^2.0.2 + tslib: ^2.0.3 + checksum: 0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c + languageName: node + linkType: hard + +"node-fetch@npm:^2.6.12": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.3.0": + version: 4.7.1 + resolution: "node-gyp-build@npm:4.7.1" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 2ef8248021489db03be3e8098977cdc797b80a9b12b77c6dcb89b0dc89b8c62e6a482672ee298f61021740ae7f080fb33154cfec8fb158cec620f57b0fae87c0 + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.0.1 + resolution: "node-gyp@npm:10.0.1" + dependencies: + env-paths: ^2.2.0 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 + graceful-fs: ^4.2.6 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + tar: ^6.1.2 + which: ^4.0.0 + bin: + node-gyp: bin/node-gyp.js + checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.0 + resolution: "nopt@npm:7.2.0" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: 1 + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: ^0.1.0 + checksum: 7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: ^3.0.2 + checksum: 1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: ^3.0.0 + checksum: cb0ab21ec0f32ddffd31dfc250e3afa61e103ef43d957cc45497afe37513634589316de4eb88abdfd969fe6410c22c0b93ab24328833b8eb1ccc087fc0442a1c + languageName: node + linkType: hard + +"pako@npm:^2.0.3": + version: 2.1.0 + resolution: "pako@npm:2.1.0" + checksum: 71666548644c9a4d056bcaba849ca6fd7242c6cf1af0646d3346f3079a1c7f4a66ffec6f7369ee0dc88f61926c10d6ab05da3e1fca44b83551839e89edd75a3e + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-scurry@npm:^1.10.1": + version: 1.10.1 + resolution: "path-scurry@npm:1.10.1" + dependencies: + lru-cache: ^9.1.1 || ^10.0.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 090e3147716647fb7fb5b4b8c8e5b55e5d0a6086d085b6cd23f3d3c01fcf0ff56fd3cc22f2f4a033bd2e46ed55d61ed8379e123b42afe7d531a2a5fc8bb556d6 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf + languageName: node + linkType: hard + +"prettier@npm:^2.6.2": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: ^2.0.2 + retry: ^0.12.0 + checksum: f96a3f6d90b92b568a26f71e966cbbc0f63ab85ea6ff6c81284dc869b41510e6cdef99b6b65f9030f0db422bf7c96652a3fff9f2e8fb4a0f069d8f4430359429 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: ^5.1.0 + checksum: d779499376bd4cbb435ef3ab9a957006c8682f343f14089ed5f27764e4645114196e75b7f6abf1cbd84fd247c0cb0651698444df8c9bf30e62120fbbc52269d6 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: ^2.2.1 + checksum: 1ced032e6e45670b6d7352d71d21ce7edf7b9b928494dcaba6f11fba63180d9da6cd7061ebc34175ffda6ff529f481818c962952004d273178acd70f7059b320 + languageName: node + linkType: hard + +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 9f57c93277b5585d3c83b0cf76be47b473ae8c6d9142a46ce8b0291a04bb2cf902059f0f8445dcabb3fb7378e5fe4bb4ea1e008876343d42e46d3b484534ce38 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 623bd7d2e5119467ba66202d733ec3c2e2e26568074923bc0585b6b99db14f357e79bdedb63cab56cec47491c4a0da7e6021a7465ca6dc4f481d3898fdd3158c + languageName: node + linkType: hard + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + dependencies: + "@coral-xyz/anchor": ^0.28.0 + "@types/bn.js": ^5.1.0 + "@types/chai": ^4.3.0 + "@types/mocha": ^9.1.1 + chai: ^4.3.4 + mocha: ^9.0.3 + prettier: ^2.6.2 + ts-mocha: ^10.0.0 + typescript: ^4.3.5 + languageName: unknown + linkType: soft + +"rpc-websockets@npm:^7.5.1": + version: 7.9.0 + resolution: "rpc-websockets@npm:7.9.0" + dependencies: + "@babel/runtime": ^7.17.2 + bufferutil: ^4.0.1 + eventemitter3: ^4.0.7 + utf-8-validate: ^5.0.2 + uuid: ^8.3.2 + ws: ^8.5.0 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3ddd79ea7cf63b7a6a8d32356c7f9b363e41f26a6a8bbe889f9d2c5267811d492e194340fbad1a21ecfa457d5d1f253af3357a94d0118f66fcdea1fd9236adc + languageName: node + linkType: hard + +"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 + languageName: node + linkType: hard + +"semver@npm:^7.3.5": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: ^2.1.0 + checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: ^3.0.0 + checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: b5167a7142c1da704c0e3af85c402002b597081dd9575031a90b4f229ca5678e9a36e8a374f1814c8156a725d17008ae3bde63b92f9cfd132526379e580bec8b + languageName: node + linkType: hard + +"snake-case@npm:^3.0.4": + version: 3.0.4 + resolution: "snake-case@npm:3.0.4" + dependencies: + dot-case: ^3.0.4 + tslib: ^2.0.3 + checksum: 0a7a79900bbb36f8aaa922cf111702a3647ac6165736d5dc96d3ef367efc50465cac70c53cd172c382b022dac72ec91710608e5393de71f76d7142e6fd80e8a3 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.1": + version: 8.0.2 + resolution: "socks-proxy-agent@npm:8.0.2" + dependencies: + agent-base: ^7.0.2 + debug: ^4.3.4 + socks: ^2.7.1 + checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.7.1 + resolution: "socks@npm:2.7.1" + dependencies: + ip: ^2.0.0 + smart-buffer: ^4.2.0 + checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.6": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.5 + resolution: "ssri@npm:10.0.5" + dependencies: + minipass: ^7.0.3 + checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: ^0.2.0 + emoji-regex: ^9.2.2 + strip-ansi: ^7.0.1 + checksum: 7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: ^6.0.1 + checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d + languageName: node + linkType: hard + +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + +"strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"superstruct@npm:^0.14.2": + version: 0.14.2 + resolution: "superstruct@npm:0.14.2" + checksum: c5c4840f432da82125b923ec45faca5113217e83ae416e314d80eae012b8bb603d2e745025d173450758d116348820bc7028157f8c9a72b6beae879f94b837c0 + languageName: node + linkType: hard + +"superstruct@npm:^0.15.4": + version: 0.15.5 + resolution: "superstruct@npm:0.15.5" + checksum: 6d1f5249fee789424b7178fa0a1ffb2ace629c5480c39505885bd8c0046a4ff8b267569a3442fa53b8c560a7ba6599cf3f8af94225aebeb2cf6023f7dd911050 + languageName: node + linkType: hard + +"supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: ^4.0.0 + checksum: 3dda818de06ebbe5b9653e07842d9479f3555ebc77e9a0280caf5a14fb877ffee9ed57007c3b78f5a6324b8dbeec648d9e97a24e2ed9fdb81ddc69ea07100f4a + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.0 + resolution: "tar@npm:6.2.0" + dependencies: + chownr: ^2.0.0 + fs-minipass: ^2.0.0 + minipass: ^5.0.0 + minizlib: ^2.1.1 + mkdirp: ^1.0.3 + yallist: ^4.0.0 + checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + languageName: node + linkType: hard + +"text-encoding-utf-8@npm:^1.0.2": + version: 1.0.2 + resolution: "text-encoding-utf-8@npm:1.0.2" + checksum: ec4c15d50e738c5dba7327ad432ebf0725ec75d4d69c0bd55609254c5a3bc5341272d7003691084a0a73d60d981c8eb0e87603676fdb6f3fed60f4c9192309f9 + languageName: node + linkType: hard + +"through@npm:>=2.2.7 <3": + version: 2.3.8 + resolution: "through@npm:2.3.8" + checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: ^7.0.0 + checksum: f76fa01b3d5be85db6a2a143e24df9f60dd047d151062d0ba3df62953f2f697b16fe5dad9b0ac6191c7efc7b1d9dcaa4b768174b7b29da89d4428e64bc0a20ed + languageName: node + linkType: hard + +"toml@npm:^3.0.0": + version: 3.0.0 + resolution: "toml@npm:3.0.0" + checksum: 5d7f1d8413ad7780e9bdecce8ea4c3f5130dd53b0a4f2e90b93340979a137739879d7b9ce2ce05c938b8cc828897fe9e95085197342a1377dd8850bf5125f15f + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 + languageName: node + linkType: hard + +"ts-mocha@npm:^10.0.0": + version: 10.0.0 + resolution: "ts-mocha@npm:10.0.0" + dependencies: + ts-node: 7.0.1 + tsconfig-paths: ^3.5.0 + peerDependencies: + mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X + dependenciesMeta: + tsconfig-paths: + optional: true + bin: + ts-mocha: bin/ts-mocha + checksum: b11f2a8ceecf195b0db724da429159982fef12e4357088fe900289223587217e8c126ead7929679edd58bf19ad96c5da5911535d26f535386632e18fbff10c40 + languageName: node + linkType: hard + +"ts-node@npm:7.0.1": + version: 7.0.1 + resolution: "ts-node@npm:7.0.1" + dependencies: + arrify: ^1.0.0 + buffer-from: ^1.1.0 + diff: ^3.1.0 + make-error: ^1.1.1 + minimist: ^1.2.0 + mkdirp: ^0.5.1 + source-map-support: ^0.5.6 + yn: ^2.0.0 + bin: + ts-node: dist/bin.js + checksum: 07ed6ea1805361828737a767cfd6c57ea6e267ee8679282afb933610af02405e1a87c1f2aea1d38ed8e66b34fcbf6272b6021ab95d78849105d2e57fc283870b + languageName: node + linkType: hard + +"tsconfig-paths@npm:^3.5.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" + dependencies: + "@types/json5": ^0.0.29 + json5: ^1.0.2 + minimist: ^1.2.6 + strip-bom: ^3.0.0 + checksum: 59f35407a390d9482b320451f52a411a256a130ff0e7543d18c6f20afab29ac19fbe55c360a93d6476213cc335a4d76ce90f67df54c4e9037f7d240920832201 + languageName: node + linkType: hard + +"tslib@npm:^2.0.3": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 + languageName: node + linkType: hard + +"typescript@npm:^4.3.5": + version: 4.9.5 + resolution: "typescript@npm:4.9.5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ee000bc26848147ad423b581bd250075662a354d84f0e06eb76d3b892328d8d4440b7487b5a83e851b12b255f55d71835b008a66cbf8f255a11e4400159237db + languageName: node + linkType: hard + +"typescript@patch:typescript@^4.3.5#~builtin": + version: 4.9.5 + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d + languageName: node + linkType: hard + +"undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 3192ef6f3fd5df652f2dc1cd782b49d6ff14dc98e5dced492aa8a8c65425227da5da6aafe22523c67f035a272c599bb89cfe803c1db6311e44bed3042fc25487 + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + +"utf-8-validate@npm:^5.0.2": + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 5579350a023c66a2326752b6c8804cc7b39dcd251bb088241da38db994b8d78352e388dcc24ad398ab98385ba3c5ffcadb6b5b14b2637e43f767869055e46ba6 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 5575a8a75c13120e2f10e6ddc801b2c7ed7d8f3c8ac22c7ed0c7b2ba6383ec0abda88c905085d630e251719e0777045ae3236f04c812184b7c765f63a70e58df + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c + languageName: node + linkType: hard + +"which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: ^2.0.0 + bin: + node-which: ./bin/node-which + checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1 + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 3493b4f0ef979a23d2c1583d7ef85f62fc9463cc02f82829d3e7e663b517f8ae9707da0249b382e46ac58986deb0ca2232ee1081713741211bda9254b429c9bb + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: a790b846fd4505de962ba728a21aaeda189b8ee1c7568ca5e817d85930e06ef8d1689d49dbf0e881e8ef84436af3a88bc49115c2e2788d841ff1b8b5b51a608b + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: ^6.1.0 + string-width: ^5.0.1 + strip-ansi: ^7.0.1 + checksum: 371733296dc2d616900ce15a0049dca0ef67597d6394c57347ba334393599e800bab03c41d4d45221b6bc967b8c453ec3ae4749eff3894202d16800fdfe0e238 + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"ws@npm:^7.4.5": + version: 7.5.9 + resolution: "ws@npm:7.5.9" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + languageName: node + linkType: hard + +"ws@npm:^8.5.0": + version: 8.15.1 + resolution: "ws@npm:8.15.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 54f0fb95621ee60898a38c572c515659e51cc9d9f787fb109cef6fde4befbe1c4602dc999d30110feee37456ad0f1660fa2edcfde6a9a740f86a290999550d30 + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5 + languageName: node + linkType: hard + +"yargs-parser@npm:20.2.4, yargs-parser@npm:^20.2.2": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924 + languageName: node + linkType: hard + +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: ^6.0.0 + decamelize: ^4.0.0 + flat: ^5.0.2 + is-plain-obj: ^2.1.0 + checksum: 68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: ^7.0.2 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.0 + y18n: ^5.0.5 + yargs-parser: ^20.2.2 + checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59 + languageName: node + linkType: hard + +"yn@npm:^2.0.0": + version: 2.0.0 + resolution: "yn@npm:2.0.0" + checksum: 9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard From e430beeb44741cda59da2de421b2f06ac880cae5 Mon Sep 17 00:00:00 2001 From: lukacan Date: Mon, 8 Jan 2024 19:07:20 +0100 Subject: [PATCH 46/57] =?UTF-8?q?=F0=9F=90=9B=20fixed=20some=20path=20bugs?= =?UTF-8?q?,=20changed=20/=20debugged=20new=20fuzz=20tests=20folder=20stru?= =?UTF-8?q?cture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 146 ++++++++++++++---- crates/client/src/lib.rs | 6 +- .../trdelnik-tests/Cargo_fuzz.toml.tmpl | 12 +- crates/client/src/workspace_builder.rs | 65 ++++++-- 4 files changed, 171 insertions(+), 58 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 8f7de1d4..610cb957 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -218,7 +218,11 @@ impl Commander { // INFO hfuzz target can be of course located somewhere else // but as we leave it within the root, we also expect it within the root - let hfuzz_target_path = root.join(HFUZZ_TARGET); + let hfuzz_target_path = root + .join(TESTS_WORKSPACE_DIRECTORY) + .join(FUZZ_TEST_DIRECTORY) + .join(FUZZING) + .join(HFUZZ_TARGET); if hfuzz_target_path.exists() { tokio::fs::remove_dir_all(hfuzz_target_path).await?; } else { @@ -313,12 +317,23 @@ impl Commander { // if the target does not exists, honggfuzz will throw an error let config = Config::new(); + // INFO This was tested on independant hongfuzz example, but if we specify HFUZZ_WORKSPACE, + // it will update the workspace directory , however HFUZZ_RUN_ARGS will still have stronger + // word and will be used for report and crash files if specified + let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); + let cargo_target_dir = + std::env::var("CARGO_TARGET_DIR").unwrap_or(CARGO_TARGET_DIR_DEFAULT.to_string()); + let hfuzz_workspace = + std::env::var("HFUZZ_WORKSPACE").unwrap_or(HFUZZ_WORKSPACE_DEFAULT.to_string()); + let fuzz_args = config.get_fuzz_args(hfuzz_run_args); let mut child = tokio::process::Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) + .env("CARGO_TARGET_DIR", cargo_target_dir) + .env("HFUZZ_WORKSPACE", hfuzz_workspace) .arg("hfuzz") .arg("run") .arg(target) @@ -345,11 +360,18 @@ impl Commander { let config = Config::new(); // obtain hfuzz_run_args let hfuzz_run_args = std::env::var("HFUZZ_RUN_ARGS").unwrap_or_default(); + + let cargo_target_dir = + std::env::var("CARGO_TARGET_DIR").unwrap_or(CARGO_TARGET_DIR_DEFAULT.to_string()); + + let hfuzz_workspace = + std::env::var("HFUZZ_WORKSPACE").unwrap_or(HFUZZ_WORKSPACE_DEFAULT.to_string()); + // obtain string from config and hfuzz_run_args let fuzz_args = config.get_fuzz_args(hfuzz_run_args); // Parse the fuzz_args arguments to find out if the crash folder and crash files extension was modified. // This will give precedence to latter - let (crash_dir, ext) = get_crash_dir_and_ext(root, &target, &fuzz_args); + let (crash_dir, ext) = get_crash_dir_and_ext(root, &target, &fuzz_args, &hfuzz_workspace); if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { if !crash_files.is_empty() { @@ -360,6 +382,8 @@ impl Commander { let mut child = tokio::process::Command::new("cargo") .env("HFUZZ_RUN_ARGS", fuzz_args) + .env("CARGO_TARGET_DIR", cargo_target_dir) + .env("HFUZZ_WORKSPACE", hfuzz_workspace) .arg("hfuzz") .arg("run") .arg(target) @@ -463,6 +487,7 @@ fn get_crash_dir_and_ext( root: &std::path::Path, target: &str, hfuzz_run_args: &str, + hfuzz_workspace: &str, ) -> (std::path::PathBuf, String) { // FIXME: we split by whitespace without respecting escaping or quotes - same approach as honggfuzz-rs so there is no point to fix it here before the upstream is fixed let hfuzz_run_args = hfuzz_run_args.split_whitespace(); @@ -473,17 +498,13 @@ fn get_crash_dir_and_ext( let crash_dir = get_cmd_option_value(hfuzz_run_args.clone(), "", "--cr") .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); + //INFO -W is stronger option when honggfuzz is executed, so if -W is specified + // we take it as crashdir, if not we take hfuzz_workspace which is set by user + // or default is set to fuzzing within trdelink-tests let crash_path = if let Some(dir) = crash_dir { std::path::Path::new(root).join(dir) - // Path::new(root).join(TESTS_WORKSPACE_DIRECTORY).join(dir) } else { - std::path::Path::new(root) - .join(HFUZZ_WORKSPACE) - .join(target) - // Path::new(root) - // .join(TESTS_WORKSPACE_DIRECTORY) - // .join(HFUZZ_WORKSPACE) - // .join(target) + std::path::Path::new(hfuzz_workspace).join(target) }; (crash_path, extension) @@ -632,62 +653,127 @@ mod tests { #[test] fn test_get_crash_dir_and_ext() { - let root = std::path::Path::new("/home/fuzz"); - let target = "target"; - let default_crash_path = std::path::Path::new(root) - .join(HFUZZ_WORKSPACE) - .join(target); + pub const TARGET: &str = "fuzz_0"; + pub const TEST_CRASH_PATH: &str = "/home/fuzz/test-crash-path"; - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, ""); + let root = std::path::Path::new("/home/fuzz/"); + + let default_crash_path = std::path::Path::new(HFUZZ_WORKSPACE_DEFAULT).join(TARGET); + let env_specified_crash_path = std::path::Path::new(TEST_CRASH_PATH).join(TARGET); + + // this is default behavior + let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "", HFUZZ_WORKSPACE_DEFAULT); assert_eq!(crash_dir, default_crash_path); assert_eq!(&ext, "fuzz"); - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e"); + // behavior where path is specified within env variable HFUZZ_WORKSPACE, but not within -W HFUZZ_RUN_ARGS + let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "-Q -e", TEST_CRASH_PATH); - assert_eq!(crash_dir, default_crash_path); + assert_eq!(crash_dir, env_specified_crash_path); assert_eq!(&ext, "fuzz"); - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -e crash"); + // behavior as above + let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "-Q -e crash", TEST_CRASH_PATH); - assert_eq!(crash_dir, default_crash_path); + assert_eq!(crash_dir, env_specified_crash_path); assert_eq!(&ext, "crash"); // test absolute path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W /home/crash -e crash"); + // HFUZZ_WORKSPACE has default value however -W is set + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q -W /home/crash -e crash", + HFUZZ_WORKSPACE_DEFAULT, + ); let expected_crash_path = std::path::Path::new("/home/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // test absolute path - let (crash_dir, ext) = - get_crash_dir_and_ext(root, target, "-Q --crash /home/crash -e crash"); - + // HFUZZ_WORKSPACE is set and -W is also set + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q --crash /home/crash -e crash", + TEST_CRASH_PATH, + ); let expected_crash_path = std::path::Path::new("/home/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); + // test absolute path + // HFUZZ_WORKSPACE is set and -W is also set + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q --crash /home/crash/foo/bar/dead/beef -e crash", + TEST_CRASH_PATH, + ); + + let expected_crash_path = std::path::Path::new("/home/crash/foo/bar/dead/beef"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + // test relative path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q -W ../crash -e crash"); + // HFUZZ_WORKSPACE is set and -W is also set, this time with relative path + let (crash_dir, ext) = + get_crash_dir_and_ext(root, TARGET, "-Q -W ../crash -e crash", TEST_CRASH_PATH); let expected_crash_path = root.join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // test relative path - let (crash_dir, ext) = get_crash_dir_and_ext(root, target, "-Q --crash ../crash -e crash"); + // HFUZZ_WORKSPACE is set and -W is also set, this time with relative path + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q -W ../../dead/beef/crash -e crash", + TEST_CRASH_PATH, + ); - let expected_crash_path = root.join("../crash"); + let expected_crash_path = root.join("../../dead/beef/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); - // crash directory has precedence before workspace - let (crash_dir, ext) = - get_crash_dir_and_ext(root, target, "-Q --crash ../crash -W /workspace -e crash"); + // test relative path + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q --crash ../crash -e crash", + HFUZZ_WORKSPACE_DEFAULT, + ); let expected_crash_path = root.join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); + + // crash directory has precedence before workspace option , which have precedence before + // HFUZZ_WORKSPACE + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q --crash ../bitcoin/to/the/moon -W /workspace -e crash", + TEST_CRASH_PATH, + ); + + let expected_crash_path = root.join("../bitcoin/to/the/moon"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); + + // crash directory has precedence before workspace HFUZZ_WORKSPACE + let (crash_dir, ext) = get_crash_dir_and_ext( + root, + TARGET, + "-Q --crash /home/crashes/we/like/solana -e crash", + TEST_CRASH_PATH, + ); + + let expected_crash_path = root.join("/home/crashes/we/like/solana"); + assert_eq!(crash_dir, expected_crash_path); + assert_eq!(&ext, "crash"); } } diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 0619f18d..8127c2e9 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -93,16 +93,16 @@ mod constants { pub const TESTS_WORKSPACE_DIRECTORY: &str = "trdelnik-tests"; pub const POC_TEST_DIRECTORY: &str = "poc_tests"; pub const TESTS: &str = "tests"; - + pub const CARGO_TARGET_DIR_DEFAULT: &str = "trdelnik-tests/fuzz_tests/fuzzing/hfuzz_target"; + pub const HFUZZ_WORKSPACE_DEFAULT: &str = "trdelnik-tests/fuzz_tests/fuzzing/hfuzz_workspace"; pub const FUZZ_TEST_DIRECTORY: &str = "fuzz_tests"; - + pub const FUZZING: &str = "fuzzing"; pub const POC_TEST: &str = "test.rs"; pub const FUZZ_TEST: &str = "test_fuzz.rs"; // pub const PROGRAM_STUBS: &str = "program_stubs.rs"; pub const HFUZZ_TARGET: &str = "hfuzz_target"; - pub const HFUZZ_WORKSPACE: &str = "hfuzz_workspace"; pub const GIT_IGNORE: &str = ".gitignore"; diff --git a/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl index be0eda33..cbe01b23 100644 --- a/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl +++ b/crates/client/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl @@ -1,7 +1,8 @@ [package] -name = "fuzz_###FUZZ_ID###" +name = "fuzz_tests" version = "0.1.0" -edition = "2018" +description = "Created with Trdelnik" +edition = "2021" # Dependencies specific to Fuzz test [dependencies] @@ -16,9 +17,4 @@ version = "0.5.0" features=["fuzzing"] [dependencies.program_client] -path = "../../../.program_client" - - -[[bin]] -name = "fuzz_###FUZZ_ID###" -path = "test_fuzz.rs" +path = "../../.program_client" diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 3984a6e7..5ba5c864 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -162,7 +162,7 @@ impl WorkspaceBuilder { let cargo_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, CARGO); let src_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC); let crate_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY); - let lib_path = construct_path!(self.root, SRC, LIB); + let lib_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC, LIB); self.create_directory_all(&src_path).await?; @@ -233,6 +233,7 @@ impl WorkspaceBuilder { }; let new_fuzz_test = format!("fuzz_{fuzz_id}"); + let new_fuzz_test_path = format!("fuzz_{fuzz_id}/{FUZZ_TEST}"); let new_fuzz_test_dir = construct_path!( self.root, @@ -243,20 +244,6 @@ impl WorkspaceBuilder { self.create_directory(&new_fuzz_test_dir).await?; - let cargo_path = construct_path!( - self.root, - TESTS_WORKSPACE_DIRECTORY, - FUZZ_TEST_DIRECTORY, - &new_fuzz_test, - CARGO - ); - - let cargo_toml_content = - load_template("/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl")?; - let cargo_content = cargo_toml_content.replace("###FUZZ_ID###", &fuzz_id.to_string()); - - self.create_file(&cargo_path, &cargo_content).await?; - let fuzz_test_path = construct_path!( self.root, TESTS_WORKSPACE_DIRECTORY, @@ -274,14 +261,29 @@ impl WorkspaceBuilder { self.create_file(&fuzz_test_path, &template).await?; + let cargo_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + CARGO + ); + + let cargo_toml_content = + load_template("/src/templates/trdelnik-tests/Cargo_fuzz.toml.tmpl")?; + + self.create_file(&cargo_path, &cargo_toml_content).await?; + + self.add_bin_target(&cargo_path, &new_fuzz_test, &new_fuzz_test_path) + .await?; + // add this new fuzz test to the workspace self.add_workspace_member(&format!( - "{TESTS_WORKSPACE_DIRECTORY}/{FUZZ_TEST_DIRECTORY}/{new_fuzz_test}", + "{TESTS_WORKSPACE_DIRECTORY}/{FUZZ_TEST_DIRECTORY}", )) .await?; // add program dependencies - self.add_program_dependencies(&new_fuzz_test_dir, "dependencies", None) + self.add_program_dependencies(&fuzz_dir_path, "dependencies", None) .await?; // add fuzzing feature @@ -350,6 +352,35 @@ impl WorkspaceBuilder { .await?; } + #[throws] + async fn add_bin_target(&self, cargo_path: &PathBuf, name: &str, path: &str) { + // Read the existing Cargo.toml file + let cargo_toml_content = fs::read_to_string(cargo_path).await?; + let mut cargo_toml: Value = cargo_toml_content.parse()?; + + // Create a new bin table + let mut bin_table = Table::new(); + bin_table.insert("name".to_string(), Value::String(name.to_string())); + bin_table.insert("path".to_string(), Value::String(path.to_string())); + + // Add the new [[bin]] section to the [[bin]] array + if let Some(bin_array) = cargo_toml.as_table_mut().and_then(|t| t.get_mut("bin")) { + if let Value::Array(bin_array) = bin_array { + bin_array.push(Value::Table(bin_table)); + } + } else { + // If there is no existing [[bin]] array, create one + let bin_array = Value::Array(vec![Value::Table(bin_table)]); + cargo_toml + .as_table_mut() + .unwrap() + .insert("bin".to_string(), bin_array); + } + + // Write the updated Cargo.toml file + fs::write(cargo_path, cargo_toml.to_string()).await?; + } + // Creates the `trdelnik-tests` workspace with `src/bin` directory and empty `fuzz_target.rs` file // #[throws] // async fn create_trdelnik_tests_fuzz(&self) { From fd12f5dd5b0fd06376d6f0805ea1f3ff0f2db717 Mon Sep 17 00:00:00 2001 From: lukacan Date: Mon, 8 Jan 2024 19:08:54 +0100 Subject: [PATCH 47/57] =?UTF-8?q?=E2=9C=85=20update=20fuzzer=20for=20the?= =?UTF-8?q?=20new=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/fuzzer/Cargo.toml | 2 +- examples/fuzzer/Trdelnik.toml | 4 +- .../trdelnik-tests/fuzz_tests/Cargo.toml | 32 ++++++++ .../fuzz_tests/fuzz_0/Cargo.toml | 23 ------ .../fuzz_tests/fuzz_1/Cargo.toml | 23 ------ .../fuzz_tests/fuzz_2/test_fuzz.rs | 82 +++++++++++++++++++ 6 files changed, 117 insertions(+), 49 deletions(-) create mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/Cargo.toml delete mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml delete mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml create mode 100644 examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_2/test_fuzz.rs diff --git a/examples/fuzzer/Cargo.toml b/examples/fuzzer/Cargo.toml index 684a5d85..2826da50 100644 --- a/examples/fuzzer/Cargo.toml +++ b/examples/fuzzer/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["programs/*", "trdelnik-tests/fuzz_tests/fuzz_0", "trdelnik-tests/fuzz_tests/fuzz_1"] +members = ["programs/*", "trdelnik-tests/fuzz_tests"] [profile.release] overflow-checks = true lto = "fat" diff --git a/examples/fuzzer/Trdelnik.toml b/examples/fuzzer/Trdelnik.toml index 46021fae..32e9bf9e 100644 --- a/examples/fuzzer/Trdelnik.toml +++ b/examples/fuzzer/Trdelnik.toml @@ -7,7 +7,7 @@ validator_startup_timeout = 15000 # Timeout in seconds (default: 10) timeout = 10 # Number of fuzzing iterations (default: 0 [no limit]) -iterations = 500 +iterations = 1000 # 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) @@ -15,7 +15,7 @@ keep_output = false # Disable ANSI console; use simple log output (default: false) verbose = false # Exit upon seeing the first crash (default: false) -exit_upon_crash = false +exit_upon_crash = true # Maximal number of mutations per one run (default: 6) mutations_per_run = 6 # Directory where crashes are saved to (default: "" [workspace directory]) diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/Cargo.toml b/examples/fuzzer/trdelnik-tests/fuzz_tests/Cargo.toml new file mode 100644 index 00000000..eee7422b --- /dev/null +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/Cargo.toml @@ -0,0 +1,32 @@ +[[bin]] +name = "fuzz_0" +path = "fuzz_0/test_fuzz.rs" + +[[bin]] +name = "fuzz_1" +path = "fuzz_1/test_fuzz.rs" + +[[bin]] +name = "fuzz_2" +path = "fuzz_2/test_fuzz.rs" + +[package] +name = "fuzz_tests" +version = "0.1.0" +description = "Created with Trdelnik" +edition = "2021" + +[dependencies] +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + +[dependencies.trdelnik-client] +path = "../../../../crates/client" +features = ["fuzzing"] + +[dependencies.program_client] +path = "../../.program_client" + +[dependencies.fuzzer] +path = "../../programs/fuzzer" diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml deleted file mode 100644 index ed495ad9..00000000 --- a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_0/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[[bin]] -name = "fuzz_0" -path = "test_fuzz.rs" - -[package] -name = "fuzz_0" -version = "0.1.0" -edition = "2018" - -[dependencies] -honggfuzz = "0.5.55" -arbitrary = "1.3.0" -assert_matches = "1.4.0" - -[dependencies.trdelnik-client] -path = "../../../../../crates/client" -features = ["fuzzing"] - -[dependencies.program_client] -path = "../../../.program_client" - -[dependencies.fuzzer] -path = "../../../programs/fuzzer" diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml deleted file mode 100644 index 3fa7ca71..00000000 --- a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_1/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[[bin]] -name = "fuzz_1" -path = "test_fuzz.rs" - -[package] -name = "fuzz_1" -version = "0.1.0" -edition = "2018" - -[dependencies] -honggfuzz = "0.5.55" -arbitrary = "1.3.0" -assert_matches = "1.4.0" - -[dependencies.trdelnik-client] -path = "../../../../../crates/client" -features = ["fuzzing"] - -[dependencies.program_client] -path = "../../../.program_client" - -[dependencies.fuzzer] -path = "../../../programs/fuzzer" diff --git a/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_2/test_fuzz.rs b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_2/test_fuzz.rs new file mode 100644 index 00000000..9b58d7d3 --- /dev/null +++ b/examples/fuzzer/trdelnik-tests/fuzz_tests/fuzz_2/test_fuzz.rs @@ -0,0 +1,82 @@ +use fuzzer::entry; +use program_client::fuzzer_instruction::*; +use assert_matches::*; +use trdelnik_client::fuzzing::*; + +const PROGRAM_NAME: &str = "fuzzer"; + +#[derive(Arbitrary)] +pub struct FuzzData { + param1: u8, + param2: u8, +} + +fn main() { + loop { + fuzz!(|fuzz_data: FuzzData| { + solana_program_test::tokio::runtime::Runtime::new() + .unwrap() + .block_on(async { + let program_test = solana_program_test::ProgramTest::new( + PROGRAM_NAME, + PROGRAM_ID, + solana_program_test::processor!(entry), + ); + + let mut ctx = program_test.start_with_context().await; + + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let init_ix = init_dummy_ix(); + let mut transaction = solana_sdk::transaction::Transaction::new_with_payer( + &[init_ix], + Some(&ctx.payer.pubkey()), + ); + + transaction.sign(&[&ctx.payer], ctx.last_blockhash); + let res = ctx.banks_client.process_transaction(transaction).await; + assert_matches!(res, Ok(())); + + let res = fuzz_ix( + &fuzz_data, + &mut ctx.banks_client, + &ctx.payer, + ctx.last_blockhash, + ) + .await; + assert_matches!(res, Ok(())); + }); + }); + } +} + +async fn fuzz_ix( + fuzz_data: &FuzzData, + banks_client: &mut solana_program_test::BanksClient, + payer: &solana_sdk::signature::Keypair, + blockhash: solana_sdk::hash::Hash, +) -> core::result::Result<(), solana_program_test::BanksClientError> { + // TODO: replace this instruction with one of your generated instructions from trdelnik_client + let update_ix = update_dummy_ix(fuzz_data.param1, fuzz_data.param2); + + let mut transaction = + solana_sdk::transaction::Transaction::new_with_payer(&[update_ix], Some(&payer.pubkey())); + transaction.sign(&[payer], blockhash); + + banks_client.process_transaction(transaction).await +} + +fn init_dummy_ix() -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { + program_id: PROGRAM_ID, + data: vec![], + accounts: vec![], + } +} + +fn update_dummy_ix(param1: u8, param2: u8) -> solana_sdk::instruction::Instruction { + solana_sdk::instruction::Instruction { + program_id: PROGRAM_ID, + data: vec![param1, param2], + accounts: vec![], + } +} From e62d40a880c73d0bc496065770546a070f2c0cc0 Mon Sep 17 00:00:00 2001 From: lukacan Date: Tue, 9 Jan 2024 13:34:17 +0100 Subject: [PATCH 48/57] =?UTF-8?q?=F0=9F=8E=A8=20small=20updates=20to=20tes?= =?UTF-8?q?ts=20+=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/commander.rs | 55 +++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 610cb957..3af99ffd 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -354,8 +354,6 @@ impl Commander { } #[throws] pub async fn run_fuzzer_with_exit_code(target: String, root: String) { - let root = std::path::Path::new(&root); - // obtain config data let config = Config::new(); // obtain hfuzz_run_args @@ -371,7 +369,7 @@ impl Commander { let fuzz_args = config.get_fuzz_args(hfuzz_run_args); // Parse the fuzz_args arguments to find out if the crash folder and crash files extension was modified. // This will give precedence to latter - let (crash_dir, ext) = get_crash_dir_and_ext(root, &target, &fuzz_args, &hfuzz_workspace); + let (crash_dir, ext) = get_crash_dir_and_ext(&root, &target, &fuzz_args, &hfuzz_workspace); if let Ok(crash_files) = get_crash_files(&crash_dir, &ext) { if !crash_files.is_empty() { @@ -484,7 +482,7 @@ impl Commander { } fn get_crash_dir_and_ext( - root: &std::path::Path, + root: &str, target: &str, hfuzz_run_args: &str, hfuzz_workspace: &str, @@ -495,13 +493,19 @@ fn get_crash_dir_and_ext( let extension = get_cmd_option_value(hfuzz_run_args.clone(), "-e", "--ext").unwrap_or("fuzz".to_string()); + // If we run fuzzer like: + // HFUZZ_WORKSPACE="./new_hfuzz_workspace" HFUZZ_RUN_ARGS="--crashdir ./new_crash_dir -W ./new_workspace" cargo hfuzz run + // The structure will be as follows: + // ./new_hfuzz_workspace - will contain inputs + // ./new_crash_dir - will contain crashes + // ./new_workspace - will contain report + // So finally , we have to give precedence: + // --crashdir > --workspace > HFUZZ_WORKSPACE let crash_dir = get_cmd_option_value(hfuzz_run_args.clone(), "", "--cr") .or_else(|| get_cmd_option_value(hfuzz_run_args.clone(), "-W", "--w")); - //INFO -W is stronger option when honggfuzz is executed, so if -W is specified - // we take it as crashdir, if not we take hfuzz_workspace which is set by user - // or default is set to fuzzing within trdelink-tests let crash_path = if let Some(dir) = crash_dir { + // INFO If path is absolute, it replaces the current path. std::path::Path::new(root).join(dir) } else { std::path::Path::new(hfuzz_workspace).join(target) @@ -656,25 +660,25 @@ mod tests { pub const TARGET: &str = "fuzz_0"; pub const TEST_CRASH_PATH: &str = "/home/fuzz/test-crash-path"; - let root = std::path::Path::new("/home/fuzz/"); + const ROOT: &str = "/home/fuzz/"; let default_crash_path = std::path::Path::new(HFUZZ_WORKSPACE_DEFAULT).join(TARGET); let env_specified_crash_path = std::path::Path::new(TEST_CRASH_PATH).join(TARGET); // this is default behavior - let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "", HFUZZ_WORKSPACE_DEFAULT); + let (crash_dir, ext) = get_crash_dir_and_ext(ROOT, TARGET, "", HFUZZ_WORKSPACE_DEFAULT); assert_eq!(crash_dir, default_crash_path); assert_eq!(&ext, "fuzz"); // behavior where path is specified within env variable HFUZZ_WORKSPACE, but not within -W HFUZZ_RUN_ARGS - let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "-Q -e", TEST_CRASH_PATH); + let (crash_dir, ext) = get_crash_dir_and_ext(ROOT, TARGET, "-Q -e", TEST_CRASH_PATH); assert_eq!(crash_dir, env_specified_crash_path); assert_eq!(&ext, "fuzz"); // behavior as above - let (crash_dir, ext) = get_crash_dir_and_ext(root, TARGET, "-Q -e crash", TEST_CRASH_PATH); + let (crash_dir, ext) = get_crash_dir_and_ext(ROOT, TARGET, "-Q -e crash", TEST_CRASH_PATH); assert_eq!(crash_dir, env_specified_crash_path); assert_eq!(&ext, "crash"); @@ -682,7 +686,7 @@ mod tests { // test absolute path // HFUZZ_WORKSPACE has default value however -W is set let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q -W /home/crash -e crash", HFUZZ_WORKSPACE_DEFAULT, @@ -695,7 +699,7 @@ mod tests { // test absolute path // HFUZZ_WORKSPACE is set and -W is also set let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q --crash /home/crash -e crash", TEST_CRASH_PATH, @@ -707,7 +711,7 @@ mod tests { // test absolute path // HFUZZ_WORKSPACE is set and -W is also set let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q --crash /home/crash/foo/bar/dead/beef -e crash", TEST_CRASH_PATH, @@ -720,59 +724,62 @@ mod tests { // test relative path // HFUZZ_WORKSPACE is set and -W is also set, this time with relative path let (crash_dir, ext) = - get_crash_dir_and_ext(root, TARGET, "-Q -W ../crash -e crash", TEST_CRASH_PATH); + get_crash_dir_and_ext(ROOT, TARGET, "-Q -W ../crash -e crash", TEST_CRASH_PATH); - let expected_crash_path = root.join("../crash"); + let expected_crash_path = std::path::Path::new(ROOT).join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // test relative path // HFUZZ_WORKSPACE is set and -W is also set, this time with relative path let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q -W ../../dead/beef/crash -e crash", TEST_CRASH_PATH, ); - let expected_crash_path = root.join("../../dead/beef/crash"); + let expected_crash_path = std::path::Path::new(ROOT).join("../../dead/beef/crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // test relative path let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q --crash ../crash -e crash", HFUZZ_WORKSPACE_DEFAULT, ); - let expected_crash_path = root.join("../crash"); + let expected_crash_path = std::path::Path::new(ROOT).join("../crash"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // crash directory has precedence before workspace option , which have precedence before // HFUZZ_WORKSPACE let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q --crash ../bitcoin/to/the/moon -W /workspace -e crash", TEST_CRASH_PATH, ); - let expected_crash_path = root.join("../bitcoin/to/the/moon"); + let expected_crash_path = std::path::Path::new(ROOT).join("../bitcoin/to/the/moon"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); // crash directory has precedence before workspace HFUZZ_WORKSPACE let (crash_dir, ext) = get_crash_dir_and_ext( - root, + ROOT, TARGET, "-Q --crash /home/crashes/we/like/solana -e crash", TEST_CRASH_PATH, ); - let expected_crash_path = root.join("/home/crashes/we/like/solana"); + // If path is specified as absolute, the join will replace whole path. + let expected_crash_path = std::path::Path::new("/home/crashes/we/like/solana"); + + // let expected_crash_path = root.join("/home/crashes/we/like/solana"); assert_eq!(crash_dir, expected_crash_path); assert_eq!(&ext, "crash"); } From 9d4012ebe803c5bdf16615e14dd88929352525b2 Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:04:51 +0100 Subject: [PATCH 49/57] =?UTF-8?q?=F0=9F=91=B7=20update=20workflows=20for?= =?UTF-8?q?=20fuzz=20example=200=20with=20new=20fuzzer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run_fuzz_examples.yml | 26 +++++++++++++++++ ...{run_examples.yml => run_poc_examples.yml} | 28 +------------------ 2 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/run_fuzz_examples.yml rename .github/workflows/{run_examples.yml => run_poc_examples.yml} (54%) diff --git a/.github/workflows/run_fuzz_examples.yml b/.github/workflows/run_fuzz_examples.yml new file mode 100644 index 00000000..1ea48d3c --- /dev/null +++ b/.github/workflows/run_fuzz_examples.yml @@ -0,0 +1,26 @@ +on: + workflow_dispatch: + pull_request: + push: + branches: [master] + +name: Test Fuzz Tests + +env: + SOLANA_CLI_VERSION: 1.16.6 + ANCHOR_VERSION: 0.28.0 + +jobs: + test_fuzz_example0: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + - uses: ./.github/actions/setup-honggfuzz/ + id: rust-setup + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - name: Test Fuzz Example 0 + working-directory: examples/fuzz_example0 + run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_0 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_poc_examples.yml similarity index 54% rename from .github/workflows/run_examples.yml rename to .github/workflows/run_poc_examples.yml index 7c6a7381..5e13a3aa 100644 --- a/.github/workflows/run_examples.yml +++ b/.github/workflows/run_poc_examples.yml @@ -4,7 +4,7 @@ on: push: branches: [master] -name: Test Escrow and Turnstile +name: Test PoC Tests Escrow and Turnstile env: SOLANA_CLI_VERSION: 1.16.6 @@ -43,29 +43,3 @@ jobs: - name: Test Turnstile working-directory: examples/turnstile run: cargo run --manifest-path ../../Cargo.toml test - test_fuzzer: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-rust/ - - uses: ./.github/actions/setup-solana/ - - uses: ./.github/actions/setup-honggfuzz/ - id: rust-setup - - uses: Swatinem/rust-cache@v2 - name: Cache Rust and it's packages - - name: Test Fuzzer - working-directory: examples/fuzzer - run: cargo run --manifest-path ../../Cargo.toml fuzz run fuzz_1 - test_fuzzer_with_exit_code: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-rust/ - - uses: ./.github/actions/setup-solana/ - - uses: ./.github/actions/setup-honggfuzz/ - id: rust-setup - - uses: Swatinem/rust-cache@v2 - name: Cache Rust and it's packages - - name: Test Fuzzer - working-directory: examples/fuzzer - run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_1 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" From 57623c6e7a11a72968a42fb88cb7350b10aad5e3 Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:05:26 +0100 Subject: [PATCH 50/57] =?UTF-8?q?=E2=9C=A8=20add=20new=20fuzzer=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/derive/display_ix/Cargo.toml | 13 + crates/client/derive/display_ix/src/lib.rs | 34 ++ .../client/derive/fuzz_deserialize/Cargo.toml | 13 + .../client/derive/fuzz_deserialize/src/lib.rs | 34 ++ .../derive/fuzz_test_executor/Cargo.toml | 13 + .../derive/fuzz_test_executor/src/lib.rs | 80 ++++ crates/client/src/fuzzer/accounts_storage.rs | 136 ++++++ crates/client/src/fuzzer/data_builder.rs | 271 ++++++++++++ crates/client/src/fuzzer/fuzzer_generator.rs | 235 +++++++++++ crates/client/src/fuzzer/mod.rs | 9 + .../fuzzer/program_test_client_blocking.rs | 168 ++++++++ crates/client/src/fuzzer/snapshot.rs | 55 +++ .../client/src/fuzzer/snapshot_generator.rs | 397 ++++++++++++++++++ 13 files changed, 1458 insertions(+) create mode 100644 crates/client/derive/display_ix/Cargo.toml create mode 100644 crates/client/derive/display_ix/src/lib.rs create mode 100644 crates/client/derive/fuzz_deserialize/Cargo.toml create mode 100644 crates/client/derive/fuzz_deserialize/src/lib.rs create mode 100644 crates/client/derive/fuzz_test_executor/Cargo.toml create mode 100644 crates/client/derive/fuzz_test_executor/src/lib.rs create mode 100644 crates/client/src/fuzzer/accounts_storage.rs create mode 100644 crates/client/src/fuzzer/data_builder.rs create mode 100644 crates/client/src/fuzzer/fuzzer_generator.rs create mode 100644 crates/client/src/fuzzer/mod.rs create mode 100644 crates/client/src/fuzzer/program_test_client_blocking.rs create mode 100644 crates/client/src/fuzzer/snapshot.rs create mode 100644 crates/client/src/fuzzer/snapshot_generator.rs diff --git a/crates/client/derive/display_ix/Cargo.toml b/crates/client/derive/display_ix/Cargo.toml new file mode 100644 index 00000000..1dbcb0be --- /dev/null +++ b/crates/client/derive/display_ix/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "trdelnik-derive-displayix" +version = "0.0.1" +rust-version = "1.60" +edition = "2021" + +[lib] +proc-macro = true + +[dependencies] +proc-macro2 = "1.0" +quote = "1.0" +syn = "1" diff --git a/crates/client/derive/display_ix/src/lib.rs b/crates/client/derive/display_ix/src/lib.rs new file mode 100644 index 00000000..e1d2ca62 --- /dev/null +++ b/crates/client/derive/display_ix/src/lib.rs @@ -0,0 +1,34 @@ +use proc_macro::TokenStream; +use quote::quote; +use syn::{parse_macro_input, Data, DeriveInput}; + +#[proc_macro_derive(DisplayIx)] +pub fn display_ix(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + let enum_name = &input.ident; + + let display_impl = match &input.data { + Data::Enum(enum_data) => { + let display_match_arms = enum_data.variants.iter().map(|variant| { + let variant_name = &variant.ident; + + quote! { + #enum_name::#variant_name (_) => write!(f, stringify!(#variant_name)), + } + }); + + quote! { + impl std::fmt::Display for #enum_name { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + #(#display_match_arms)* + } + } + } + } + } + _ => panic!("DisplayIx can only be derived for enums"), + }; + + TokenStream::from(display_impl) +} diff --git a/crates/client/derive/fuzz_deserialize/Cargo.toml b/crates/client/derive/fuzz_deserialize/Cargo.toml new file mode 100644 index 00000000..e98bd094 --- /dev/null +++ b/crates/client/derive/fuzz_deserialize/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "trdelnik-derive-fuzz-deserialize" +version = "0.0.1" +rust-version = "1.60" +edition = "2021" + +[lib] +proc-macro = true + +[dependencies] +proc-macro2 = "1.0" +quote = "1.0" +syn = "1" diff --git a/crates/client/derive/fuzz_deserialize/src/lib.rs b/crates/client/derive/fuzz_deserialize/src/lib.rs new file mode 100644 index 00000000..d0bfe57a --- /dev/null +++ b/crates/client/derive/fuzz_deserialize/src/lib.rs @@ -0,0 +1,34 @@ +use proc_macro::TokenStream; +use quote::{format_ident, quote}; +use syn::{parse_macro_input, Data, DeriveInput}; + +#[proc_macro_derive(FuzzDeserialize)] +pub fn fuzz_deserialize(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + + let fuzz_deser_impls = match &input.data { + Data::Enum(enum_data) => { + let fuzz_deser_impl = enum_data.variants.iter().map(|variant| { + let variant_name = &variant.ident; + let snapshot_name = format_ident!("{}Snapshot", variant_name); + quote! { + impl<'info> FuzzDeserialize<'info> for #variant_name { + type Ix = #snapshot_name<'info>; + fn deserialize_option( + &self, + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> Result { + Self::Ix::deserialize_option(metas, accounts) + } + } + } + }); + + quote! { #(#fuzz_deser_impl)* } + } + _ => panic!("DisplayIx can only be derived for enums"), + }; + + TokenStream::from(fuzz_deser_impls) +} diff --git a/crates/client/derive/fuzz_test_executor/Cargo.toml b/crates/client/derive/fuzz_test_executor/Cargo.toml new file mode 100644 index 00000000..298397e7 --- /dev/null +++ b/crates/client/derive/fuzz_test_executor/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "trdelnik-derive-fuzz-test-executor" +version = "0.0.1" +rust-version = "1.60" +edition = "2021" + +[lib] +proc-macro = true + +[dependencies] +proc-macro2 = "1.0" +quote = "1.0" +syn = "1" diff --git a/crates/client/derive/fuzz_test_executor/src/lib.rs b/crates/client/derive/fuzz_test_executor/src/lib.rs new file mode 100644 index 00000000..993733bb --- /dev/null +++ b/crates/client/derive/fuzz_test_executor/src/lib.rs @@ -0,0 +1,80 @@ +use proc_macro::TokenStream; +use quote::quote; +use syn::{parse_macro_input, Data, DeriveInput}; + +#[proc_macro_derive(FuzzTestExecutor)] +pub fn fuzz_test_executor(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + let enum_name = &input.ident; + + let display_impl = match &input.data { + Data::Enum(enum_data) => { + let display_match_arms = enum_data.variants.iter().map(|variant| { + let variant_name = &variant.ident; + quote! { + #enum_name::#variant_name (ix) => { + let (mut signers, metas) = + if let Ok(acc) = ix.get_accounts(client, &mut accounts.borrow_mut()) { + acc + } else { + return Ok(()); + }; + let mut snaphot = Snapshot::new(&metas, ix); + snaphot.capture_before(client).unwrap(); + let data = + if let Ok(data) = ix.get_data(client, &mut accounts.borrow_mut()) { + data + } else { + return Ok(()); + }; + let ixx = Instruction { + program_id, + accounts: metas.clone(), + data: data.data(), + }; + let mut transaction = + Transaction::new_with_payer(&[ixx], Some(&client.payer().pubkey())); + signers.push(client.payer().clone()); + let sig: Vec<&Keypair> = signers.iter().collect(); + transaction.sign(&sig, client.get_last_blockhash()); + + let res = client.process_transaction(transaction); + snaphot.capture_after(client).unwrap(); + let (acc_before, acc_after) = snaphot.get_snapshot().unwrap(); // we want to panic if we cannot unwrap to cause a crash + if let Err(e) = ix.check(acc_before, acc_after, data) { + eprintln!( + "Custom check after the {} instruction did not pass with the error message: {}", + self, e + ); + eprintln!("Instruction data submitted to the instruction were:"); // TODO data does not implement Debug trait -> derive Debug trait on InitializeIx and automaticaly implement conversion from Initialize to InitializeIx + panic!("{}", e) + } + + if res.is_err() { + return Ok(()); + } + } + } + }); + + quote! { + impl FuzzTestExecutor for FuzzInstruction { + fn run_fuzzer( + &self, + program_id: Pubkey, + accounts: &RefCell, + client: &mut impl FuzzClient, + ) -> core::result::Result<(), Box> { + match self { + #(#display_match_arms)* + } + Ok(()) + } + } + } + } + _ => panic!("FuzzTestExecutor can only be derived for enums"), + }; + + TokenStream::from(display_impl) +} diff --git a/crates/client/src/fuzzer/accounts_storage.rs b/crates/client/src/fuzzer/accounts_storage.rs new file mode 100644 index 00000000..ffb44ef1 --- /dev/null +++ b/crates/client/src/fuzzer/accounts_storage.rs @@ -0,0 +1,136 @@ +use std::collections::HashMap; + +use solana_sdk::{pubkey::Pubkey, signature::Keypair}; + +use crate::{data_builder::FuzzClient, AccountId}; + +pub struct PdaStore { + pubkey: Pubkey, + pub seeds: Vec>, +} +impl PdaStore { + pub fn pubkey(&self) -> Pubkey { + self.pubkey + } +} + +pub struct TokenStore { + pub pubkey: Pubkey, +} + +pub struct MintStore { + pub pubkey: Pubkey, +} + +pub struct ProgramStore { + pub pubkey: u8, +} + +pub struct AccountsStorage { + accounts: HashMap, + pub max_accounts: u8, +} + +impl AccountsStorage { + pub fn new(max_accounts: u8) -> Self { + let accounts: HashMap = HashMap::new(); + Self { + accounts, + max_accounts, + } + } + + pub fn get(&self, account_id: AccountId) -> Option<&T> { + self.accounts.get(&account_id) + } +} + +impl Default for AccountsStorage { + fn default() -> Self { + Self::new(2) + } +} +// TODO Add an easy way to limit the number of created accounts +impl AccountsStorage { + pub fn get_or_create_account( + &mut self, + account_id: AccountId, + client: &mut impl FuzzClient, + lamports: u64, + ) -> Keypair { + let key = self + .accounts + .entry(account_id) + .or_insert_with(|| client.set_account(lamports)); + key.insecure_clone() + } +} + +impl AccountsStorage { + #[allow(clippy::too_many_arguments)] + pub fn get_or_create_account( + &mut self, + account_id: AccountId, + client: &mut impl FuzzClient, + mint: Pubkey, + owner: Pubkey, + amount: u64, + delegate: Option, + is_native: Option, + delegated_amount: u64, + close_authority: Option, + ) -> Option { + let key = self.accounts.entry(account_id).or_insert_with(|| { + let key = client.set_token_account( + mint, + owner, + amount, + delegate, + is_native, + delegated_amount, + close_authority, + ); + TokenStore { pubkey: key } + }); + Some(key.pubkey) + } +} + +impl AccountsStorage { + pub fn get_or_create_account( + &mut self, + account_id: AccountId, + client: &mut impl FuzzClient, + decimals: u8, + owner: &Pubkey, + freeze_authority: Option, + ) -> Option { + let key = self.accounts.entry(account_id).or_insert_with(|| { + let key = client.set_mint_account(decimals, owner, freeze_authority); + MintStore { pubkey: key } + }); + Some(key.pubkey) + } +} + +impl AccountsStorage { + pub fn get_or_create_account( + &mut self, + account_id: AccountId, + seeds: &[&[u8]], + program_id: &Pubkey, + ) -> Option<&PdaStore> { + let key = self.accounts.entry(account_id).or_insert( + if let Some((key, _)) = Pubkey::try_find_program_address(seeds, program_id) { + let seeds_vec: Vec<_> = seeds.iter().map(|&s| s.to_vec()).collect(); + PdaStore { + pubkey: key, + seeds: seeds_vec, + } + } else { + return None; + }, + ); + Some(key) + } +} diff --git a/crates/client/src/fuzzer/data_builder.rs b/crates/client/src/fuzzer/data_builder.rs new file mode 100644 index 00000000..30b53501 --- /dev/null +++ b/crates/client/src/fuzzer/data_builder.rs @@ -0,0 +1,271 @@ +use std::cell::RefCell; +use std::error::Error; +use std::fmt::Display; + +use anchor_client::anchor_lang::solana_program::account_info::{Account as Acc, AccountInfo}; +use anchor_client::anchor_lang::solana_program::hash::Hash; +use arbitrary::Arbitrary; +use arbitrary::Unstructured; +use solana_sdk::account::Account; +use solana_sdk::instruction::AccountMeta; +use solana_sdk::pubkey::Pubkey; +use solana_sdk::signature::Keypair; +use solana_sdk::transaction::VersionedTransaction; + +pub struct FuzzData { + pub pre_ixs: Vec, + pub ixs: Vec, + pub post_ixs: Vec, + pub accounts: RefCell, +} + +pub struct FuzzDataIterator<'a, T> { + pre_ixs_iter: std::slice::Iter<'a, T>, + ixs_iter: std::slice::Iter<'a, T>, + post_ixs_iter: std::slice::Iter<'a, T>, +} + +impl FuzzData { + pub fn iter(&self) -> FuzzDataIterator<'_, T> { + FuzzDataIterator { + pre_ixs_iter: self.pre_ixs.iter(), + ixs_iter: self.ixs.iter(), + post_ixs_iter: self.post_ixs.iter(), + } + } +} + +impl<'a, T> Iterator for FuzzDataIterator<'a, T> { + type Item = &'a T; + + fn next(&mut self) -> Option { + self.pre_ixs_iter + .next() + .or_else(|| self.ixs_iter.next()) + .or_else(|| self.post_ixs_iter.next()) + } +} + +impl FuzzData +where + T: FuzzTestExecutor + Display, +{ + pub fn run_with_runtime( + &self, + program_id: Pubkey, + client: &mut impl FuzzClient, + ) -> core::result::Result<(), Box> { + // solana_logger::setup_with_default("off"); + // #[cfg(fuzzing_debug)] + // solana_logger::setup_with_default( + // "solana_rbpf::vm=debug,\ + // solana_runtime::message_processor=debug,\ + // solana_runtime::system_instruction_processor=trace,\ + // solana_program_test=info,\ + // fuzz_target=info", + // ); + + // #[cfg(fuzzing_debug)] + { + eprintln!("Instructions sequence:"); + for ix in self.iter() { + eprintln!("{}", ix); + } + } + + for fuzz_ix in &mut self.iter() { + // #[cfg(fuzzing_debug)] + eprintln!("Currently processing: {}", fuzz_ix); + + fuzz_ix.run_fuzzer(program_id, &self.accounts, client)?; + } + Ok(()) + } +} + +pub trait FuzzTestExecutor { + fn run_fuzzer( + &self, + program_id: Pubkey, + accounts: &RefCell, + client: &mut impl FuzzClient, + ) -> core::result::Result<(), Box>; +} + +#[allow(unused_variables)] +pub trait FuzzDataBuilder Arbitrary<'a>> { + /// The instruction(s) executed as first, can be used for initialization. + fn pre_ixs(u: &mut Unstructured) -> arbitrary::Result> { + Ok(vec![]) + } + + /// The main instructions for fuzzing. + fn ixs(u: &mut Unstructured) -> arbitrary::Result> { + let v = >::arbitrary(u)?; + // Return always a vector with at least one element, othewise return error. + if v.is_empty() { + return Err(arbitrary::Error::NotEnoughData); + } + Ok(v) + } + + /// The instuction(s) executed as last. + fn post_ixs(u: &mut Unstructured) -> arbitrary::Result> { + Ok(vec![]) + } +} + +pub trait IxOps<'info> { + type IxData; + type IxAccounts; + type IxSnapshot; + // TODO maybe generate the From trait and return Ok(self.data.into()) + fn get_data( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut Self::IxAccounts, + ) -> Result; + + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut Self::IxAccounts, + ) -> Result<(Vec, Vec), FuzzingError>; + + // TODO implement better error with source and description + #[allow(unused_variables)] + fn check( + &self, + pre_ix: Self::IxSnapshot, + post_ix: Self::IxSnapshot, + ix_data: Self::IxData, + ) -> Result<(), &'static str> { + Ok(()) + } +} + +pub trait FuzzDeserialize<'info> { + type Ix; + // TODO return also remaining accounts + + fn deserialize_option( + &self, + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> Result; +} + +pub trait FuzzClient { + // TODO add method to add another program + // TODO add methods to modify current accounts + // TODO check if self must be mutable + fn set_account(&mut self, lamports: u64) -> Keypair; + #[allow(clippy::too_many_arguments)] + fn set_token_account( + &mut self, + mint: Pubkey, + owner: Pubkey, + amount: u64, + delegate: Option, + is_native: Option, + delegated_amount: u64, + close_authority: Option, + ) -> Pubkey; + fn set_mint_account( + &mut self, + decimals: u8, + owner: &Pubkey, + freeze_authority: Option, + ) -> Pubkey; + fn payer(&self) -> Keypair; + + fn get_account(&mut self, key: &Pubkey) -> Result, FuzzClientError>; // TODO support dynamic errors + // TODO add interface to modify existing accounts + fn get_accounts( + &mut self, + metas: &[AccountMeta], + ) -> Result>, FuzzClientError>; + + fn get_last_blockhash(&self) -> Hash; + + fn process_transaction( + &mut self, + transaction: impl Into, + ) -> Result<(), FuzzClientError>; +} + +#[derive(Debug)] +pub enum FuzzClientError { + CannotGetAccounts, + CannotProcessTransaction, // TODO add also custom error + ClientInitError, +} + +#[derive(Debug)] +pub enum FuzzingError { + // TODO Add context with_account_name() + CannotGetAccounts, + CannotGetInstructionData, + CannotDeserializeAccount, + NotEnoughAccounts, // TODO add also custom error +} + +#[macro_export] +macro_rules! fuzz_trd { + ($ix:ident: $ix_dty:ident , |$buf:ident: $dty:ident| $body:block) => { + fuzz(|$buf| { + let mut $buf: FuzzData<$ix_dty, _> = { + use arbitrary::Unstructured; + + let mut buf = Unstructured::new($buf); + if let Ok(fuzz_data) = build_ix_fuzz_data($dty {}, &mut buf) { + fuzz_data + } else { + return; + } + }; + $body + }); + }; +} + +pub fn build_ix_fuzz_data Arbitrary<'a>, T: FuzzDataBuilder, V: Default>( + _data_builder: T, + u: &mut arbitrary::Unstructured, +) -> arbitrary::Result> { + Ok(FuzzData { + pre_ixs: T::pre_ixs(u)?, + ixs: T::ixs(u)?, + post_ixs: T::post_ixs(u)?, + accounts: RefCell::new(V::default()), + }) +} + +/// Creates `AccountInfo`s from `Accounts` and corresponding `AccountMeta` slices. +pub fn get_account_infos_option<'info>( + accounts: &'info mut [Option], + metas: &'info [AccountMeta], +) -> Result>>, Box> { + let iter = accounts.iter_mut().zip(metas); + let r = iter + .map(|(account, meta)| { + if let Some(account) = account { + let (lamports, data, owner, executable, rent_epoch) = account.get(); + Some(AccountInfo::new( + &meta.pubkey, + meta.is_signer, + meta.is_writable, + lamports, + data, + owner, + executable, + rent_epoch, + )) + } else { + None + } + }) + .collect(); + + Ok(r) +} diff --git a/crates/client/src/fuzzer/fuzzer_generator.rs b/crates/client/src/fuzzer/fuzzer_generator.rs new file mode 100644 index 00000000..6d88399b --- /dev/null +++ b/crates/client/src/fuzzer/fuzzer_generator.rs @@ -0,0 +1,235 @@ +use std::collections::HashMap; + +use crate::idl::Idl; +use quote::{format_ident, ToTokens}; +use syn::{parse_quote, parse_str}; + +/// Generates `fuzz_instructions.rs` from [Idl] created from Anchor programs. +pub fn generate_source_code(idl: &Idl) -> String { + let code = idl + .programs + .iter() + .map(|idl_program| { + let program_name = idl_program.name.snake_case.replace('-', "_"); + let fuzz_instructions_module_name = format_ident!("{}_fuzz_instructions", program_name); + let module_name: syn::Ident = parse_str(&program_name).unwrap(); + + let instructions = idl_program + .instruction_account_pairs + .iter() + .fold( + Vec::new(), + |mut instructions, (idl_instruction, _idl_account_group)| { + let instruction_struct_name: syn::Ident = + parse_str(&idl_instruction.name.upper_camel_case).unwrap(); + + let instruction: syn::Variant = parse_quote! { + #instruction_struct_name(#instruction_struct_name) + }; + + instructions.push(instruction); + instructions + }, + ) + .into_iter(); + + let instructions_data = idl_program + .instruction_account_pairs + .iter() + .fold( + Vec::new(), + |mut instructions_data, (idl_instruction, idl_account_group)| { + let instruction_name: syn::Ident = + format_ident!("{}", &idl_instruction.name.upper_camel_case); + + let instruction_data_name: syn::Ident = + format_ident!("{}Data", &idl_instruction.name.upper_camel_case); + + let instruction_accounts_name: syn::Ident = + format_ident!("{}Accounts", &idl_instruction.name.upper_camel_case); + + let parameters = idl_instruction + .parameters + .iter() + .map(|(name, ty)| { + let name = format_ident!("{name}"); + let ty: syn::Type = parse_str(ty).unwrap(); + let parameter: syn::FnArg = parse_quote!(#name: #ty); + parameter + }) + .collect::>(); + + let accounts = idl_account_group + .accounts + .iter() + .map(|(name, _ty)| { + let name = format_ident!("{name}"); + let account: syn::FnArg = parse_quote!(#name: AccountId); + account + }) + .collect::>(); + + let ix_enum_variant: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Clone)] + pub struct #instruction_name { + pub accounts: #instruction_accounts_name, + pub data: #instruction_data_name + } + + }; + + let ix_accounts: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Clone)] + pub struct #instruction_accounts_name { + #(pub #accounts),* + } + + }; + let ix_data: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Clone)] + pub struct #instruction_data_name { + #(pub #parameters),* + } + + }; + + instructions_data.push(ix_enum_variant); + instructions_data.push(ix_accounts); + instructions_data.push(ix_data); + instructions_data + }, + ) + .into_iter(); + + let instructions_ixops_impls = idl_program + .instruction_account_pairs + .iter() + .fold( + Vec::new(), + |mut instructions_ixops_impl, (idl_instruction, idl_account_group)| { + let instruction_name: syn::Ident = + format_ident!("{}", &idl_instruction.name.upper_camel_case); + + let ix_snapshot: syn::Ident = + format_ident!("{}Snapshot", &idl_instruction.name.upper_camel_case); + + let parameters = idl_instruction + .parameters + .iter() + .map(|(name, _ty)| { + let name = format_ident!("{name}"); + let parameter: syn::FnArg = parse_quote!(#name: todo!()); + parameter + }) + .collect::>(); + + let accounts = idl_account_group + .accounts + .iter() + .map(|(name, _ty)| { + let name = format_ident!("{name}"); + let account: syn::FnArg = parse_quote!(#name: todo!()); + account + }) + .collect::>(); + + let ix_impl: syn::ItemImpl = parse_quote! { + impl<'info> IxOps<'info> for #instruction_name { + type IxData = #module_name::instruction::#instruction_name; + type IxAccounts = FuzzAccounts; + type IxSnapshot = #ix_snapshot<'info>; + + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = #module_name::instruction::#instruction_name { + #(#parameters),* + }; + Ok(data) + } + + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let signers = vec![todo!()]; + let acc_meta = #module_name::accounts::#instruction_name { + #(#accounts),* + } + .to_account_metas(None); + + Ok((signers, acc_meta)) + } + } + + }; + + instructions_ixops_impl.push(ix_impl); + instructions_ixops_impl + }, + ) + .into_iter(); + + let fuzz_accounts = idl_program + .instruction_account_pairs + .iter() + .fold( + HashMap::new(), + |mut fuzz_accounts, (_idl_instruction, idl_account_group)| { + idl_account_group.accounts.iter().fold( + &mut fuzz_accounts, + |fuzz_accounts, (name, _ty)| { + let name = format_ident!("{name}"); + fuzz_accounts.entry(name).or_insert_with(|| "".to_string()); + fuzz_accounts + }, + ); + + fuzz_accounts + }, + ) + .into_iter() + .map(|fuzz_accounts| { + // TODO find out the type of the account and remember it as Keypair, PdaStore, TokenStore, MintStore, ProgramStore etc. + fuzz_accounts.0 + }) + .collect::>() + .into_iter(); + + let fuzzer_module: syn::ItemMod = parse_quote! { + pub mod #fuzz_instructions_module_name { + use trdelnik_client::fuzzing::*; + use crate::accounts_snapshots::*; + + #[derive(Arbitrary, Clone, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + #(#instructions),* + } + + #(#instructions_data)* + + #(#instructions_ixops_impls)* + + // FIX this is just a workaround to propagate a comment to the source code easily + /// Use AccountsStorage where T can be one of: + /// Keypair, PdaStore, TokenStore, MintStore, ProgramStore + #[derive(Default)] + pub struct FuzzAccounts { + #(#fuzz_accounts: AccountsStorage),* + } + + impl FuzzAccounts { + pub fn new() -> Self { + Default::default() + } + } + } + }; + fuzzer_module.into_token_stream().to_string() + }) + .collect::(); + code +} diff --git a/crates/client/src/fuzzer/mod.rs b/crates/client/src/fuzzer/mod.rs new file mode 100644 index 00000000..2bdb08b5 --- /dev/null +++ b/crates/client/src/fuzzer/mod.rs @@ -0,0 +1,9 @@ +pub mod fuzzer_generator; +pub mod data_builder; +#[cfg(feature = "fuzzing")] +pub mod program_test_client_blocking; +pub mod snapshot; +pub mod accounts_storage; +pub mod snapshot_generator; + +pub type AccountId = u8; diff --git a/crates/client/src/fuzzer/program_test_client_blocking.rs b/crates/client/src/fuzzer/program_test_client_blocking.rs new file mode 100644 index 00000000..ab822107 --- /dev/null +++ b/crates/client/src/fuzzer/program_test_client_blocking.rs @@ -0,0 +1,168 @@ +use crate::fuzzing::solana_program_test::ProgramTest; +use crate::fuzzing::solana_program_test::ProgramTestContext; +use solana_program_runtime::invoke_context::ProcessInstructionWithContext; + +use solana_sdk::{ + account::Account, account::AccountSharedData, hash::Hash, instruction::AccountMeta, + program_option::COption, program_pack::Pack, pubkey::Pubkey, rent::Rent, signature::Keypair, + signature::Signer, system_program::ID as SYSTEM_PROGRAM_ID, transaction::VersionedTransaction, +}; +use spl_token::state::Mint; +use tokio::runtime::Builder; + +use crate::data_builder::{FuzzClient, FuzzClientError}; + +pub struct ProgramTestClientBlocking { + ctx: ProgramTestContext, + rt: tokio::runtime::Runtime, +} + +impl ProgramTestClientBlocking { + pub fn new( + program_name: &str, + program_id: Pubkey, + entry: Option, + ) -> Result { + let program_test = ProgramTest::new(program_name, program_id, entry); + // let rt: tokio::runtime::Runtime = Builder::new_multi_thread() + // .enable_all() + // .build() + // .map_err(|_| FuzzClientError::ClientInitError)?; + let rt: tokio::runtime::Runtime = Builder::new_current_thread() + .enable_all() + .build() + .map_err(|_| FuzzClientError::ClientInitError)?; + + let ctx = rt.block_on(program_test.start_with_context()); + Ok(Self { ctx, rt }) + } +} + +impl FuzzClient for ProgramTestClientBlocking { + fn set_account(&mut self, lamports: u64) -> Keypair { + let owner = Keypair::new(); + let account = AccountSharedData::new(lamports, 0, &SYSTEM_PROGRAM_ID); + self.ctx.set_account(&owner.pubkey(), &account); + owner + } + + fn set_token_account( + &mut self, + mint: Pubkey, + owner: Pubkey, + amount: u64, + delegate: Option, + is_native: Option, + delegated_amount: u64, + close_authority: Option, + ) -> Pubkey { + let mint_account_key = Keypair::new().pubkey(); + + let delegate = match delegate { + Some(a) => COption::Some(a), + _ => COption::None, + }; + + let is_native = match is_native { + Some(a) => COption::Some(a), + _ => COption::None, + }; + + let close_authority = match close_authority { + Some(a) => COption::Some(a), + _ => COption::None, + }; + + let r = Rent::default(); + let lamports = r.minimum_balance(spl_token::state::Account::LEN); + + let mut account = + AccountSharedData::new(lamports, spl_token::state::Account::LEN, &spl_token::id()); + + let token_account = spl_token::state::Account { + mint, + owner, + amount, + delegate, + state: spl_token::state::AccountState::Initialized, + is_native, + delegated_amount, + close_authority, + }; + + let mut data = vec![0u8; spl_token::state::Account::LEN]; + spl_token::state::Account::pack(token_account, &mut data[..]).unwrap(); + account.set_data_from_slice(&data); + self.ctx.set_account(&mint_account_key, &account); + + mint_account_key + } + + fn set_mint_account( + &mut self, + decimals: u8, + owner: &Pubkey, + freeze_authority: Option, + ) -> Pubkey { + let mint_account = Keypair::new(); + + let authority = match freeze_authority { + Some(a) => COption::Some(a), + _ => COption::None, + }; + + let r = Rent::default(); + let lamports = r.minimum_balance(Mint::LEN); + + let mut account = AccountSharedData::new(lamports, Mint::LEN, &spl_token::id()); + + let mint = Mint { + is_initialized: true, + mint_authority: COption::Some(*owner), + freeze_authority: authority, + decimals, + ..Default::default() + }; + + let mut data = vec![0u8; Mint::LEN]; + Mint::pack(mint, &mut data[..]).unwrap(); + account.set_data_from_slice(&data); + self.ctx.set_account(&mint_account.pubkey(), &account); + + mint_account.pubkey() + } + + fn payer(&self) -> Keypair { + self.ctx.payer.insecure_clone() + } + + fn get_account(&mut self, key: &Pubkey) -> Result, FuzzClientError> { + self.rt + .block_on(self.ctx.banks_client.get_account_with_commitment( + *key, + solana_sdk::commitment_config::CommitmentLevel::Confirmed, + )) + .map_err(|_| FuzzClientError::CannotGetAccounts) + } + + fn get_accounts( + &mut self, + metas: &[AccountMeta], + ) -> Result>, FuzzClientError> { + let result: Vec<_> = metas.iter().map(|m| self.get_account(&m.pubkey)).collect(); + result.into_iter().collect() + } + + fn get_last_blockhash(&self) -> Hash { + self.ctx.last_blockhash + } + + fn process_transaction( + &mut self, + transaction: impl Into, + ) -> Result<(), FuzzClientError> { + self.rt + .block_on(self.ctx.banks_client.process_transaction(transaction)) + .map_err(|_| FuzzClientError::CannotProcessTransaction) + } +} diff --git a/crates/client/src/fuzzer/snapshot.rs b/crates/client/src/fuzzer/snapshot.rs new file mode 100644 index 00000000..2a735ce9 --- /dev/null +++ b/crates/client/src/fuzzer/snapshot.rs @@ -0,0 +1,55 @@ +#![allow(dead_code)] // The Snapshot is constructed in the FuzzTestExecutor macro and is generated automatically + +use solana_sdk::{account::Account, instruction::AccountMeta}; + +use crate::data_builder::{FuzzDeserialize, FuzzClient, FuzzClientError, FuzzingError}; + + + +pub struct Snapshot<'info, T> { + before: Vec>, + after: Vec>, + metas: &'info [AccountMeta], + ix: &'info T, +} + +impl<'info, T> Snapshot<'info, T> +where + T: FuzzDeserialize<'info>, +{ + pub fn new(metas: &'info [AccountMeta], ix: &'info T) -> Snapshot<'info, T> { + Self { + before: Vec::new(), + after: Vec::new(), + metas, + ix, + } + } + + pub fn capture_before(&mut self, client: &mut impl FuzzClient) -> Result<(), FuzzClientError> { + self.before = self.capture(client)?; + Ok(()) + } + + pub fn capture_after(&mut self, client: &mut impl FuzzClient) -> Result<(), FuzzClientError> { + self.after = self.capture(client)?; + Ok(()) + } + + fn capture( + &mut self, + client: &mut impl FuzzClient, + ) -> Result>, FuzzClientError> { + let accounts; + { + accounts = client.get_accounts(self.metas)?; + } + Ok(accounts) + } + + pub fn get_snapshot(&'info mut self) -> Result<(T::Ix, T::Ix), FuzzingError> { + let pre_ix = self.ix.deserialize_option(self.metas, &mut self.before)?; + let post_ix = self.ix.deserialize_option(self.metas, &mut self.after)?; + Ok((pre_ix, post_ix)) + } +} diff --git a/crates/client/src/fuzzer/snapshot_generator.rs b/crates/client/src/fuzzer/snapshot_generator.rs new file mode 100644 index 00000000..2b8c7ced --- /dev/null +++ b/crates/client/src/fuzzer/snapshot_generator.rs @@ -0,0 +1,397 @@ +use std::{error::Error, fs::File, io::Read}; + +use cargo_metadata::camino::Utf8PathBuf; +use proc_macro2::TokenStream; +use quote::{format_ident, quote, ToTokens}; +use syn::parse::{Error as ParseError, Result as ParseResult}; +use syn::spanned::Spanned; +use syn::{ + parse_quote, Attribute, Fields, GenericArgument, Item, ItemStruct, PathArguments, TypePath, +}; + +pub fn generate_snapshots_code(code_path: &Vec<(String, Utf8PathBuf)>) -> Result { + let code = code_path.iter().map(|(code, path)| { + let mut mod_program = None::; + let mut file = File::open(path).map_err(|e| e.to_string())?; + let mut content = String::new(); + file.read_to_string(&mut content) + .map_err(|e| e.to_string())?; + + let parse_result = syn::parse_file(&content).map_err(|e| e.to_string())?; + + // locate the program module to extract instructions and corresponding Context structs + for item in parse_result.items.iter() { + if let Item::Mod(module) = item { + // Check if the module has the #[program] attribute + if has_program_attribute(&module.attrs) { + mod_program = Some(module.clone()) + } + } + } + + let mod_program = mod_program.ok_or("module with program attribute not found")?; + + let (_, items) = mod_program + .content + .ok_or("the content of program module is missing")?; + + let mut ix_ctx_pairs = Vec::new(); + for item in items { + // Iterate through items in program module and find functions with the Context<_> parameter. Save the function name and the Context's inner type. + if let syn::Item::Fn(func) = item { + let func_name = &func.sig.ident; + let first_param_type = if let Some(param) = func.sig.inputs.into_iter().next() { + let mut ty = None::; + if let syn::FnArg::Typed(t) = param { + if let syn::Type::Path(tp) = *t.ty.clone() { + if let Some(seg) = tp.path.segments.into_iter().next() { + if let PathArguments::AngleBracketed(arg) = seg.arguments { + ty = arg.args.first().cloned(); + } + } + } + } + ty + } else { + None + }; + + let first_param_type = first_param_type.ok_or(format!( + "The function {} does not have the Context parameter and is malformed.", + func_name + ))?; + + ix_ctx_pairs.push((func_name.clone(), first_param_type)); + } + } + + // Find definition of each Context struct and create new struct with fields wrapped in Option<_> + let mut structs = String::new(); + let mut desers = String::new(); + let parse_result = syn::parse_file(code).map_err(|e| e.to_string())?; + for pair in ix_ctx_pairs { + let mut ty = None; + if let GenericArgument::Type(syn::Type::Path(tp)) = &pair.1 { + ty = tp.path.get_ident().cloned(); + // TODO add support for types with fully qualified path such as ix::Initialize + } + let ty = ty.ok_or(format!("malformed parameters of {} instruction", pair.0))?; + // println!("{} - {}", pair.0, ty); + + // recursively find the context struct and create a new version with wrapped field into Option + if let Some(ctx) = get_ctx_struct(&parse_result.items, &ty) { + let wrapped_struct = wrap_fields_in_option(ctx).unwrap(); + // println!("{}", wrapped_struct); + let deser_code = deserialize_ctx_struct(ctx).unwrap(); + // println!("{}", deser_code); + structs = format!("{}{}", structs, wrapped_struct.into_token_stream()); + desers = format!("{}{}", desers, deser_code.into_token_stream()); + } else { + return Err(format!("The Context struct {} was not found", ty)); + } + } + let use_statements = quote! { + use trdelnik_client::fuzzing::anchor_lang::{prelude::*, self}; + use trdelnik_client::fuzzing::anchor_lang::solana_program::instruction::AccountMeta; + use trdelnik_client::fuzzing::{get_account_infos_option, FuzzingError}; + } + .into_token_stream(); + Ok(format!("{}{}{}", use_statements, structs, desers)) + }); + + code.into_iter().collect() +} + +/// Recursively find a struct with a given `name` +fn get_ctx_struct<'a>(items: &'a Vec, name: &'a syn::Ident) -> Option<&'a ItemStruct> { + for item in items { + if let Item::Struct(struct_item) = item { + if struct_item.ident == *name { + // println!("we found the struct {}", name); + return Some(struct_item); + } + } + } + + // if the ctx struct is not found on the first level, recursively continue to search in submodules + for item in items { + if let Item::Mod(mod_item) = item { + if let Some((_, items)) = &mod_item.content { + let r = get_ctx_struct(items, name); + if r.is_some() { + return r; + } + }; + } + } + + None +} + +fn wrap_fields_in_option(orig_struct: &ItemStruct) -> Result> { + let struct_name = format_ident!("{}Snapshot", orig_struct.ident); + let wrapped_fields = match orig_struct.fields.clone() { + Fields::Named(named) => { + let field_wrappers = named.named.iter().map(|field| { + let field_name = &field.ident; + let field_type = &field.ty; + quote! { + pub #field_name: Option<#field_type>, + } + }); + + quote! { + { #(#field_wrappers)* } + } + } + + _ => return Err("Only structs with named fields are supported".into()), + }; + + // Generate the new struct with Option-wrapped fields + let generated_struct: syn::ItemStruct = parse_quote! { + pub struct #struct_name<'info> #wrapped_fields + }; + + Ok(generated_struct.to_token_stream()) +} + +fn deserialize_ctx_struct(orig_struct: &ItemStruct) -> Result> { + let impl_name = format_ident!("{}Snapshot", orig_struct.ident); + let names_deser_pairs = match orig_struct.fields.clone() { + Fields::Named(named) => { + let field_deser = named.named.iter().map(|field| { + let field_name = match &field.ident { + Some(name) => name, + None => { + return Err(ParseError::new( + field.ident.span(), + "invalid account name given", + )) + } + }; + let field_type = &field.ty; + + let path = match &field_type { + syn::Type::Path(ty_path) => ty_path.path.clone(), + _ => { + return Err(ParseError::new( + field_type.span(), + "invalid account type given", + )) + } + }; + let id = path.segments[0].clone(); + // println!("field name: {}, type: {}", field_name, id.ident); + let ty = match id.ident.to_string().as_str() { + "AccountInfo" => AnchorType::AccountInfo, + "Signer" => AnchorType::Signer, + "Account" => AnchorType::Account(parse_account_ty(&path)?), + "Program" => AnchorType::Program(parse_program_ty(&path)?), // TODO + _ => return Err(ParseError::new(id.span(), "invalid account type given")), + }; + let deser_tokens = match ty.to_tokens() { + Some((return_type, deser_method)) => { + deserialize_tokens(field_name, return_type, deser_method) + } + None => acc_info_tokens(field_name), + }; + Ok(( + quote! {#field_name}, + quote! { + #deser_tokens + }, + )) + }); + let result: Result, _> = + field_deser.into_iter().collect(); + result + } + + _ => return Err("Only structs with named fields are supported".into()), + }?; + + let (names, fields_deser): (Vec<_>, Vec<_>) = names_deser_pairs.iter().cloned().unzip(); + + let generated_deser_impl: syn::Item = parse_quote! { + impl<'info> #impl_name<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + + let mut accounts_iter = accounts.into_iter(); + + #(#fields_deser)* + + Ok(Self { + #(#names),* + }) + } + } + }; + + Ok(generated_deser_impl.to_token_stream()) +} + +// TODO add all account types as in https://github.com/coral-xyz/anchor/blob/master/lang/syn/src/parser/accounts/mod.rs#L351 +pub enum AnchorType { + AccountInfo, + Signer, + Account(AccountTy), + Program(ProgramTy), +} + +impl AnchorType { + pub fn to_tokens(&self) -> Option<(TokenStream, TokenStream)> { + let (return_type, deser_method) = match self { + AnchorType::AccountInfo => return None, + AnchorType::Signer => ( + quote! { Signer<'_>}, + quote!(anchor_lang::accounts::signer::Signer::try_from(&acc)), + ), + AnchorType::Account(acc) => { + let path = &acc.account_type_path; + ( + quote! { anchor_lang::accounts::account::Account<#path>}, + quote! {anchor_lang::accounts::account::Account::try_from(&acc)}, + ) + } + AnchorType::Program(prog) => { + let path = &prog.account_type_path; + ( + quote! { anchor_lang::accounts::program::Program<#path>}, + quote!(anchor_lang::accounts::program::Program::try_from(&acc)), + ) + } + }; + Some((return_type, deser_method)) + } +} + +pub struct ProgramTy { + // The struct type of the account. + pub account_type_path: TypePath, +} + +pub struct AccountTy { + // The struct type of the account. + pub account_type_path: TypePath, + // True if the account has been boxed via `Box`. + pub boxed: bool, +} + +fn deserialize_tokens( + name: &syn::Ident, + return_type: TokenStream, + deser_method: TokenStream, +) -> TokenStream { + quote! { + let #name:Option<#return_type> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| #deser_method) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + } +} + +fn acc_info_tokens(name: &syn::Ident) -> TokenStream { + quote! { + let #name = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)?; + } +} + +fn parse_account_ty(path: &syn::Path) -> ParseResult { + let account_type_path = parse_account(path)?; + let boxed = tts_to_string(path) + .replace(' ', "") + .starts_with("Box ParseResult { + let account_type_path = parse_account(path)?; + Ok(ProgramTy { account_type_path }) +} + +pub fn tts_to_string(item: T) -> String { + let mut tts = proc_macro2::TokenStream::new(); + item.to_tokens(&mut tts); + tts.to_string() +} + +fn parse_account(mut path: &syn::Path) -> ParseResult { + let path_str = tts_to_string(path).replace(' ', ""); + if path_str.starts_with("Box { + // Expected: <'info, MyType>. + if args.args.len() != 1 { + return Err(ParseError::new( + args.args.span(), + "bracket arguments must be the lifetime and type", + )); + } + match &args.args[0] { + syn::GenericArgument::Type(syn::Type::Path(ty_path)) => { + path = &ty_path.path; + } + _ => { + return Err(ParseError::new( + args.args[1].span(), + "first bracket argument must be a lifetime", + )) + } + } + } + _ => { + return Err(ParseError::new( + segments.arguments.span(), + "expected angle brackets with a lifetime and type", + )) + } + } + } + + let segments = &path.segments[0]; + match &segments.arguments { + syn::PathArguments::AngleBracketed(args) => { + // Expected: <'info, MyType>. + if args.args.len() != 2 { + return Err(ParseError::new( + args.args.span(), + "bracket arguments must be the lifetime and type", + )); + } + match &args.args[1] { + syn::GenericArgument::Type(syn::Type::Path(ty_path)) => Ok(ty_path.clone()), + _ => Err(ParseError::new( + args.args[1].span(), + "first bracket argument must be a lifetime", + )), + } + } + _ => Err(ParseError::new( + segments.arguments.span(), + "expected angle brackets with a lifetime and type", + )), + } +} + +fn has_program_attribute(attrs: &Vec) -> bool { + for attr in attrs { + if attr.path.is_ident("program") { + return true; + } + } + false +} From 30f36daedb70f65644f00b8ea0ac172c949dcf7d Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:05:59 +0100 Subject: [PATCH 51/57] =?UTF-8?q?=E2=9C=85=20add=20fuzz=20example=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/fuzz_example0/.gitignore | 10 + examples/fuzz_example0/.prettierignore | 8 + .../fuzz_example0/.program_client/Cargo.toml | 10 + .../fuzz_example0/.program_client/src/lib.rs | 92 + examples/fuzz_example0/Anchor.toml | 15 + examples/fuzz_example0/Cargo.lock | 6199 +++++++++++++++++ examples/fuzz_example0/Cargo.toml | 11 + examples/fuzz_example0/README.md | 16 + examples/fuzz_example0/Trdelnik.toml | 30 + examples/fuzz_example0/migrations/deploy.ts | 12 + examples/fuzz_example0/package.json | 19 + .../fuzz_example0/programs/fuzzer/Cargo.toml | 19 + .../fuzz_example0/programs/fuzzer/Xargo.toml | 2 + .../fuzz_example0/programs/fuzzer/src/lib.rs | 61 + examples/fuzz_example0/tests/fuzzer.ts | 16 + .../trdelnik-tests/fuzz_tests/Cargo.toml | 24 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 87 + .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 127 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 31 + examples/fuzz_example0/tsconfig.json | 11 + 20 files changed, 6800 insertions(+) create mode 100644 examples/fuzz_example0/.gitignore create mode 100644 examples/fuzz_example0/.prettierignore create mode 100644 examples/fuzz_example0/.program_client/Cargo.toml create mode 100644 examples/fuzz_example0/.program_client/src/lib.rs create mode 100644 examples/fuzz_example0/Anchor.toml create mode 100644 examples/fuzz_example0/Cargo.lock create mode 100644 examples/fuzz_example0/Cargo.toml create mode 100644 examples/fuzz_example0/README.md create mode 100644 examples/fuzz_example0/Trdelnik.toml create mode 100644 examples/fuzz_example0/migrations/deploy.ts create mode 100644 examples/fuzz_example0/package.json create mode 100644 examples/fuzz_example0/programs/fuzzer/Cargo.toml create mode 100644 examples/fuzz_example0/programs/fuzzer/Xargo.toml create mode 100644 examples/fuzz_example0/programs/fuzzer/src/lib.rs create mode 100644 examples/fuzz_example0/tests/fuzzer.ts create mode 100644 examples/fuzz_example0/trdelnik-tests/fuzz_tests/Cargo.toml create mode 100644 examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs create mode 100644 examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs create mode 100644 examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs create mode 100644 examples/fuzz_example0/tsconfig.json diff --git a/examples/fuzz_example0/.gitignore b/examples/fuzz_example0/.gitignore new file mode 100644 index 00000000..b2a6476a --- /dev/null +++ b/examples/fuzz_example0/.gitignore @@ -0,0 +1,10 @@ + +.anchor +.DS_Store +target +**/*.rs.bk +node_modules +test-ledger +.yarn +trdelnik-tests/hfuzz_target +hfuzz_target diff --git a/examples/fuzz_example0/.prettierignore b/examples/fuzz_example0/.prettierignore new file mode 100644 index 00000000..c1a0b75f --- /dev/null +++ b/examples/fuzz_example0/.prettierignore @@ -0,0 +1,8 @@ + +.anchor +.DS_Store +target +node_modules +dist +build +test-ledger diff --git a/examples/fuzz_example0/.program_client/Cargo.toml b/examples/fuzz_example0/.program_client/Cargo.toml new file mode 100644 index 00000000..f8ae750e --- /dev/null +++ b/examples/fuzz_example0/.program_client/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "program_client" +version = "0.1.0" +edition = "2018" +[dependencies.trdelnik-client] +path = "../../../crates/client" + +[dependencies.fuzzer] +path = "../programs/fuzzer" +features = ["no-entrypoint"] diff --git a/examples/fuzz_example0/.program_client/src/lib.rs b/examples/fuzz_example0/.program_client/src/lib.rs new file mode 100644 index 00000000..4938b80c --- /dev/null +++ b/examples/fuzz_example0/.program_client/src/lib.rs @@ -0,0 +1,92 @@ +// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module +pub mod fuzzer_instruction { + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, 42u8, + 8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, 250u8, 145u8, + 26u8, 46u8, 170u8, 146u8, + ]); + #[allow(clippy::too_many_arguments)] + pub async fn initialize( + client: &Client, + a_counter: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzzer::instruction::Initialize {}, + fuzzer::accounts::Initialize { + counter: *a_counter, + user: *a_user, + system_program: *a_system_program, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn initialize_ix( + a_counter: &Pubkey, + a_user: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzzer::instruction::Initialize {}.data(), + accounts: fuzzer::accounts::Initialize { + counter: *a_counter, + user: *a_user, + system_program: *a_system_program, + } + .to_account_metas(None), + } + } + #[allow(clippy::too_many_arguments)] + pub async fn update( + client: &Client, + i_input1: u8, + i_input2: u8, + a_counter: &Pubkey, + a_authority: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzzer::instruction::Update { + input1: i_input1, + input2: i_input2, + }, + fuzzer::accounts::Update { + counter: *a_counter, + authority: *a_authority, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn update_ix( + i_input1: u8, + i_input2: u8, + a_counter: &Pubkey, + a_authority: &Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzzer::instruction::Update { + input1: i_input1, + input2: i_input2, + } + .data(), + accounts: fuzzer::accounts::Update { + counter: *a_counter, + authority: *a_authority, + } + .to_account_metas(None), + } + } +} diff --git a/examples/fuzz_example0/Anchor.toml b/examples/fuzz_example0/Anchor.toml new file mode 100644 index 00000000..32df6ce5 --- /dev/null +++ b/examples/fuzz_example0/Anchor.toml @@ -0,0 +1,15 @@ +[features] +seeds = false +skip-lint = false +[programs.localnet] +fuzz_trdelnik = "CTb5cKBLEGgFEw3jDGYCHCiHJ2PY2LFoxXhEPRhFFL4h" + +[registry] +url = "https://api.apr.dev" + +[provider] +cluster = "Localnet" +wallet = "~/.config/solana/id.json" + +[scripts] +test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" diff --git a/examples/fuzz_example0/Cargo.lock b/examples/fuzz_example0/Cargo.lock new file mode 100644 index 00000000..10235fa0 --- /dev/null +++ b/examples/fuzz_example0/Cargo.lock @@ -0,0 +1,6199 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom 0.2.10", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +dependencies = [ + "memchr", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.66", + "quote 1.0.33", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f468970344c7c9f9d03b4da854fd7c54f21305059f53789d0045c1dd803f0018" +dependencies = [ + "anchor-syn", + "anyhow", + "bs58 0.5.0", + "proc-macro2 1.0.66", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.66", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" +dependencies = [ + "anchor-syn", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-client" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" +dependencies = [ + "anchor-lang", + "anyhow", + "futures", + "regex", + "serde", + "solana-account-decoder", + "solana-client", + "solana-sdk", + "thiserror", + "tokio", + "url", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" +dependencies = [ + "anchor-syn", + "anyhow", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-space" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "anchor-lang" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d4b20100f1310a774aba3471ef268e5c4ba4d5c28c0bbe663c2658acbc414" +dependencies = [ + "anchor-attribute-access-control", + "anchor-attribute-account", + "anchor-attribute-constant", + "anchor-attribute-error", + "anchor-attribute-event", + "anchor-attribute-program", + "anchor-derive-accounts", + "anchor-derive-space", + "arrayref", + "base64 0.13.1", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.10", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-syn" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "heck 0.3.3", + "proc-macro2 1.0.66", + "quote 1.0.33", + "serde", + "serde_json", + "sha2 0.10.7", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint 0.4.3", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint 0.4.3", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.66", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal 0.10.3", + "borsh-schema-derive-internal 0.10.3", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.66", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "brotli" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "cargo-platform" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.0", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.66", + "quote 1.0.33", + "strsim 0.10.0", + "syn 2.0.29", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", + "rayon", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.3", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "dlopen" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" +dependencies = [ + "dlopen_derive", + "lazy_static", + "libc", + "winapi", +] + +[[package]] +name = "dlopen_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" +dependencies = [ + "libc", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek-bip32" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" +dependencies = [ + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.7", +] + +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fehler" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5729fe49ba028cd550747b6e62cd3d841beccab5390aa398538c31a2d983635" +dependencies = [ + "fehler-macros", +] + +[[package]] +name = "fehler-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fuzz_tests" +version = "0.1.0" +dependencies = [ + "arbitrary", + "assert_matches", + "fuzzer", + "honggfuzz", + "program_client", + "trdelnik-client", +] + +[[package]] +name = "fuzzer" +version = "0.1.0" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "goblin" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util 0.7.10", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "honggfuzz" +version = "0.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2", + "rustc_version", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls 0.21.10", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "index_list" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.2", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.0.0", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.3.5", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "pretty-hex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +dependencies = [ + "toml_edit 0.21.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "program_client" +version = "0.1.0" +dependencies = [ + "fuzzer", + "trdelnik-client", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "arbitrary", + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2 1.0.66", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.10", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom 0.2.10", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "async-compression", + "base64 0.21.2", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util 0.7.10", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.3", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "serde_json" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "serde_yaml" +version = "0.9.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" +dependencies = [ + "indexmap 2.1.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "solana-account-decoder" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1061ae0eecf24b58e57abce2fad5b962092887c6afcfd14ce8cc24818dac7ae4" +dependencies = [ + "Inflector", + "base64 0.21.2", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "spl-token", + "spl-token-2022", + "spl-token-metadata-interface", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a8cfddfed87fae43af3a539171267f8d47fd9a1f9a8e3fd2b7508b52ebb593" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-banks-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78fa99fb3c089a5ecc455c1b6eff7aed6833782ccffe8c2c35bc75138efe55c7" +dependencies = [ + "borsh 0.10.3", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6855f9fb2bbcaa5db359701bad0f4fa39647a21b2899db54d8843d64c26c5359" +dependencies = [ + "serde", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-banks-server" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b013dd7bc7b6a46b04c7ba2180c0814709b6a7dfe1365827d8c6b759bf538b73" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98a1e2ca4df9b8d33eaa97576f0e8041b6f9c907772fe35b170c1eead5382e2" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-bucket-map" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a6f74d4215c0425c732ade3371639bda4c16a723b5ac33a91cb634f0acc376" +dependencies = [ + "bv", + "log", + "memmap2", + "modular-bitfield", + "num_enum 0.6.1", + "rand 0.7.3", + "solana-measure", + "solana-sdk", + "tempfile", +] + +[[package]] +name = "solana-clap-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8460c35e48160995b9e6c377f8fd08ce478cae833decb1d54214253e76321f0" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25a9c58e392288570294d45544fe39ed1c2b4d0bcb8e5552deaa3e85ffcea9b" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-cli-output" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede6a6d9798a56a08e1cfaee2ca92ba93c631af8ff7d1e46998513dc31013c02" +dependencies = [ + "Inflector", + "base64 0.21.2", + "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.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffe77e35669aeda1c640153e8c7bc15b9b725e8957fd5911022980952e1dddb" +dependencies = [ + "async-trait", + "bincode", + "futures", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "quinn", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-compute-budget-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed90e87a7381cc4a93cd63c52fff8f60796144c797f7d2548efa0856e3cc35a" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-config-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "103c05b62d8b321cf3a3531a2b96ebb105df4eac2f80f26a7205d6bd7b9882ce" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-connection-cache" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c3df783562f7bca6d35c9d5dd17db3a1e7f22d54144d4180f1db5ccb3fdf0" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "log", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d229588852b514378c88ea74ef6fb93c5575758d2aa3a6a300872ccf5be51772" +dependencies = [ + "ahash 0.8.3", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.7", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad75a8290906967a9737c76bb5cc9769cee2097a6a6fbda08017562454ead020" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "rustc_version", + "syn 2.0.29", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0956aca0aa3a990a9bb341e13b541f1f18284db252f06185dbb7d040cb564c0" +dependencies = [ + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + +[[package]] +name = "solana-logger" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4896bca227a92b31c7be15f524850aba3255d94dcb837a4097daba723a84757" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b0389a4a6f956173904d7ad0eb5058723c25d68d7c75bdc434637e8a4e08a3" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7a9cbc8b9d706398e7653123c526aba0ffbf4bf4184e0190cdba386c8b600c" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f987bdd6a27eb48320f409b020f9d2646a2ec0ca8d9361de53be759bdd209e65" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.4.10", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897cee370814792aff81ae93578ead9e5bd35b2f7e45a956aa2b12536f6d81e3" +dependencies = [ + "ahash 0.8.3", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de52673b07eda66299b6ff858c54f3d08bdf4addc5c56969f0a94a09bb63f853" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.2", + "bincode", + "bitflags 1.3.2", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.10", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.9.0", + "num-bigint 0.4.3", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.7", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1046f13174ed22f56fa8658265dc952372407772c7bb3d8f60505afa1b30c1" +dependencies = [ + "base64 0.21.2", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "log", + "num-derive 0.3.3", + "num-traits", + "percentage", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-program-test" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b21eb50e63a6904a4b3dc0a265e61f10b83e0c9076d0e2a57b8279c928b712e" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.2", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a09f7e643a075001dc7362955b829181e027ff23b12049f576277e2ffb1d0a0c" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2c1955a009913174433ba086590b9baf785d7023248abf11b42534b1ac70e53" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls 0.20.9", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856ff9020c43ae49ed341572454e8b33d400c787f9f2a9f48783f3607c7e399a" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56a5a567539d6585acc0a0038da5f1350cfca6574272fef545988a469e87286b" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-rpc-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54fda1c759f8aa828052659ff1553d0383e721676110842b69e5e0ae997d6441" +dependencies = [ + "async-trait", + "base64 0.21.2", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29959e74308d074a88339712cf407a091bc9382a67298b8a83f02d0279aca1e" +dependencies = [ + "base64 0.21.2", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b14d3733afbe844ec9a6210982e7ea7bda23b5bce4af637e08a7a92f78b4b4" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c251f2b7656e22f31f4feb389e269015dde50fda994eea115ce0df8c4d27280" +dependencies = [ + "arrayref", + "base64 0.21.2", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive 0.3.3", + "num-traits", + "num_cpus", + "num_enum 0.6.1", + "once_cell", + "ouroboros", + "percentage", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d5e51b30ff694f1353755b0e1672bc01a6b72ad12353fac4e53957a2a1f783" +dependencies = [ + "assert_matches", + "base64 0.21.2", + "bincode", + "bitflags 1.3.2", + "borsh 0.10.3", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.7", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5c5ae1f2b5e7dec7dcab0199a642e1900b981c156547942156c5c4fbcc3eafa" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.66", + "quote 1.0.33", + "rustversion", + "syn 2.0.29", +] + +[[package]] +name = "solana-send-transaction-service" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5360bf4af2b98b8cfea90cd497490c3741e4f822c4fa75a4b4aba4f58414c0c2" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3abec79a2978cbd92567edbaf71bf7be16b0275123c1a67b5bb3902ea26b3e" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-streamer" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e552da2c1b63fed220858d4cf6dd585d8a5175a1e0a5fafbc56dda21630d57" +dependencies = [ + "async-channel", + "bytes", + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 1.9.3", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "quinn-proto", + "quinn-udp", + "rand 0.7.3", + "rcgen", + "rustls 0.20.9", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-system-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ed773979d7a5ccef68083f526f58c1196d8942f9f7e8f5f8dee744a1053fda" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c7d72a9ea3ac06bdcee2511c99fc14470edf0bda3d629cc50758438c2580b4" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cb713f3fd335ce1b3699314027605ca80231e9347ad1d09e1b7e1c58bf31d3" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-transaction-status" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e13704102abe15f421d6a59e65db6d8aa0c1a61540ab1c744c5ce58a086bc1c" +dependencies = [ + "Inflector", + "base64 0.21.2", + "bincode", + "borsh 0.10.3", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-sdk", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-udp-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96136ce9b671d9a0dc3c1231236fa2fa8aa5b7379c53449eb9bcb2214b6e8455" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32dc5d88030e9930b5e306e3562e7c81347165b42dc3ad6586d4ce91c9bba70a" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520cb33e0d3bf61075ca7919a5ec30ad34e95e1f467ecc1bea55d5a1f887cc88" +dependencies = [ + "bincode", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96da20016bf0e9d59cc2d262871d810f396fdda31fee7175c934d6f92cc3be8b" +dependencies = [ + "bytemuck", + "getrandom 0.1.16", + "num-derive 0.3.3", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66b682b70d18374f8619a1e61ec461d481d5ee7dc2057d53d7370176f41027c" +dependencies = [ + "aes-gcm-siv", + "base64 0.21.2", + "bincode", + "bytemuck", + "byteorder", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive 0.3.3", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "solana_rbpf" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" +dependencies = [ + "quote 1.0.33", + "spl-discriminator-syn", + "syn 2.0.29", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "sha2 0.10.7", + "syn 2.0.29", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + +[[package]] +name = "spl-program-error" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "sha2 0.10.7", + "syn 2.0.29", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.1", + "num-traits", + "num_enum 0.7.2", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", +] + +[[package]] +name = "spl-type-length-value" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", + "unicode-xid 0.2.4", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tarpc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" +dependencies = [ + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", +] + +[[package]] +name = "tarpc-plugins" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall 0.4.1", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls 0.20.9", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls 0.20.9", + "tokio", + "tokio-rustls 0.23.4", + "tungstenite", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap 1.9.3", + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "trdelnik-client" +version = "0.5.0" +dependencies = [ + "anchor-client", + "anchor-lang", + "anyhow", + "arbitrary", + "bincode", + "borsh 0.10.3", + "cargo_metadata", + "ed25519-dalek", + "fehler", + "futures", + "heck 0.4.1", + "honggfuzz", + "indicatif", + "log", + "pathdiff", + "proc-macro2 1.0.66", + "quinn-proto", + "quote 1.0.33", + "serde", + "serde_json", + "shellexpand", + "solana-account-decoder", + "solana-cli-output", + "solana-program-runtime", + "solana-program-test", + "solana-sdk", + "solana-transaction-status", + "spl-associated-token-account", + "spl-token", + "syn 1.0.109", + "thiserror", + "tokio", + "toml", + "trdelnik-derive-displayix", + "trdelnik-derive-fuzz-deserialize", + "trdelnik-derive-fuzz-test-executor", +] + +[[package]] +name = "trdelnik-derive-displayix" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "trdelnik-derive-fuzz-deserialize" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "trdelnik-derive-fuzz-test-executor" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.20.9", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "unsafe-libyaml" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" +dependencies = [ + "fnv", + "lazy_static", +] + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote 1.0.33", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/examples/fuzz_example0/Cargo.toml b/examples/fuzz_example0/Cargo.toml new file mode 100644 index 00000000..2826da50 --- /dev/null +++ b/examples/fuzz_example0/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +members = ["programs/*", "trdelnik-tests/fuzz_tests"] +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 + +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/examples/fuzz_example0/README.md b/examples/fuzz_example0/README.md new file mode 100644 index 00000000..9a2421dc --- /dev/null +++ b/examples/fuzz_example0/README.md @@ -0,0 +1,16 @@ +# Fuzz Test Example for Trdelnik Fuzzer + +--- + +## Program and Errors Description + +- ### Initialize + - In this function, we initialize a Counter Account, set the count to zero, and assign Authority to the Signer. + +- ### Update + - Based on the Instruction inputs, we update the count variable within the Counter Account. The eligible Update Authority must sign the Transaction. + - ❗ **NOTE:** 🐛 In the **buggy_math_function** that performs computations to obtain the new count, we fail to properly check input values. This oversight can result in **🚨division by zero🚨** or **🚨subtract with overflow 🚨**panic. + + +## Fuzz Test Checks +- ✔️ For this example, we do not need any specific checks because the **Fuzzer will automatically panic** when it detects **subtraction with overflow** or **division-by-zero** errors. diff --git a/examples/fuzz_example0/Trdelnik.toml b/examples/fuzz_example0/Trdelnik.toml new file mode 100644 index 00000000..bbb0c67c --- /dev/null +++ b/examples/fuzz_example0/Trdelnik.toml @@ -0,0 +1,30 @@ +[test] +validator_startup_timeout = 15000 + + +# contains default values +[fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) +iterations = 5000 +# 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) +keep_output = false +# Disable ANSI console; use simple log output (default: false) +verbose = false +# Exit upon seeing the first crash (default: false) +exit_upon_crash = true +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false diff --git a/examples/fuzz_example0/migrations/deploy.ts b/examples/fuzz_example0/migrations/deploy.ts new file mode 100644 index 00000000..82fb175f --- /dev/null +++ b/examples/fuzz_example0/migrations/deploy.ts @@ -0,0 +1,12 @@ +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. + +const anchor = require("@coral-xyz/anchor"); + +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + + // Add your deploy script here. +}; diff --git a/examples/fuzz_example0/package.json b/examples/fuzz_example0/package.json new file mode 100644 index 00000000..eb9ad4fb --- /dev/null +++ b/examples/fuzz_example0/package.json @@ -0,0 +1,19 @@ +{ + "scripts": { + "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + }, + "dependencies": { + "@coral-xyz/anchor": "^0.28.0" + }, + "devDependencies": { + "chai": "^4.3.4", + "mocha": "^9.0.3", + "ts-mocha": "^10.0.0", + "@types/bn.js": "^5.1.0", + "@types/chai": "^4.3.0", + "@types/mocha": "^9.0.0", + "typescript": "^4.3.5", + "prettier": "^2.6.2" + } +} diff --git a/examples/fuzz_example0/programs/fuzzer/Cargo.toml b/examples/fuzz_example0/programs/fuzzer/Cargo.toml new file mode 100644 index 00000000..2b5ea24b --- /dev/null +++ b/examples/fuzz_example0/programs/fuzzer/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "fuzzer" +version = "0.1.0" +description = "Created with Anchor" +edition = "2021" + +[lib] +crate-type = ["cdylib", "lib"] +name = "fuzzer" + +[features] +no-entrypoint = [] +no-idl = [] +no-log-ix-name = [] +cpi = ["no-entrypoint"] +default = [] + +[dependencies] +anchor-lang = "0.28.0" diff --git a/examples/fuzz_example0/programs/fuzzer/Xargo.toml b/examples/fuzz_example0/programs/fuzzer/Xargo.toml new file mode 100644 index 00000000..475fb71e --- /dev/null +++ b/examples/fuzz_example0/programs/fuzzer/Xargo.toml @@ -0,0 +1,2 @@ +[target.bpfel-unknown-unknown.dependencies.std] +features = [] diff --git a/examples/fuzz_example0/programs/fuzzer/src/lib.rs b/examples/fuzz_example0/programs/fuzzer/src/lib.rs new file mode 100644 index 00000000..27e5c971 --- /dev/null +++ b/examples/fuzz_example0/programs/fuzzer/src/lib.rs @@ -0,0 +1,61 @@ +use anchor_lang::prelude::*; + +const MAGIC_NUMBER: u8 = 254; +declare_id!("CTb5cKBLEGgFEw3jDGYCHCiHJ2PY2LFoxXhEPRhFFL4h"); + +#[program] +pub mod fuzzer { + use super::*; + + pub fn initialize(ctx: Context) -> Result<()> { + let counter = &mut ctx.accounts.counter; + + counter.count = 0; + counter.authority = ctx.accounts.user.key(); + + Ok(()) + } + + pub fn update(ctx: Context, input1: u8, input2: u8) -> Result<()> { + let counter = &mut ctx.accounts.counter; + + msg!("input1 = {}, input2 = {}", input1, input2); + + counter.count = buggy_math_function(input1, input2).into(); + Ok(()) + } +} + +pub fn buggy_math_function(input1: u8, input2: u8) -> u8 { + // INFO the if statement can prevent + // div-by-zero and subtract with overflow panic + // if input2 >= MAGIC_NUMBER { + // return 0; + // } + let divisor = MAGIC_NUMBER - input2; + input1 / divisor +} + +#[derive(Accounts)] +pub struct Initialize<'info> { + #[account(init, payer = user, space = 8 + 40)] + pub counter: Account<'info, Counter>, + + #[account(mut)] + pub user: Signer<'info>, + + pub system_program: Program<'info, System>, +} + +#[derive(Accounts)] +pub struct Update<'info> { + #[account(mut, has_one = authority)] + pub counter: Account<'info, Counter>, + pub authority: Signer<'info>, +} + +#[account] +pub struct Counter { + pub authority: Pubkey, + pub count: u64, +} diff --git a/examples/fuzz_example0/tests/fuzzer.ts b/examples/fuzz_example0/tests/fuzzer.ts new file mode 100644 index 00000000..e1a7a18d --- /dev/null +++ b/examples/fuzz_example0/tests/fuzzer.ts @@ -0,0 +1,16 @@ +import * as anchor from "@coral-xyz/anchor"; +import { Program } from "@coral-xyz/anchor"; +import { FuzzTrdelnik } from "../target/types/fuzzer"; + +describe("fuzzer", () => { + // Configure the client to use the local cluster. + anchor.setProvider(anchor.AnchorProvider.env()); + + const program = anchor.workspace.Fuzzer as Program; + + it("Is initialized!", async () => { + // Add your test here. + const tx = await program.methods.initialize().rpc(); + console.log("Your transaction signature", tx); + }); +}); diff --git a/examples/fuzz_example0/trdelnik-tests/fuzz_tests/Cargo.toml b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/Cargo.toml new file mode 100644 index 00000000..945b8332 --- /dev/null +++ b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/Cargo.toml @@ -0,0 +1,24 @@ +[[bin]] +name = "fuzz_0" +path = "fuzz_0/test_fuzz.rs" + +[package] +name = "fuzz_tests" +version = "0.1.0" +description = "Created with Trdelnik" +edition = "2021" + +[dependencies] +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + +[dependencies.trdelnik-client] +path = "../../../../crates/client" +features = ["fuzzing"] + +[dependencies.program_client] +path = "../../.program_client" + +[dependencies.fuzzer] +path = "../../programs/fuzzer" diff --git a/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs new file mode 100644 index 00000000..e3d7d91b --- /dev/null +++ b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -0,0 +1,87 @@ +use fuzzer::Counter; +use trdelnik_client::fuzzing::anchor_lang::solana_program::instruction::AccountMeta; +use trdelnik_client::fuzzing::anchor_lang::{self, prelude::*}; +use trdelnik_client::fuzzing::{get_account_infos_option, FuzzingError}; +pub struct InitializeSnapshot<'info> { + pub counter: Option>, + pub user: Option>, + pub system_program: Option>, +} +pub struct UpdateSnapshot<'info> { + pub counter: Option>, + pub authority: Option>, +} +impl<'info> InitializeSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + // ----------------------------- + let counter: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .unwrap_or(None); + // let counter: Option> = accounts_iter + // .next() + // .ok_or(FuzzingError::NotEnoughAccounts)? + // .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + // .transpose() + // .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + // ----------------------------- + + let user: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + counter, + user, + system_program, + }) + } +} +impl<'info> UpdateSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + // ----------------------------- + let counter: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .unwrap_or(None); + // let counter: Option> = accounts_iter + // .next() + // .ok_or(FuzzingError::NotEnoughAccounts)? + // .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + // .transpose() + // .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + // ----------------------------- + + let authority: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { counter, authority }) + } +} diff --git a/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs new file mode 100644 index 00000000..9e2bd742 --- /dev/null +++ b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -0,0 +1,127 @@ +pub mod fuzzer_fuzz_instructions { + use crate::accounts_snapshots::*; + use trdelnik_client::fuzzing::{solana_sdk::native_token::LAMPORTS_PER_SOL, *}; + #[derive(Arbitrary, Clone, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + Initialize(Initialize), + Update(Update), + } + #[derive(Arbitrary, Clone)] + pub struct Initialize { + pub accounts: InitializeAccounts, + pub data: InitializeData, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeAccounts { + pub counter: AccountId, + pub user: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeData {} + #[derive(Arbitrary, Clone)] + pub struct Update { + pub accounts: UpdateAccounts, + pub data: UpdateData, + } + #[derive(Arbitrary, Clone)] + pub struct UpdateAccounts { + pub counter: AccountId, + pub authority: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct UpdateData { + pub input1: u8, + pub input2: u8, + } + impl<'info> IxOps<'info> for Initialize { + type IxData = fuzzer::instruction::Initialize; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InitializeSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzzer::instruction::Initialize {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let user = fuzz_accounts.user.get_or_create_account( + self.accounts.user, + client, + 5 * LAMPORTS_PER_SOL, + ); + let counter = fuzz_accounts.counter.get_or_create_account( + self.accounts.counter, + client, + 5 * LAMPORTS_PER_SOL, + ); + + let acc_meta = fuzzer::accounts::Initialize { + counter: counter.pubkey(), + user: user.pubkey(), + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((vec![user, counter], acc_meta)) + } + } + impl<'info> IxOps<'info> for Update { + type IxData = fuzzer::instruction::Update; + type IxAccounts = FuzzAccounts; + type IxSnapshot = UpdateSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzzer::instruction::Update { + input1: self.data.input1, + input2: self.data.input2, + }; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let user = fuzz_accounts.user.get_or_create_account( + self.accounts.authority, + client, + 15 * LAMPORTS_PER_SOL, + ); + let counter = fuzz_accounts.counter.get_or_create_account( + self.accounts.counter, + client, + 5 * LAMPORTS_PER_SOL, + ); + + let acc_meta = fuzzer::accounts::Update { + counter: counter.pubkey(), + authority: user.pubkey(), + } + .to_account_metas(None); + Ok((vec![user], acc_meta)) + } + } + #[doc = r" Use AccountsStorage where T can be one of:"] + #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] + #[derive(Default)] + pub struct FuzzAccounts { + _system_program: AccountsStorage, + user: AccountsStorage, + counter: AccountsStorage, + _authority: AccountsStorage, + } + impl FuzzAccounts { + pub fn new() -> Self { + Default::default() + } + } +} diff --git a/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs new file mode 100644 index 00000000..583ad67e --- /dev/null +++ b/examples/fuzz_example0/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -0,0 +1,31 @@ +use fuzz_instructions::fuzzer_fuzz_instructions::FuzzInstruction; +// this had to be imported manually +use fuzz_instructions::fuzzer_fuzz_instructions::Initialize; +// --------------------- +use fuzzer::entry; +use program_client::fuzzer_instruction::*; +use trdelnik_client::{fuzz_trd, fuzzing::*}; +mod accounts_snapshots; +mod fuzz_instructions; + +const PROGRAM_NAME: &str = "fuzzer"; + +struct MyFuzzData; + +impl FuzzDataBuilder for MyFuzzData { + fn pre_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + let init = FuzzInstruction::Initialize(Initialize::arbitrary(u)?); + Ok(vec![init]) + } +} + +fn main() { + loop { + fuzz_trd!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { + let mut client = + ProgramTestClientBlocking::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)) + .unwrap(); + let _ = fuzz_data.run_with_runtime(PROGRAM_ID, &mut client); + }); + } +} diff --git a/examples/fuzz_example0/tsconfig.json b/examples/fuzz_example0/tsconfig.json new file mode 100644 index 00000000..558b83e5 --- /dev/null +++ b/examples/fuzz_example0/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "types": ["mocha", "chai"], + "typeRoots": ["./node_modules/@types"], + "lib": ["es2015"], + "module": "commonjs", + "target": "es6", + "esModuleInterop": true + } + } + \ No newline at end of file From 3c67ed401f4ad0efef8e4b5c13e05605480c3e3b Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:07:04 +0100 Subject: [PATCH 52/57] =?UTF-8?q?=E2=9C=A8=20new=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trdelnik-tests/accounts_snapshots.rs | 2 ++ .../trdelnik-tests/fuzz_instructions.rs | 2 ++ .../templates/trdelnik-tests/fuzz_target.rs | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 crates/client/src/templates/trdelnik-tests/accounts_snapshots.rs create mode 100644 crates/client/src/templates/trdelnik-tests/fuzz_instructions.rs create mode 100644 crates/client/src/templates/trdelnik-tests/fuzz_target.rs diff --git a/crates/client/src/templates/trdelnik-tests/accounts_snapshots.rs b/crates/client/src/templates/trdelnik-tests/accounts_snapshots.rs new file mode 100644 index 00000000..ed5d9aa6 --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/accounts_snapshots.rs @@ -0,0 +1,2 @@ +// DO NOT EDIT - automatically generated file +// [content not yet generated] diff --git a/crates/client/src/templates/trdelnik-tests/fuzz_instructions.rs b/crates/client/src/templates/trdelnik-tests/fuzz_instructions.rs new file mode 100644 index 00000000..ed5d9aa6 --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/fuzz_instructions.rs @@ -0,0 +1,2 @@ +// DO NOT EDIT - automatically generated file +// [content not yet generated] diff --git a/crates/client/src/templates/trdelnik-tests/fuzz_target.rs b/crates/client/src/templates/trdelnik-tests/fuzz_target.rs new file mode 100644 index 00000000..62e4d482 --- /dev/null +++ b/crates/client/src/templates/trdelnik-tests/fuzz_target.rs @@ -0,0 +1,20 @@ +use trdelnik_client::{fuzz_trd, fuzzing::*}; +mod accounts_snapshots; +mod fuzz_instructions; + +const PROGRAM_NAME: &str = "###PROGRAM_NAME###"; + +struct MyFuzzData; + +impl FuzzDataBuilder for MyFuzzData {} + +fn main() { + loop { + fuzz_trd!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { + let mut client = + ProgramTestClientBlocking::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)) + .unwrap(); + let _ = fuzz_data.run_with_runtime(PROGRAM_ID, &mut client); + }); + } +} From de40781d0e379dbfbd663c4278875e447a7f6ac1 Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:07:32 +0100 Subject: [PATCH 53/57] =?UTF-8?q?=E2=9C=A8=20integrate=20new=20fuzzer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/command/fuzz.rs | 2 +- crates/client/Cargo.toml | 9 +++- crates/client/src/commander.rs | 53 +++++++++++++++--------- crates/client/src/lib.rs | 28 +++++++++++++ crates/client/src/workspace_builder.rs | 57 +++++++++++++++++++++++--- 5 files changed, 121 insertions(+), 28 deletions(-) diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 2cbc303f..961d5f7f 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -61,7 +61,7 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { target, crash_file_path, } => { - Commander::run_fuzzer_debug(target, crash_file_path, root).await?; + Commander::run_fuzzer_debug(target, crash_file_path).await?; } FuzzCommand::Add => { let mut generator = WorkspaceBuilder::new_with_root(root); diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index b8d6d2bb..c10897e8 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -11,8 +11,8 @@ description = "The trdelnik_client crate helps you build and deploy an Anchor pr fuzzing = [ "dep:solana-program-test", "dep:honggfuzz", - "arbitrary/derive", "quinn-proto/arbitrary", + "dep:solana-program-runtime", ] poctesting = ["dep:rstest", "dep:serial_test", "dep:trdelnik-test"] [build-dependencies] @@ -22,6 +22,9 @@ anyhow = { version = "1.0.45", features = ["std"], default-features = false } pretty_assertions = "1.1.0" [dependencies] +trdelnik-derive-displayix = { path = "./derive/display_ix" } +trdelnik-derive-fuzz-deserialize = { path = "./derive/fuzz_deserialize" } +trdelnik-derive-fuzz-test-executor = { path = "./derive/fuzz_test_executor" } solana-sdk = { workspace = true } solana-cli-output = { workspace = true } solana-transaction-status = { workspace = true } @@ -51,9 +54,11 @@ trdelnik-test = { workspace = true, optional = true } serial_test = { version = "2.0.0", optional = true } rstest = { version = "0.18.2", optional = true } honggfuzz = { version = "0.5.55", optional = true } -arbitrary = { version = "1.3.0", optional = true } +arbitrary = { version = "1.3.0", features = ["derive"] } solana-program-test = { version = "1.16.9", optional = true } quinn-proto = { version = "0.9.4", optional = true } shellexpand = { workspace = true } pathdiff = "0.2.1" indicatif = "0.17.7" +solana-program-runtime = { version = "1.16.17", optional = true } +proc-macro2 = { workspace = true } diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 3af99ffd..9cd5ea4d 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -165,22 +165,42 @@ impl Commander { } #[throws] - pub async fn build_program_packages(packages: &[cargo_metadata::Package]) -> Idl { + pub async fn build_program_packages( + packages: &[cargo_metadata::Package], + ) -> (Idl, Vec<(String, cargo_metadata::camino::Utf8PathBuf)>) { let shared_mutex = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + let shared_mutex_fuzzer = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + for package in packages.iter() { let mutex = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); let c_mutex = std::sync::Arc::clone(&mutex); let name = package.name.clone(); + + let mut libs = package.targets.iter().filter(|&t| t.is_lib()); + let lib_path = libs + .next() + .ok_or(Error::ReadProgramCodeFailed( + "Cannot find program library path.".into(), + ))? + .src_path + .clone(); + let c_shared_mutex = std::sync::Arc::clone(&shared_mutex); + let c_shared_mutex_fuzzer = std::sync::Arc::clone(&shared_mutex_fuzzer); + let cargo_thread = std::thread::spawn(move || -> Result<(), Error> { let output = Self::build_package(&name); if output.status.success() { let code = String::from_utf8(output.stdout).unwrap(); + let idl_program = Idl::parse_to_idl_program(&name, &code).unwrap(); let mut vec = c_shared_mutex.lock().unwrap(); + let mut vec_fuzzer = c_shared_mutex_fuzzer.lock().unwrap(); + vec.push(idl_program); + vec_fuzzer.push((code, lib_path)); c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); Ok(()) @@ -195,13 +215,17 @@ impl Commander { cargo_thread.join().unwrap()?; } let idl_programs = shared_mutex.lock().unwrap().to_vec(); + let codes_libs_pairs = shared_mutex_fuzzer.lock().unwrap().to_vec(); if idl_programs.is_empty() { throw!(Error::NoProgramsFound); } else { - Idl { - programs: idl_programs, - } + ( + Idl { + programs: idl_programs, + }, + codes_libs_pairs, + ) } } #[throws] @@ -413,28 +437,17 @@ impl Commander { /// Runs fuzzer on the given target. #[throws] - pub async fn run_fuzzer_debug(target: String, crash_file_path: String, root: String) { - let root = std::path::Path::new(&root); - - let cur_dir = root.join(TESTS_WORKSPACE_DIRECTORY); - let crash_file = std::env::current_dir()?.join(crash_file_path); - - if !cur_dir.try_exists()? { - throw!(Error::NotInitialized); - } - - if !crash_file.try_exists()? { - println!("The crash file {:?} not found!", crash_file); - throw!(Error::CrashFileNotFound); - } + pub async fn run_fuzzer_debug(target: String, crash_file_path: String) { + let cargo_target_dir = + std::env::var("CARGO_TARGET_DIR").unwrap_or(CARGO_TARGET_DIR_DEFAULT.to_string()); // using exec rather than spawn and replacing current process to avoid unflushed terminal output after ctrl+c signal std::process::Command::new("cargo") - .current_dir(cur_dir) + .env("CARGO_TARGET_DIR", cargo_target_dir) .arg("hfuzz") .arg("run-debug") .arg(target) - .arg(crash_file) + .arg(crash_file_path) .exec(); eprintln!("cannot execute \"cargo hfuzz run-debug\" command"); diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 8127c2e9..bb412601 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -5,13 +5,36 @@ #[cfg(feature = "fuzzing")] pub mod fuzzing { + pub use super::fuzzer::accounts_storage::*; + pub use super::fuzzer::data_builder::build_ix_fuzz_data; + pub use super::fuzzer::data_builder::*; + pub use super::fuzzer::program_test_client_blocking::ProgramTestClientBlocking; + pub use super::fuzzer::snapshot::Snapshot; + pub use super::fuzzer::*; pub use anchor_lang; pub use arbitrary; pub use arbitrary::Arbitrary; pub use honggfuzz::fuzz; pub use solana_program_test; pub use solana_sdk; + pub use solana_sdk::pubkey::Pubkey; pub use solana_sdk::signer::Signer; + + pub use std::cell::RefCell; + pub use trdelnik_derive_displayix::DisplayIx; + pub use trdelnik_derive_fuzz_deserialize::FuzzDeserialize; + pub use trdelnik_derive_fuzz_test_executor::FuzzTestExecutor; + + // ----- + pub use anchor_lang::solana_program::instruction::AccountMeta; + pub use anchor_lang::{InstructionData, ToAccountMetas}; + pub use solana_sdk::account::Account; + pub use solana_sdk::instruction::Instruction; + pub use solana_sdk::signer::keypair::Keypair; + pub use solana_sdk::transaction::Transaction; + + pub use super::temp_clone::TempClone; + pub use solana_program_test::processor; } pub mod prelude { @@ -73,6 +96,9 @@ use commander::Commander; mod idl; use idl::{Idl, IdlError}; +mod fuzzer; +pub use fuzzer::*; + mod program_client_generator; mod workspace_builder; @@ -90,6 +116,8 @@ mod constants { pub const LIB: &str = "lib.rs"; pub const SRC: &str = "src"; + pub const ACCOUNTS_SNAPSHOTS_FILE_NAME: &str = "accounts_snapshots.rs"; + pub const FUZZ_INSTRUCTIONS_FILE_NAME: &str = "fuzz_instructions.rs"; pub const TESTS_WORKSPACE_DIRECTORY: &str = "trdelnik-tests"; pub const POC_TEST_DIRECTORY: &str = "poc_tests"; pub const TESTS: &str = "tests"; diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 5ba5c864..266d5681 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -34,6 +34,8 @@ pub enum Error { NoProgramsFound, #[error("parsing Cargo.toml dependencies failed")] ParsingCargoTomlDependenciesFailed, + #[error("read program code failed: '{0}'")] + ReadProgramCodeFailed(String), } macro_rules! construct_path { @@ -51,6 +53,7 @@ pub struct WorkspaceBuilder { idl: Idl, use_tokens: Vec, packages: Vec, + codes_libs_pairs: Vec<(String, cargo_metadata::camino::Utf8PathBuf)>, } impl Default for WorkspaceBuilder { fn default() -> Self { @@ -67,6 +70,7 @@ impl WorkspaceBuilder { idl: Idl::default(), use_tokens: vec![syn::parse_quote! { use trdelnik_client::prelude::*; }], packages: vec![], + codes_libs_pairs: vec![], } } /// ## Build program packages, accordingly updates program client @@ -146,7 +150,8 @@ impl WorkspaceBuilder { #[throws] async fn build_packages(&mut self) { self.packages = Commander::collect_program_packages().await?; - self.idl = Commander::build_program_packages(&self.packages).await?; + (self.idl, self.codes_libs_pairs) = + Commander::build_program_packages(&self.packages).await?; self.use_tokens = Commander::build_program_client().await?; } @@ -244,6 +249,37 @@ impl WorkspaceBuilder { self.create_directory(&new_fuzz_test_dir).await?; + // TODO IDL HAS TO BE CHECKED + let fuzz_instructions = crate::fuzzer::fuzzer_generator::generate_source_code(&self.idl); + let fuzz_instructions = Commander::format_program_code(&fuzz_instructions).await?; + + let fuzzer_snapshots = + crate::snapshot_generator::generate_snapshots_code(&self.codes_libs_pairs) + .map_err(Error::ReadProgramCodeFailed)?; + let fuzzer_snapshots = Commander::format_program_code(&fuzzer_snapshots).await?; + + let fuzz_instructions_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + &new_fuzz_test, + FUZZ_INSTRUCTIONS_FILE_NAME + ); + + let fuzz_snapshots_path = construct_path!( + self.root, + TESTS_WORKSPACE_DIRECTORY, + FUZZ_TEST_DIRECTORY, + &new_fuzz_test, + ACCOUNTS_SNAPSHOTS_FILE_NAME + ); + + self.create_file(&fuzz_instructions_path, &fuzz_instructions) + .await?; + + self.create_file(&fuzz_snapshots_path, &fuzzer_snapshots) + .await?; + let fuzz_test_path = construct_path!( self.root, TESTS_WORKSPACE_DIRECTORY, @@ -252,14 +288,25 @@ impl WorkspaceBuilder { FUZZ_TEST ); - let fuzz_test_content = load_template("/src/templates/trdelnik-tests/fuzz_test.tmpl.rs")?; + let fuzz_test_content = load_template("/src/templates/trdelnik-tests/fuzz_target.rs")?; let use_entry = format!("use {}::entry;\n", program_name); let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); - let mut template = format!("{use_entry}{use_instructions}{fuzz_test_content}"); - template = template.replace("###PROGRAM_NAME###", program_name); + let use_fuzz_instructions = format!( + "use fuzz_instructions::{}_fuzz_instructions::FuzzInstruction;\n", + program_name + ); + let template = + format!("{use_entry}{use_instructions}{use_fuzz_instructions}{fuzz_test_content}"); + let fuzz_test_content = template.replace("###PROGRAM_NAME###", program_name); - self.create_file(&fuzz_test_path, &template).await?; + // let use_entry = format!("use {}::entry;\n", program_name); + // let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); + // let mut template = format!("{use_entry}{use_instructions}{fuzz_test_content}"); + // template = template.replace("###PROGRAM_NAME###", program_name); + + self.create_file(&fuzz_test_path, &fuzz_test_content) + .await?; let cargo_path = construct_path!( self.root, From 830aabee886c106caaa0acd56c29e8ebebf9aeee Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 22:18:48 +0100 Subject: [PATCH 54/57] =?UTF-8?q?=F0=9F=9A=A8=20fmt=20+=20clippy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/fuzzer/mod.rs | 4 ++-- crates/client/src/fuzzer/snapshot.rs | 4 +--- crates/client/src/fuzzer/snapshot_generator.rs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/client/src/fuzzer/mod.rs b/crates/client/src/fuzzer/mod.rs index 2bdb08b5..eaa97134 100644 --- a/crates/client/src/fuzzer/mod.rs +++ b/crates/client/src/fuzzer/mod.rs @@ -1,9 +1,9 @@ -pub mod fuzzer_generator; +pub mod accounts_storage; pub mod data_builder; +pub mod fuzzer_generator; #[cfg(feature = "fuzzing")] pub mod program_test_client_blocking; pub mod snapshot; -pub mod accounts_storage; pub mod snapshot_generator; pub type AccountId = u8; diff --git a/crates/client/src/fuzzer/snapshot.rs b/crates/client/src/fuzzer/snapshot.rs index 2a735ce9..99882892 100644 --- a/crates/client/src/fuzzer/snapshot.rs +++ b/crates/client/src/fuzzer/snapshot.rs @@ -2,9 +2,7 @@ use solana_sdk::{account::Account, instruction::AccountMeta}; -use crate::data_builder::{FuzzDeserialize, FuzzClient, FuzzClientError, FuzzingError}; - - +use crate::data_builder::{FuzzClient, FuzzClientError, FuzzDeserialize, FuzzingError}; pub struct Snapshot<'info, T> { before: Vec>, diff --git a/crates/client/src/fuzzer/snapshot_generator.rs b/crates/client/src/fuzzer/snapshot_generator.rs index 2b8c7ced..a5923351 100644 --- a/crates/client/src/fuzzer/snapshot_generator.rs +++ b/crates/client/src/fuzzer/snapshot_generator.rs @@ -9,7 +9,7 @@ use syn::{ parse_quote, Attribute, Fields, GenericArgument, Item, ItemStruct, PathArguments, TypePath, }; -pub fn generate_snapshots_code(code_path: &Vec<(String, Utf8PathBuf)>) -> Result { +pub fn generate_snapshots_code(code_path: &[(String, Utf8PathBuf)]) -> Result { let code = code_path.iter().map(|(code, path)| { let mut mod_program = None::; let mut file = File::open(path).map_err(|e| e.to_string())?; From 3ef17e48fc0a7daf92cc1cfacca852e1087620de Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 23:13:38 +0100 Subject: [PATCH 55/57] =?UTF-8?q?=F0=9F=91=B7=20update=20workflow=20for=20?= =?UTF-8?q?Fuzz=20example=202=20-=20for=20two=20fuzz=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run_fuzz_examples.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/run_fuzz_examples.yml b/.github/workflows/run_fuzz_examples.yml index 1ea48d3c..bc81f553 100644 --- a/.github/workflows/run_fuzz_examples.yml +++ b/.github/workflows/run_fuzz_examples.yml @@ -24,3 +24,19 @@ jobs: - name: Test Fuzz Example 0 working-directory: examples/fuzz_example0 run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_0 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" + test_fuzz_example1: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-rust/ + - uses: ./.github/actions/setup-solana/ + - uses: ./.github/actions/setup-honggfuzz/ + id: rust-setup + - uses: Swatinem/rust-cache@v2 + name: Cache Rust and it's packages + - name: Test Fuzz Example 1 - Check:1 + working-directory: examples/fuzz_example1 + run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_0 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" + - name: Test Fuzz Example 1 - Check:2 + working-directory: examples/fuzz_example1 + run: cargo run --manifest-path ../../Cargo.toml fuzz run -w fuzz_1 && echo "Fuzzer did not find anything" || echo "Fuzzer found an Error" From 91f40e8b4d3ddbefad5a8a779398b50e7bd56dcb Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 23:14:21 +0100 Subject: [PATCH 56/57] =?UTF-8?q?=F0=9F=90=9B=20exclude=20fuzzing=20when?= =?UTF-8?q?=20adding=20new=20fuzz=20test=20-=20this=20is=20not=20best=20op?= =?UTF-8?q?tion=20as=20folder=20can=20contain=20custom=20subfolders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/workspace_builder.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/client/src/workspace_builder.rs b/crates/client/src/workspace_builder.rs index 266d5681..27c2183c 100644 --- a/crates/client/src/workspace_builder.rs +++ b/crates/client/src/workspace_builder.rs @@ -159,6 +159,8 @@ impl WorkspaceBuilder { #[throws] pub async fn add_fuzz_test(&mut self) { self.packages = Commander::collect_program_packages().await?; + (self.idl, self.codes_libs_pairs) = + Commander::build_program_packages(&self.packages).await?; self.add_new_fuzz_test().await?; } /// ## Creates program client folder and generates source code @@ -214,6 +216,7 @@ impl WorkspaceBuilder { .unwrap() .map(|r| r.unwrap()) .collect(); + directories.retain(|x| x.file_name() != "fuzzing"); directories.sort_by_key(|dir| dir.path()); // INFO this is kind of spaghetti, but esentially we are: From aa8c12d330210f1a60410a9ec23015ed2039e0b9 Mon Sep 17 00:00:00 2001 From: lukacan Date: Wed, 10 Jan 2024 23:15:32 +0100 Subject: [PATCH 57/57] =?UTF-8?q?=E2=9C=85=20add=20new=20fuzz=20example=20?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fuzz_example1/.program_client/Cargo.toml | 11 + .../fuzz_example1/.program_client/src/lib.rs | 164 + examples/fuzz_example1/Cargo.lock | 5738 +++++++++++++++-- examples/fuzz_example1/Cargo.toml | 2 +- examples/fuzz_example1/README.md | 107 + examples/fuzz_example1/Trdelnik.toml | 30 + .../trdelnik-tests/fuzz_tests/Cargo.toml | 28 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 161 + .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 343 + .../fuzz_tests/fuzz_0/test_fuzz.rs | 41 + .../fuzz_tests/fuzz_1/accounts_snapshots.rs | 162 + .../fuzz_tests/fuzz_1/fuzz_instructions.rs | 343 + .../fuzz_tests/fuzz_1/test_fuzz.rs | 23 + 13 files changed, 6505 insertions(+), 648 deletions(-) create mode 100644 examples/fuzz_example1/.program_client/Cargo.toml create mode 100644 examples/fuzz_example1/.program_client/src/lib.rs create mode 100644 examples/fuzz_example1/README.md create mode 100644 examples/fuzz_example1/Trdelnik.toml create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/Cargo.toml create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/accounts_snapshots.rs create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/fuzz_instructions.rs create mode 100644 examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs diff --git a/examples/fuzz_example1/.program_client/Cargo.toml b/examples/fuzz_example1/.program_client/Cargo.toml new file mode 100644 index 00000000..7df04d76 --- /dev/null +++ b/examples/fuzz_example1/.program_client/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "program_client" +version = "0.1.0" +edition = "2018" +[dependencies.trdelnik-client] +path = "../../../crates/client" + + +[dependencies.fuzz_example1] +path = "../programs/fuzz_example1" +features = ["no-entrypoint"] diff --git a/examples/fuzz_example1/.program_client/src/lib.rs b/examples/fuzz_example1/.program_client/src/lib.rs new file mode 100644 index 00000000..6d1193d8 --- /dev/null +++ b/examples/fuzz_example1/.program_client/src/lib.rs @@ -0,0 +1,164 @@ +// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module +pub mod fuzz_example1_instruction { + use trdelnik_client::prelude::*; + pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ + 102u8, 14u8, 37u8, 223u8, 213u8, 157u8, 223u8, 31u8, 244u8, 37u8, 118u8, 158u8, 9u8, 208u8, + 160u8, 222u8, 23u8, 8u8, 210u8, 4u8, 175u8, 165u8, 252u8, 222u8, 56u8, 103u8, 180u8, 216u8, + 231u8, 91u8, 28u8, 159u8, + ]); + #[allow(clippy::too_many_arguments)] + pub async fn initialize( + client: &Client, + a_author: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzz_example1::instruction::Initialize {}, + fuzz_example1::accounts::Initialize { + author: *a_author, + state: *a_state, + system_program: *a_system_program, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn initialize_ix( + a_author: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzz_example1::instruction::Initialize {}.data(), + accounts: fuzz_example1::accounts::Initialize { + author: *a_author, + state: *a_state, + system_program: *a_system_program, + } + .to_account_metas(None), + } + } + #[allow(clippy::too_many_arguments)] + pub async fn register( + client: &Client, + a_project_author: &Pubkey, + a_project: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzz_example1::instruction::Register {}, + fuzz_example1::accounts::Register { + project_author: *a_project_author, + project: *a_project, + state: *a_state, + system_program: *a_system_program, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn register_ix( + a_project_author: &Pubkey, + a_project: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzz_example1::instruction::Register {}.data(), + accounts: fuzz_example1::accounts::Register { + project_author: *a_project_author, + project: *a_project, + state: *a_state, + system_program: *a_system_program, + } + .to_account_metas(None), + } + } + #[allow(clippy::too_many_arguments)] + pub async fn end_registrations( + client: &Client, + a_author: &Pubkey, + a_state: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzz_example1::instruction::EndRegistrations {}, + fuzz_example1::accounts::EndRegistration { + author: *a_author, + state: *a_state, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn end_registrations_ix(a_author: &Pubkey, a_state: &Pubkey) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzz_example1::instruction::EndRegistrations {}.data(), + accounts: fuzz_example1::accounts::EndRegistration { + author: *a_author, + state: *a_state, + } + .to_account_metas(None), + } + } + #[allow(clippy::too_many_arguments)] + pub async fn invest( + client: &Client, + i_amount: u64, + a_investor: &Pubkey, + a_project: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + signers: impl IntoIterator + Send, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + fuzz_example1::instruction::Invest { amount: i_amount }, + fuzz_example1::accounts::Invest { + investor: *a_investor, + project: *a_project, + state: *a_state, + system_program: *a_system_program, + }, + signers, + ) + .await + } + #[allow(clippy::too_many_arguments)] + pub fn invest_ix( + i_amount: u64, + a_investor: &Pubkey, + a_project: &Pubkey, + a_state: &Pubkey, + a_system_program: &Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: fuzz_example1::instruction::Invest { amount: i_amount }.data(), + accounts: fuzz_example1::accounts::Invest { + investor: *a_investor, + project: *a_project, + state: *a_state, + system_program: *a_system_program, + } + .to_account_metas(None), + } + } +} diff --git a/examples/fuzz_example1/Cargo.lock b/examples/fuzz_example1/Cargo.lock index 35cc7587..c061070b 100644 --- a/examples/fuzz_example1/Cargo.lock +++ b/examples/fuzz_example1/Cargo.lock @@ -2,6 +2,67 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + [[package]] name = "ahash" version = "0.7.7" @@ -35,6 +96,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "anchor-attribute-access-control" version = "0.28.0" @@ -43,8 +125,8 @@ checksum = "faa5be5b72abea167f87c868379ba3c2be356bfca9e6f474fd055fa0f7eeb4f2" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "regex", "syn 1.0.109", ] @@ -58,8 +140,8 @@ dependencies = [ "anchor-syn", "anyhow", "bs58 0.5.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "rustversion", "syn 1.0.109", ] @@ -71,7 +153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59948e7f9ef8144c2aefb3f32a40c5fce2798baeec765ba038389e82301017ef" dependencies = [ "anchor-syn", - "proc-macro2", + "proc-macro2 1.0.71", "syn 1.0.109", ] @@ -82,8 +164,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc753c9d1c7981cb8948cf7e162fb0f64558999c0413058e2d43df1df5448086" dependencies = [ "anchor-syn", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -95,8 +177,8 @@ checksum = "f38b4e172ba1b52078f53fdc9f11e3dc0668ad27997838a0aad2d148afac8c97" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -108,11 +190,30 @@ checksum = "4eebd21543606ab61e2d83d9da37d24d3886a49f390f9c43a1964735e8c0f0d5" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "anchor-client" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8434a6bf33efba0c93157f7fa2fafac658cb26ab75396886dcedd87c2a8ad445" +dependencies = [ + "anchor-lang", + "anyhow", + "futures", + "regex", + "serde", + "solana-account-decoder", + "solana-client", + "solana-sdk", + "thiserror", + "tokio", + "url", +] + [[package]] name = "anchor-derive-accounts" version = "0.28.0" @@ -121,8 +222,8 @@ checksum = "ec4720d899b3686396cced9508f23dab420f1308344456ec78ef76f98fda42af" dependencies = [ "anchor-syn", "anyhow", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -132,8 +233,8 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f495e85480bd96ddeb77b71d499247c7d4e8b501e75ecb234e9ef7ae7bd6552a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -169,9 +270,9 @@ checksum = "a125e4b0cc046cfec58f5aa25038e34cf440151d58f0db3afc55308251fe936d" dependencies = [ "anyhow", "bs58 0.5.0", - "heck", - "proc-macro2", - "quote", + "heck 0.3.3", + "proc-macro2 1.0.71", + "quote 1.0.33", "serde", "serde_json", "sha2 0.10.8", @@ -179,12 +280,45 @@ dependencies = [ "thiserror", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "ark-bn254" version = "0.4.0" @@ -226,7 +360,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint", + "num-bigint 0.4.4", "num-traits", "paste", "rustc_version", @@ -239,7 +373,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote", + "quote 1.0.33", "syn 1.0.109", ] @@ -249,10 +383,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-traits", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -278,7 +412,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint", + "num-bigint 0.4.4", ] [[package]] @@ -287,8 +421,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -320,12 +454,134 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.12.3" @@ -344,6 +600,12 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bincode" version = "1.3.3" @@ -359,6 +621,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "bitmaps" version = "2.1.0" @@ -388,6 +656,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ + "block-padding", "generic-array", ] @@ -400,6 +669,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "borsh" version = "0.9.3" @@ -428,8 +703,8 @@ checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ "borsh-derive-internal 0.9.3", "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate", - "proc-macro2", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.71", "syn 1.0.109", ] @@ -441,8 +716,8 @@ checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ "borsh-derive-internal 0.10.3", "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate", - "proc-macro2", + "proc-macro-crate 0.1.5", + "proc-macro2 1.0.71", "syn 1.0.109", ] @@ -452,8 +727,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -463,8 +738,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -474,8 +749,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] @@ -485,11 +760,32 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] +[[package]] +name = "brotli" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bs58" version = "0.4.0" @@ -536,8 +832,8 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", ] @@ -548,1047 +844,4900 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" +name = "bytes" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] -name = "console_error_panic_hook" -version = "0.1.7" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "cfg-if", - "wasm-bindgen", + "bzip2-sys", + "libc", ] [[package]] -name = "console_log" -version = "0.2.2" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ - "log", - "web-sys", + "cc", + "libc", + "pkg-config", ] [[package]] -name = "constant_time_eq" -version = "0.3.0" +name = "camino" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] [[package]] -name = "cpufeatures" -version = "0.2.11" +name = "caps" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" dependencies = [ "libc", + "thiserror", ] [[package]] -name = "crossbeam-deque" -version = "0.8.4" +name = "cargo-platform" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", + "serde", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.16" +name = "cargo_metadata" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "crossbeam-utils" -version = "0.8.17" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "cfg-if", + "jobserver", + "libc", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "crypto-common" -version = "0.1.6" +name = "chrono" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "generic-array", - "typenum", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", ] [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "chrono-humanize" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" dependencies = [ - "generic-array", - "subtle", + "chrono", ] [[package]] -name = "curve25519-dalek" -version = "3.2.1" +name = "cipher" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", - "subtle", - "zeroize", + "generic-array", ] [[package]] -name = "derivative" -version = "2.2.0" +name = "clap" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", ] [[package]] -name = "digest" -version = "0.9.0" +name = "clap" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "generic-array", + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.0", ] [[package]] -name = "digest" -version = "0.10.7" +name = "clap_lex" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle", + "os_str_bytes", ] [[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "feature-probe" -version = "0.1.1" +name = "combine" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "fuzz_example1" -version = "0.1.0" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ - "anchor-lang", + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "concurrent-queue" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ - "serde", - "typenum", - "version_check", + "crossbeam-utils", ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "console" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ - "cfg-if", - "js-sys", + "encode_unicode", + "lazy_static", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", + "unicode-width", + "windows-sys 0.52.0", ] [[package]] -name = "getrandom" -version = "0.2.11" +name = "console_error_panic_hook" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "console_log" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" dependencies = [ - "ahash 0.7.7", + "log", + "web-sys", ] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "const-oid" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.6", -] +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] -name = "heck" -version = "0.3.3" +name = "constant_time_eq" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] -name = "hmac" -version = "0.8.1" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "core-foundation-sys", + "libc", ] [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "core-foundation-sys" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac", + "libc", ] [[package]] -name = "im" -version = "15.1.0" +name = "crc32fast" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", + "cfg-if", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "crossbeam-channel" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5" dependencies = [ - "either", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "itoa" -version = "1.0.10" +name = "crossbeam-deque" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] [[package]] -name = "jobserver" -version = "0.1.27" +name = "crossbeam-epoch" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ - "libc", + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", ] [[package]] -name = "js-sys" -version = "0.3.66" +name = "crossbeam-utils" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ - "wasm-bindgen", + "cfg-if", ] [[package]] -name = "keccak" -version = "0.1.4" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "cpufeatures", + "generic-array", + "typenum", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "crypto-mac" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] [[package]] -name = "libc" -version = "0.2.151" +name = "ctr" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] [[package]] -name = "libsecp256k1" -version = "0.6.0" +name = "curve25519-dalek" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" dependencies = [ - "arrayref", - "base64 0.12.3", + "byteorder", "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", + "rand_core 0.5.1", "serde", - "sha2 0.9.9", - "typenum", + "subtle", + "zeroize", ] [[package]] -name = "libsecp256k1-core" -version = "0.2.2" +name = "darling" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", + "darling_core", + "darling_macro", ] [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" +name = "darling_core" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ - "libsecp256k1-core", + "fnv", + "ident_case", + "proc-macro2 1.0.71", + "quote 1.0.33", + "strsim 0.10.0", + "syn 2.0.42", ] [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" +name = "darling_macro" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "libsecp256k1-core", + "darling_core", + "quote 1.0.33", + "syn 2.0.42", ] [[package]] -name = "lock_api" -version = "0.4.11" +name = "dashmap" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" dependencies = [ - "autocfg", - "scopeguard", + "cfg-if", + "num_cpus", + "rayon", ] [[package]] -name = "log" -version = "0.4.20" +name = "data-encoding" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] -name = "memchr" -version = "2.6.4" +name = "der" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] [[package]] -name = "memmap2" -version = "0.5.10" +name = "der-parser" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "libc", + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.4", + "num-traits", + "rusticata-macros", ] [[package]] -name = "memoffset" -version = "0.9.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "autocfg", + "powerfmt", ] [[package]] -name = "num-bigint" -version = "0.4.4" +name = "derivation-path" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" [[package]] -name = "num-derive" -version = "0.3.3" +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 1.0.109", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "derive_arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ - "autocfg", - "num-traits", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", ] [[package]] -name = "num-traits" -version = "0.2.17" +name = "dialoguer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" dependencies = [ - "autocfg", + "console", + "shell-words", + "tempfile", + "zeroize", ] [[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "parking_lot" -version = "0.12.1" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "lock_api", - "parking_lot_core", + "generic-array", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", + "block-buffer 0.10.4", + "crypto-common", + "subtle", ] [[package]] -name = "paste" -version = "1.0.14" +name = "dir-diff" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +dependencies = [ + "walkdir", +] [[package]] -name = "pbkdf2" -version = "0.4.0" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "crypto-mac", + "dirs-sys", ] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "dirs-next" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] [[package]] -name = "proc-macro-crate" -version = "0.1.5" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ - "toml", + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", ] [[package]] -name = "proc-macro2" -version = "1.0.71" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ - "unicode-ident", + "libc", + "redox_users", + "winapi", ] [[package]] -name = "quote" -version = "1.0.33" +name = "displaydoc" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", ] [[package]] -name = "rand" -version = "0.7.3" +name = "dlopen" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" dependencies = [ - "getrandom 0.1.16", + "dlopen_derive", + "lazy_static", "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", + "winapi", ] [[package]] -name = "rand" -version = "0.8.5" +name = "dlopen_derive" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" dependencies = [ - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "libc", + "quote 0.6.13", + "syn 0.15.44", ] [[package]] -name = "rand_chacha" -version = "0.2.2" +name = "eager" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "ed25519" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "signature", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "ed25519-dalek" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "getrandom 0.1.16", + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "ed25519-dalek-bip32" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" dependencies = [ - "getrandom 0.2.11", + "derivation-path", + "ed25519-dalek", + "hmac 0.12.1", + "sha2 0.10.8", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "educe" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ - "rand_core 0.5.1", + "enum-ordinalize", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", ] [[package]] -name = "rand_xoshiro" -version = "0.6.0" +name = "either" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] -name = "rayon" -version = "1.8.0" +name = "encode_unicode" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] -name = "rayon-core" -version = "1.12.0" +name = "encoding_rs" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "cfg-if", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "enum-iterator" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "7add3873b5dd076766ee79c8e406ad1a472c385476b9e38849f8eec24f1be689" dependencies = [ - "bitflags", + "enum-iterator-derive", ] [[package]] -name = "regex" -version = "1.10.2" +name = "enum-iterator-derive" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", ] [[package]] -name = "regex-automata" -version = "0.4.3" +name = "enum-ordinalize" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "num-bigint 0.4.4", + "num-traits", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", ] [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "env_logger" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "rustc_version" -version = "0.4.0" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "semver", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "rustversion" -version = "1.0.14" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "ryu" -version = "1.0.16" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] -name = "scopeguard" -version = "1.2.0" +name = "feature-probe" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] -name = "semver" -version = "1.0.20" +name = "fehler" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "d5729fe49ba028cd550747b6e62cd3d841beccab5390aa398538c31a2d983635" +dependencies = [ + "fehler-macros", +] [[package]] -name = "serde" -version = "1.0.193" +name = "fehler-macros" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" dependencies = [ - "serde_derive", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", ] [[package]] -name = "serde_bytes" -version = "0.11.12" +name = "filetime" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "serde", + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.52.0", ] [[package]] -name = "serde_derive" -version = "1.0.193" +name = "flate2" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.42", + "crc32fast", + "miniz_oxide", ] [[package]] -name = "serde_json" -version = "1.0.108" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "itoa", - "ryu", - "serde", + "percent-encoding", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "futures" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "futures-channel" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "futures-core", + "futures-sink", ] [[package]] -name = "sha3" -version = "0.10.8" +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fuzz_example1" +version = "0.1.0" +dependencies = [ + "anchor-lang", +] + +[[package]] +name = "fuzz_tests" +version = "0.1.0" +dependencies = [ + "arbitrary", + "assert_matches", + "fuzz_example1", + "honggfuzz", + "program_client", + "trdelnik-client", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "goblin" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "h2" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util 0.7.10", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "histogram" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", +] + +[[package]] +name = "honggfuzz" +version = "0.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2", + "rustc_version", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls 0.21.10", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "index_list" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.3", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.0.0", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "pretty-hex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +dependencies = [ + "toml_edit 0.21.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "program_client" +version = "0.1.0" +dependencies = [ + "fuzz_example1", + "trdelnik-client", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-proto" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +dependencies = [ + "arbitrary", + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls 0.20.9", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", + "webpki", +] + +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2 1.0.71", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom 0.2.11", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "async-compression", + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.10", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util 0.7.10", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.3", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct", + "webpki", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +dependencies = [ + "serde", +] + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "serde_yaml" +version = "0.9.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" +dependencies = [ + "indexmap 2.1.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", - "keccak", + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "solana-account-decoder" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1061ae0eecf24b58e57abce2fad5b962092887c6afcfd14ce8cc24818dac7ae4" +dependencies = [ + "Inflector", + "base64 0.21.5", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-config-program", + "solana-sdk", + "spl-token", + "spl-token-2022", + "spl-token-metadata-interface", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a8cfddfed87fae43af3a539171267f8d47fd9a1f9a8e3fd2b7508b52ebb593" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-banks-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78fa99fb3c089a5ecc455c1b6eff7aed6833782ccffe8c2c35bc75138efe55c7" +dependencies = [ + "borsh 0.10.3", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6855f9fb2bbcaa5db359701bad0f4fa39647a21b2899db54d8843d64c26c5359" +dependencies = [ + "serde", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-banks-server" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b013dd7bc7b6a46b04c7ba2180c0814709b6a7dfe1365827d8c6b759bf538b73" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98a1e2ca4df9b8d33eaa97576f0e8041b6f9c907772fe35b170c1eead5382e2" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-bucket-map" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a6f74d4215c0425c732ade3371639bda4c16a723b5ac33a91cb634f0acc376" +dependencies = [ + "bv", + "log", + "memmap2", + "modular-bitfield", + "num_enum 0.6.1", + "rand 0.7.3", + "solana-measure", + "solana-sdk", + "tempfile", +] + +[[package]] +name = "solana-clap-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8460c35e48160995b9e6c377f8fd08ce478cae833decb1d54214253e76321f0" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-perf", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25a9c58e392288570294d45544fe39ed1c2b4d0bcb8e5552deaa3e85ffcea9b" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-cli-output" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede6a6d9798a56a08e1cfaee2ca92ba93c631af8ff7d1e46998513dc31013c02" +dependencies = [ + "Inflector", + "base64 0.21.5", + "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.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffe77e35669aeda1c640153e8c7bc15b9b725e8957fd5911022980952e1dddb" +dependencies = [ + "async-trait", + "bincode", + "futures", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "quinn", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-compute-budget-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed90e87a7381cc4a93cd63c52fff8f60796144c797f7d2548efa0856e3cc35a" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-config-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "103c05b62d8b321cf3a3531a2b96ebb105df4eac2f80f26a7205d6bd7b9882ce" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-connection-cache" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006c3df783562f7bca6d35c9d5dd17db3a1e7f22d54144d4180f1db5ccb3fdf0" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "log", + "rand 0.7.3", + "rayon", + "rcgen", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d229588852b514378c88ea74ef6fb93c5575758d2aa3a6a300872ccf5be51772" +dependencies = [ + "ahash 0.8.6", + "blake3", + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "byteorder", + "cc", + "either", + "generic-array", + "getrandom 0.1.16", + "im", + "lazy_static", + "log", + "memmap2", + "once_cell", + "rand_core 0.6.4", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad75a8290906967a9737c76bb5cc9769cee2097a6a6fbda08017562454ead020" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustc_version", + "syn 2.0.42", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0956aca0aa3a990a9bb341e13b541f1f18284db252f06185dbb7d040cb564c0" +dependencies = [ + "log", + "rand 0.7.3", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + +[[package]] +name = "solana-logger" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4896bca227a92b31c7be15f524850aba3255d94dcb837a4097daba723a84757" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b0389a4a6f956173904d7ad0eb5058723c25d68d7c75bdc434637e8a4e08a3" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7a9cbc8b9d706398e7653123c526aba0ffbf4bf4184e0190cdba386c8b600c" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", +] + +[[package]] +name = "solana-net-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f987bdd6a27eb48320f409b020f9d2646a2ec0ca8d9361de53be759bdd209e65" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.7.3", + "serde", + "serde_derive", + "socket2 0.4.10", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-perf" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897cee370814792aff81ae93578ead9e5bd35b2f7e45a956aa2b12536f6d81e3" +dependencies = [ + "ahash 0.8.6", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen", + "dlopen_derive", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.7.3", + "rayon", + "serde", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de52673b07eda66299b6ff858c54f3d08bdf4addc5c56969f0a94a09bb63f853" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "array-bytes", + "base64 0.21.5", + "bincode", + "bitflags 1.3.2", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.11", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "log", + "memoffset 0.9.0", + "num-bigint 0.4.4", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1046f13174ed22f56fa8658265dc952372407772c7bb3d8f60505afa1b30c1" +dependencies = [ + "base64 0.21.5", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "log", + "num-derive 0.3.3", + "num-traits", + "percentage", + "rand 0.7.3", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-program-test" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b21eb50e63a6904a4b3dc0a265e61f10b83e0c9076d0e2a57b8279c928b712e" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.5", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a09f7e643a075001dc7362955b829181e027ff23b12049f576277e2ffb1d0a0c" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2c1955a009913174433ba086590b9baf785d7023248abf11b42534b1ac70e53" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "quinn-udp", + "rcgen", + "rustls 0.20.9", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "856ff9020c43ae49ed341572454e8b33d400c787f9f2a9f48783f3607c7e399a" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56a5a567539d6585acc0a0038da5f1350cfca6574272fef545988a469e87286b" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive 0.3.3", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-rpc-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54fda1c759f8aa828052659ff1553d0383e721676110842b69e5e0ae997d6441" +dependencies = [ + "async-trait", + "base64 0.21.5", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29959e74308d074a88339712cf407a091bc9382a67298b8a83f02d0279aca1e" +dependencies = [ + "base64 0.21.5", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b14d3733afbe844ec9a6210982e7ea7bda23b5bce4af637e08a7a92f78b4b4" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-runtime" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c251f2b7656e22f31f4feb389e269015dde50fda994eea115ce0df8c4d27280" +dependencies = [ + "arrayref", + "base64 0.21.5", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive 0.3.3", + "num-traits", + "num_cpus", + "num_enum 0.6.1", + "once_cell", + "ouroboros", + "percentage", + "rand 0.7.3", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d5e51b30ff694f1353755b0e1672bc01a6b72ad12353fac4e53957a2a1f783" +dependencies = [ + "assert_matches", + "base64 0.21.5", + "bincode", + "bitflags 1.3.2", + "borsh 0.10.3", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5c5ae1f2b5e7dec7dcab0199a642e1900b981c156547942156c5c4fbcc3eafa" +dependencies = [ + "bs58 0.4.0", + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustversion", + "syn 2.0.42", +] + +[[package]] +name = "solana-send-transaction-service" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5360bf4af2b98b8cfea90cd497490c3741e4f822c4fa75a4b4aba4f58414c0c2" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3abec79a2978cbd92567edbaf71bf7be16b0275123c1a67b5bb3902ea26b3e" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-streamer" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e552da2c1b63fed220858d4cf6dd585d8a5175a1e0a5fafbc56dda21630d57" +dependencies = [ + "async-channel", + "bytes", + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 1.9.3", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "quinn-proto", + "quinn-udp", + "rand 0.7.3", + "rcgen", + "rustls 0.20.9", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-system-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ed773979d7a5ccef68083f526f58c1196d8942f9f7e8f5f8dee744a1053fda" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c7d72a9ea3ac06bdcee2511c99fc14470edf0bda3d629cc50758438c2580b4" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cb713f3fd335ce1b3699314027605ca80231e9347ad1d09e1b7e1c58bf31d3" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 1.9.3", + "indicatif", + "log", + "rand 0.7.3", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-transaction-status" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e13704102abe15f421d6a59e65db6d8aa0c1a61540ab1c744c5ce58a086bc1c" +dependencies = [ + "Inflector", + "base64 0.21.5", + "bincode", + "borsh 0.10.3", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-address-lookup-table-program", + "solana-sdk", + "spl-associated-token-account", + "spl-memo", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "solana-udp-client" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96136ce9b671d9a0dc3c1231236fa2fa8aa5b7379c53449eb9bcb2214b6e8455" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32dc5d88030e9930b5e306e3562e7c81347165b42dc3ad6586d4ce91c9bba70a" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520cb33e0d3bf61075ca7919a5ec30ad34e95e1f467ecc1bea55d5a1f887cc88" +dependencies = [ + "bincode", + "log", + "num-derive 0.3.3", + "num-traits", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96da20016bf0e9d59cc2d262871d810f396fdda31fee7175c934d6f92cc3be8b" +dependencies = [ + "bytemuck", + "getrandom 0.1.16", + "num-derive 0.3.3", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.16.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66b682b70d18374f8619a1e61ec461d481d5ee7dc2057d53d7370176f41027c" +dependencies = [ + "aes-gcm-siv", + "base64 0.21.5", + "bincode", + "bytemuck", + "byteorder", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive 0.3.3", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "solana_rbpf" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17d4ba1e58947346e360fabde0697029d36ba83c42f669199b16a8931313cf29" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385e31c29981488f2820b2022d8e731aae3b02e6e18e2fd854e4c9a94dc44fc3" +dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadbefec4f3c678215ca72bd71862697bb06b41fd77c0088902dd3203354387b" +dependencies = [ + "quote 1.0.33", + "spl-discriminator-syn", + "syn 2.0.42", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e5f2044ca42c8938d54d1255ce599c79a1ffd86b677dfab695caa20f9ffc3f2" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.42", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error", +] + +[[package]] +name = "spl-program-error" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.1", + "num-traits", + "solana-program", + "spl-program-error-derive", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5269c8e868da17b6552ef35a51355a017bd8e0eae269c201fef830d35fa52c" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "sha2 0.10.8", + "syn 2.0.42", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-token" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.1", + "num-traits", + "num_enum 0.7.2", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod", + "spl-token", + "spl-token-metadata-interface", + "spl-transfer-hook-interface", + "spl-type-length-value", + "thiserror", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" +dependencies = [ + "borsh 0.10.3", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-type-length-value", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", + "spl-tlv-account-resolution", + "spl-type-length-value", +] + +[[package]] +name = "spl-type-length-value" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator", + "spl-pod", + "spl-program-error", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.71", + "quote 1.0.33", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", + "unicode-xid 0.2.4", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tar" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tarpc" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" +dependencies = [ + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", +] + +[[package]] +name = "tarpc-plugins" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac 0.8.1", + "once_cell", + "pbkdf2 0.4.0", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", ] [[package]] -name = "sized-chunks" -version = "0.6.5" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "bitmaps", - "typenum", + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros", + "windows-sys 0.48.0", ] [[package]] -name = "smallvec" -version = "1.11.2" +name = "tokio-macros" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 2.0.42", +] [[package]] -name = "solana-frozen-abi" -version = "1.16.24" +name = "tokio-rustls" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d229588852b514378c88ea74ef6fb93c5575758d2aa3a6a300872ccf5be51772" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "ahash 0.8.6", - "blake3", - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "byteorder", - "cc", - "either", - "generic-array", - "getrandom 0.1.16", - "im", - "lazy_static", - "log", - "memmap2", - "once_cell", - "rand_core 0.6.4", - "rustc_version", + "rustls 0.20.9", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", "serde", - "serde_bytes", - "serde_derive", "serde_json", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", ] [[package]] -name = "solana-frozen-abi-macro" -version = "1.16.24" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad75a8290906967a9737c76bb5cc9769cee2097a6a6fbda08017562454ead020" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "proc-macro2", - "quote", - "rustc_version", + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "rustls 0.20.9", + "tokio", + "tokio-rustls 0.23.4", + "tungstenite", + "webpki", + "webpki-roots 0.22.6", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "indexmap 1.9.3", + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", ] [[package]] -name = "solana-program" -version = "1.16.24" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de52673b07eda66299b6ff858c54f3d08bdf4addc5c56969f0a94a09bb63f853" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "array-bytes", - "base64 0.21.5", + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "trdelnik-client" +version = "0.5.0" +dependencies = [ + "anchor-client", + "anchor-lang", + "anyhow", + "arbitrary", "bincode", - "bitflags", - "blake3", "borsh 0.10.3", - "borsh 0.9.3", - "bs58 0.4.0", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.11", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", + "cargo_metadata", + "ed25519-dalek", + "fehler", + "futures", + "heck 0.4.1", + "honggfuzz", + "indicatif", "log", - "memoffset", - "num-bigint", - "num-derive", - "num-traits", - "parking_lot", - "rand 0.7.3", - "rand_chacha 0.2.2", - "rustc_version", - "rustversion", + "pathdiff", + "proc-macro2 1.0.71", + "quinn-proto", + "quote 1.0.33", "serde", - "serde_bytes", - "serde_derive", "serde_json", - "sha2 0.10.8", - "sha3", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", + "shellexpand", + "solana-account-decoder", + "solana-cli-output", + "solana-program-runtime", + "solana-program-test", + "solana-sdk", + "solana-transaction-status", + "spl-associated-token-account", + "spl-token", + "syn 1.0.109", "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", + "tokio", + "toml", + "trdelnik-derive-displayix", + "trdelnik-derive-fuzz-deserialize", + "trdelnik-derive-fuzz-test-executor", ] [[package]] -name = "solana-sdk-macro" -version = "1.16.24" +name = "trdelnik-derive-displayix" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "trdelnik-derive-fuzz-deserialize" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "trdelnik-derive-fuzz-test-executor" +version = "0.0.1" +dependencies = [ + "proc-macro2 1.0.71", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c5ae1f2b5e7dec7dcab0199a642e1900b981c156547942156c5c4fbcc3eafa" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.42", + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.20.9", + "sha-1", + "thiserror", + "url", + "utf-8", + "webpki", + "webpki-roots 0.22.6", ] [[package]] -name = "subtle" -version = "2.4.1" +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] -name = "syn" -version = "1.0.109" +name = "universal-hash" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "generic-array", + "subtle", ] [[package]] -name = "syn" -version = "2.0.42" +name = "unreachable" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "void", ] [[package]] -name = "thiserror" -version = "1.0.51" +name = "unsafe-libyaml" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" -dependencies = [ - "thiserror-impl", -] +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] -name = "thiserror-impl" -version = "1.0.51" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.42", -] +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] -name = "tiny-bip39" -version = "0.8.2" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "uriparse" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" dependencies = [ - "anyhow", - "hmac", - "once_cell", - "pbkdf2", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", + "fnv", + "lazy_static", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "url" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ - "tinyvec_macros", + "form_urlencoded", + "idna", + "percent-encoding", ] [[package]] -name = "tinyvec_macros" -version = "0.1.1" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "toml" -version = "0.5.11" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] -name = "typenum" -version = "1.17.0" +name = "vec_map" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] -name = "unicode-ident" -version = "1.0.12" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "void" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "unicode-segmentation" -version = "1.10.1" +name = "walkdir" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] [[package]] -name = "version_check" -version = "0.9.4" +name = "want" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] [[package]] name = "wasi" @@ -1621,19 +5770,31 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ - "quote", + "quote 1.0.33", "wasm-bindgen-macro-support", ] @@ -1643,8 +5804,8 @@ version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -1666,63 +5827,317 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + [[package]] name = "zerocopy" version = "0.7.32" @@ -1738,8 +6153,8 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", ] @@ -1758,7 +6173,36 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.71", + "quote 1.0.33", "syn 2.0.42", ] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/examples/fuzz_example1/Cargo.toml b/examples/fuzz_example1/Cargo.toml index f077205f..2826da50 100644 --- a/examples/fuzz_example1/Cargo.toml +++ b/examples/fuzz_example1/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["programs/*"] +members = ["programs/*", "trdelnik-tests/fuzz_tests"] [profile.release] overflow-checks = true lto = "fat" diff --git a/examples/fuzz_example1/README.md b/examples/fuzz_example1/README.md new file mode 100644 index 00000000..c5007309 --- /dev/null +++ b/examples/fuzz_example1/README.md @@ -0,0 +1,107 @@ +# Fuzz Test Example for Trdelnik Fuzzer + +--- + +## Program and Errors Description + +- ### Initialize + - In this function, we initialize a new common State, under which we can later register new Subjects, such as Projects. + - An important variable inside the State account is: + - `registrations_round`: this option indicates if the Registration round is still open. + - ❗ **NOTE:** 🐛 It is incorrectly set in the Initialization, implicitly set as **FALSE**. + +- ### Register + - This function registers a Project under a specified State. + - ❗ **NOTE:** 🐛 We fail to properly check if the registration window is open. + +- ### End Registrations + - This function halts Project Registrations for a given State, essentially setting **registrations_round** to false. + +- ### Invest + - Participants can invest in a Project of their choice. While we perform a check to see if `registrations_round` is still open: + ```rust + require!( + !state.registrations_round, + CustomError::RegistrationRoundOpen + ); + ``` + - ❗**NOTE:** 🐛 The Fuzz Test can uncover an instruction sequence where the **Invest** was successfully performed even though **End Registration** was not called beforehand. This is a result of the issue mentioned above where **registrations_round** was not correctly set, i.e., implicitly set to **FALSE**. + +## Fuzz Test Checks +- ### ✔️Register Instruction Check +❗❗ To try this fuzz test, first uncomment it within [fuzz_instruction.rs](trdelnik-tests/src/fuzz_instructions.rs). + +We first verify if the State is initialized before the Register instruction call. +```rust +if let Some(state) = pre_ix.state { + // ... +} +``` +Then, we check if the Project was successfully created. +```rust +if let Some(_project) = post_ix.project { + // ... +} +``` +Finally, if both previous checks have passed, we check if **registrations_round** within the State was false. +```rust +if !registrations_round { + // ... +} +``` +If this condition is met, we have identified the 🚨Error🚨. +```rust +return Err("We successfully registered a new project even though registrations are not open"); +``` + + Final Check +```rust +if let Some(state) = pre_ix.state { + if let Some(_project) = post_ix.project { + let registrations_round = state.registrations_round; + if !registrations_round { + return Err("We successfully registered a new project even though registrations are not open"); + } + } +} +``` + +--- + +- ### ✔️Invest Instruction Check +We first check if the Project was already registered before the Invest instruction call. +```rust +if let Some(project_pre) = pre_ix.project { + // ... +} +``` +Then, we verify if the State was already initialized. +```rust +if let Some(state) = pre_ix.state { + // ... +} +``` +Lastly, we check if the **invested amount before and after the instruction call has changed**. +```rust +if !state.registrations_round && project_pre.invested_amount + ix_data.amount == project_post.invested_amount { + // ... +} +``` +If this condition is met, we have identified the 🚨Error🚨. +```rust +return Err("Registration round was not terminated, however, the investor was able to invest inside the registration window"); +``` + + Final Check +```rust +if let Some(project_pre) = pre_ix.project { + let project_post = post_ix.project.unwrap(); + if let Some(state) = pre_ix.state { + if !state.registrations_round + && project_pre.invested_amount + ix_data.amount + == project_post.invested_amount{ + return Err("Registration round was not terminated, however, the investor was able to invest inside the registration window"); + } + } +} +``` diff --git a/examples/fuzz_example1/Trdelnik.toml b/examples/fuzz_example1/Trdelnik.toml new file mode 100644 index 00000000..bbb0c67c --- /dev/null +++ b/examples/fuzz_example1/Trdelnik.toml @@ -0,0 +1,30 @@ +[test] +validator_startup_timeout = 15000 + + +# contains default values +[fuzz] +# Timeout in seconds (default: 10) +timeout = 10 +# Number of fuzzing iterations (default: 0 [no limit]) +iterations = 5000 +# 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) +keep_output = false +# Disable ANSI console; use simple log output (default: false) +verbose = false +# Exit upon seeing the first crash (default: false) +exit_upon_crash = true +# Maximal number of mutations per one run (default: 6) +mutations_per_run = 6 +# Directory where crashes are saved to (default: "" [workspace directory]) +crashdir = "" +# Input file extension (e.g. 'swf'), (default: "" ['fuzz']) +extension = "" +# Number of seconds this fuzzing session will last (default: 0 [no limit]) +run_time = 0 +# Maximal size of files processed by the fuzzer in bytes (default: 1048576 = 1MB) +max_file_size = 1048576 +# Save all test-cases (not only the unique ones) by appending the current time-stamp to the filenames (default: false) +save_all = false diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/Cargo.toml b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/Cargo.toml new file mode 100644 index 00000000..d08375d9 --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/Cargo.toml @@ -0,0 +1,28 @@ +[[bin]] +name = "fuzz_0" +path = "fuzz_0/test_fuzz.rs" + +[[bin]] +name = "fuzz_1" +path = "fuzz_1/test_fuzz.rs" + +[package] +name = "fuzz_tests" +version = "0.1.0" +description = "Created with Trdelnik" +edition = "2021" + +[dependencies] +honggfuzz = "0.5.55" +arbitrary = "1.3.0" +assert_matches = "1.4.0" + +[dependencies.trdelnik-client] +path = "../../../../crates/client" +features = ["fuzzing"] + +[dependencies.program_client] +path = "../../.program_client" + +[dependencies.fuzz_example1] +path = "../../programs/fuzz_example1" diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs new file mode 100644 index 00000000..65cc32cf --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs @@ -0,0 +1,161 @@ +use fuzz_example1::state::{Project, State}; +use trdelnik_client::fuzzing::anchor_lang::solana_program::instruction::AccountMeta; +use trdelnik_client::fuzzing::anchor_lang::{self, prelude::*}; +use trdelnik_client::fuzzing::{get_account_infos_option, FuzzingError}; +pub struct InitializeSnapshot<'info> { + pub author: Option>, + pub state: Option>, + pub system_program: Option>, +} +pub struct RegisterSnapshot<'info> { + pub project_author: Option>, + pub project: Option>, + pub state: Option>, + pub system_program: Option>, +} +pub struct EndRegistrationsSnapshot<'info> { + pub author: Option>, + pub state: Option>, +} +pub struct InvestSnapshot<'info> { + pub investor: Option>, + pub project: Option>, + pub state: Option>, + pub system_program: Option>, +} +impl<'info> InitializeSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + author, + state, + system_program, + }) + } +} +impl<'info> RegisterSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let project_author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let project: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + project_author, + project, + state, + system_program, + }) + } +} +impl<'info> EndRegistrationsSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { author, state }) + } +} +impl<'info> InvestSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let investor: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let project: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + investor, + project, + state, + system_program, + }) + } +} diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs new file mode 100644 index 00000000..dba1bcc5 --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -0,0 +1,343 @@ +pub mod fuzz_example1_fuzz_instructions { + use crate::accounts_snapshots::*; + use fuzz_example1::state::{PROJECT_SEED, STATE_SEED}; + use trdelnik_client::fuzzing::*; + + #[derive(Arbitrary, Clone, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + Initialize(Initialize), + Register(Register), + EndRegistrations(EndRegistrations), + Invest(Invest), + } + #[derive(Arbitrary, Clone)] + pub struct Initialize { + pub accounts: InitializeAccounts, + pub data: InitializeData, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeData {} + #[derive(Arbitrary, Clone)] + pub struct Register { + pub accounts: RegisterAccounts, + pub data: RegisterData, + } + #[derive(Arbitrary, Clone)] + pub struct RegisterAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project_author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct RegisterData {} + #[derive(Arbitrary, Clone)] + pub struct EndRegistrations { + pub accounts: EndRegistrationsAccounts, + pub data: EndRegistrationsData, + } + #[derive(Arbitrary, Clone)] + pub struct EndRegistrationsAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct EndRegistrationsData {} + #[derive(Arbitrary, Clone)] + pub struct Invest { + pub accounts: InvestAccounts, + pub data: InvestData, + } + #[derive(Arbitrary, Clone)] + pub struct InvestAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub investor: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct InvestData { + pub amount: u64, + } + impl<'info> IxOps<'info> for Initialize { + type IxData = fuzz_example1::instruction::Initialize; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InitializeSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Initialize {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let author = fuzz_accounts.author.get_or_create_account( + self.accounts.author, + client, + 5000000000000, + ); + let signers = vec![author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let acc_meta = fuzz_example1::accounts::Initialize { + author: author.pubkey(), + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + } + impl<'info> IxOps<'info> for Register { + type IxData = fuzz_example1::instruction::Register; + type IxAccounts = FuzzAccounts; + type IxSnapshot = RegisterSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Register {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let project_author = fuzz_accounts.project_author.get_or_create_account( + self.accounts.project_author, + client, + 5000000000000, + ); + let signers = vec![project_author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let project = fuzz_accounts + .project + .get_or_create_account( + self.accounts.project, + &[ + project_author.pubkey().as_ref(), + state.as_ref(), + PROJECT_SEED.as_ref(), + ], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let acc_meta = fuzz_example1::accounts::Register { + project_author: project_author.pubkey(), + project, + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + fn check( + &self, + _pre_ix: Self::IxSnapshot, + _post_ix: Self::IxSnapshot, + _ix_data: Self::IxData, + ) -> Result<(), &'static str> { + // INFO + // This fuzz check will reveal that registrations can be performed + // even though registration windows is not open. + // if let Some(state) = pre_ix.state { + // if let Some(_project) = post_ix.project { + // let registrations_round = state.registrations_round; + // if !registrations_round { + // return Err( + // "We succesfully registered new project even though registrations are not open", + // ); + // } + // } + // } + Ok(()) + } + } + impl<'info> IxOps<'info> for EndRegistrations { + type IxData = fuzz_example1::instruction::EndRegistrations; + type IxAccounts = FuzzAccounts; + type IxSnapshot = EndRegistrationsSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::EndRegistrations {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let author = fuzz_accounts.author.get_or_create_account( + self.accounts.author, + client, + 5000000000000, + ); + let signers = vec![author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + let acc_meta = fuzz_example1::accounts::EndRegistration { + author: author.pubkey(), + state, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + } + impl<'info> IxOps<'info> for Invest { + type IxData = fuzz_example1::instruction::Invest; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InvestSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Invest { + amount: self.data.amount, + }; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let investor = fuzz_accounts.investor.get_or_create_account( + self.accounts.investor, + client, + 5000000000000, + ); + let signers = vec![investor.clone()]; + + let project_author = fuzz_accounts.project_author.get_or_create_account( + self.accounts.project, + client, + 50000000000, + ); + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let project = fuzz_accounts + .project + .get_or_create_account( + self.accounts.project, + &[ + project_author.pubkey().as_ref(), + state.as_ref(), + PROJECT_SEED.as_ref(), + ], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + let acc_meta = fuzz_example1::accounts::Invest { + investor: investor.pubkey(), + project, + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + fn check( + &self, + pre_ix: Self::IxSnapshot, + post_ix: Self::IxSnapshot, + ix_data: Self::IxData, + ) -> Result<(), &'static str> { + // INFO + // This fuzz check will reveal that invest can be performed + // even though registration windows was not closed. + if let Some(project_pre) = pre_ix.project { + let project_post = post_ix.project.unwrap(); + + if let Some(state) = pre_ix.state { + if !state.registrations_round + && project_pre.invested_amount + ix_data.amount + == project_post.invested_amount + { + return Err( + "Registration round was not terminated, however investor was able to invest inside registration window", + ); + } + } + } + Ok(()) + } + } + #[doc = r" Use AccountsStorage where T can be one of:"] + #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] + #[derive(Default)] + pub struct FuzzAccounts { + project: AccountsStorage, + state: AccountsStorage, + author: AccountsStorage, + _system_program: AccountsStorage, + investor: AccountsStorage, + project_author: AccountsStorage, + } + impl FuzzAccounts { + pub fn new() -> Self { + Default::default() + } + } +} diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs new file mode 100644 index 00000000..62aa91aa --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -0,0 +1,41 @@ +use fuzz_example1::entry; +use fuzz_instructions::fuzz_example1_fuzz_instructions::FuzzInstruction; +// this was manually imported +use fuzz_instructions::fuzz_example1_fuzz_instructions::Initialize; +// ----- +use program_client::fuzz_example1_instruction::*; +use trdelnik_client::{fuzz_trd, fuzzing::*}; +mod accounts_snapshots; +mod fuzz_instructions; + +const PROGRAM_NAME: &str = "fuzz_example1"; + +struct MyFuzzData; + +impl FuzzDataBuilder for MyFuzzData { + // TODO would it be possible to explicitly exclude some instructions ?. + // In this example registrations_round is not set within initialize, so + // it is set by default to false. + // However that is what invest expects: + // require!( + // !state.registrations_round, + // CustomError::RegistrationRoundOpen + // ); + // so we actually want to fuzz sequence where: + // end registrations is not called but invest will pass + fn pre_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + let init_ix = FuzzInstruction::Initialize(Initialize::arbitrary(u)?); + Ok(vec![init_ix]) + } +} + +fn main() { + loop { + fuzz_trd!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { + let mut client = + ProgramTestClientBlocking::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)) + .unwrap(); + let _ = fuzz_data.run_with_runtime(PROGRAM_ID, &mut client); + }); + } +} diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/accounts_snapshots.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/accounts_snapshots.rs new file mode 100644 index 00000000..4805ed84 --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/accounts_snapshots.rs @@ -0,0 +1,162 @@ +use fuzz_example1::state::{Project, State}; +use trdelnik_client::fuzzing::anchor_lang::solana_program::instruction::AccountMeta; +use trdelnik_client::fuzzing::anchor_lang::{self, prelude::*}; +use trdelnik_client::fuzzing::{get_account_infos_option, FuzzingError}; + +pub struct InitializeSnapshot<'info> { + pub author: Option>, + pub state: Option>, + pub system_program: Option>, +} +pub struct RegisterSnapshot<'info> { + pub project_author: Option>, + pub project: Option>, + pub state: Option>, + pub system_program: Option>, +} +pub struct EndRegistrationsSnapshot<'info> { + pub author: Option>, + pub state: Option>, +} +pub struct InvestSnapshot<'info> { + pub investor: Option>, + pub project: Option>, + pub state: Option>, + pub system_program: Option>, +} +impl<'info> InitializeSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + author, + state, + system_program, + }) + } +} +impl<'info> RegisterSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let project_author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let project: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + project_author, + project, + state, + system_program, + }) + } +} +impl<'info> EndRegistrationsSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let author: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { author, state }) + } +} +impl<'info> InvestSnapshot<'info> { + pub fn deserialize_option( + metas: &'info [AccountMeta], + accounts: &'info mut [Option], + ) -> core::result::Result { + let accounts = get_account_infos_option(accounts, metas) + .map_err(|_| FuzzingError::CannotGetAccounts)?; + let mut accounts_iter = accounts.into_iter(); + let investor: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::signer::Signer::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let project: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let state: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::account::Account::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + let system_program: Option> = accounts_iter + .next() + .ok_or(FuzzingError::NotEnoughAccounts)? + .map(|acc| anchor_lang::accounts::program::Program::try_from(&acc)) + .transpose() + .map_err(|_| FuzzingError::CannotDeserializeAccount)?; + Ok(Self { + investor, + project, + state, + system_program, + }) + } +} diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/fuzz_instructions.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/fuzz_instructions.rs new file mode 100644 index 00000000..465deb00 --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/fuzz_instructions.rs @@ -0,0 +1,343 @@ +pub mod fuzz_example1_fuzz_instructions { + use crate::accounts_snapshots::*; + use fuzz_example1::state::{PROJECT_SEED, STATE_SEED}; + use trdelnik_client::fuzzing::*; + + #[derive(Arbitrary, Clone, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + Initialize(Initialize), + Register(Register), + EndRegistrations(EndRegistrations), + Invest(Invest), + } + #[derive(Arbitrary, Clone)] + pub struct Initialize { + pub accounts: InitializeAccounts, + pub data: InitializeData, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct InitializeData {} + #[derive(Arbitrary, Clone)] + pub struct Register { + pub accounts: RegisterAccounts, + pub data: RegisterData, + } + #[derive(Arbitrary, Clone)] + pub struct RegisterAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project_author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct RegisterData {} + #[derive(Arbitrary, Clone)] + pub struct EndRegistrations { + pub accounts: EndRegistrationsAccounts, + pub data: EndRegistrationsData, + } + #[derive(Arbitrary, Clone)] + pub struct EndRegistrationsAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub author: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct EndRegistrationsData {} + #[derive(Arbitrary, Clone)] + pub struct Invest { + pub accounts: InvestAccounts, + pub data: InvestData, + } + #[derive(Arbitrary, Clone)] + pub struct InvestAccounts { + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub investor: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub project: AccountId, + #[arbitrary(with = |u: &mut arbitrary::Unstructured| u.int_in_range(0..=2))] + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Clone)] + pub struct InvestData { + pub amount: u64, + } + impl<'info> IxOps<'info> for Initialize { + type IxData = fuzz_example1::instruction::Initialize; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InitializeSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Initialize {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let author = fuzz_accounts.author.get_or_create_account( + self.accounts.author, + client, + 5000000000000, + ); + let signers = vec![author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let acc_meta = fuzz_example1::accounts::Initialize { + author: author.pubkey(), + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + } + impl<'info> IxOps<'info> for Register { + type IxData = fuzz_example1::instruction::Register; + type IxAccounts = FuzzAccounts; + type IxSnapshot = RegisterSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Register {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let project_author = fuzz_accounts.project_author.get_or_create_account( + self.accounts.project_author, + client, + 5000000000000, + ); + let signers = vec![project_author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let project = fuzz_accounts + .project + .get_or_create_account( + self.accounts.project, + &[ + project_author.pubkey().as_ref(), + state.as_ref(), + PROJECT_SEED.as_ref(), + ], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let acc_meta = fuzz_example1::accounts::Register { + project_author: project_author.pubkey(), + project, + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + fn check( + &self, + pre_ix: Self::IxSnapshot, + post_ix: Self::IxSnapshot, + _ix_data: Self::IxData, + ) -> Result<(), &'static str> { + // INFO + // This fuzz check will reveal that registrations can be performed + // even though registration windows is not open. + if let Some(state) = pre_ix.state { + if let Some(_project) = post_ix.project { + let registrations_round = state.registrations_round; + if !registrations_round { + return Err( + "We succesfully registered new project even though registrations are not open", + ); + } + } + } + Ok(()) + } + } + impl<'info> IxOps<'info> for EndRegistrations { + type IxData = fuzz_example1::instruction::EndRegistrations; + type IxAccounts = FuzzAccounts; + type IxSnapshot = EndRegistrationsSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::EndRegistrations {}; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let author = fuzz_accounts.author.get_or_create_account( + self.accounts.author, + client, + 5000000000000, + ); + let signers = vec![author.clone()]; + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + let acc_meta = fuzz_example1::accounts::EndRegistration { + author: author.pubkey(), + state, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + } + impl<'info> IxOps<'info> for Invest { + type IxData = fuzz_example1::instruction::Invest; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InvestSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = fuzz_example1::instruction::Invest { + amount: self.data.amount, + }; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let investor = fuzz_accounts.investor.get_or_create_account( + self.accounts.investor, + client, + 5000000000000, + ); + let signers = vec![investor.clone()]; + + let project_author = fuzz_accounts.project_author.get_or_create_account( + self.accounts.project, + client, + 50000000000, + ); + let state = fuzz_accounts + .state + .get_or_create_account( + self.accounts.state, + &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + + let project = fuzz_accounts + .project + .get_or_create_account( + self.accounts.project, + &[ + project_author.pubkey().as_ref(), + state.as_ref(), + PROJECT_SEED.as_ref(), + ], + &fuzz_example1::ID, + ) + .ok_or(FuzzingError::CannotGetAccounts)? + .pubkey(); + let acc_meta = fuzz_example1::accounts::Invest { + investor: investor.pubkey(), + project, + state, + system_program: solana_sdk::system_program::ID, + } + .to_account_metas(None); + Ok((signers, acc_meta)) + } + fn check( + &self, + _pre_ix: Self::IxSnapshot, + _post_ix: Self::IxSnapshot, + _ix_data: Self::IxData, + ) -> Result<(), &'static str> { + // INFO + // This fuzz check will reveal that invest can be performed + // even though registration windows was not closed. + // if let Some(project_pre) = pre_ix.project { + // let project_post = post_ix.project.unwrap(); + + // if let Some(state) = pre_ix.state { + // if !state.registrations_round + // && project_pre.invested_amount + ix_data.amount + // == project_post.invested_amount + // { + // return Err( + // "Registration round was not terminated, however investor was able to invest inside registration window", + // ); + // } + // } + // } + Ok(()) + } + } + #[doc = r" Use AccountsStorage where T can be one of:"] + #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] + #[derive(Default)] + pub struct FuzzAccounts { + project: AccountsStorage, + state: AccountsStorage, + author: AccountsStorage, + _system_program: AccountsStorage, + investor: AccountsStorage, + project_author: AccountsStorage, + } + impl FuzzAccounts { + pub fn new() -> Self { + Default::default() + } + } +} diff --git a/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs new file mode 100644 index 00000000..25e29f16 --- /dev/null +++ b/examples/fuzz_example1/trdelnik-tests/fuzz_tests/fuzz_1/test_fuzz.rs @@ -0,0 +1,23 @@ +use fuzz_example1::entry; +use program_client::fuzz_example1_instruction::*; +use fuzz_instructions::fuzz_example1_fuzz_instructions::FuzzInstruction; +use trdelnik_client::{fuzz_trd, fuzzing::*}; +mod accounts_snapshots; +mod fuzz_instructions; + +const PROGRAM_NAME: &str = "fuzz_example1"; + +struct MyFuzzData; + +impl FuzzDataBuilder for MyFuzzData {} + +fn main() { + loop { + fuzz_trd!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { + let mut client = + ProgramTestClientBlocking::new(PROGRAM_NAME, PROGRAM_ID, processor!(entry)) + .unwrap(); + let _ = fuzz_data.run_with_runtime(PROGRAM_ID, &mut client); + }); + } +}