Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add machete to check unused dependencies #693

Merged
merged 6 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chia-fuzz
  • Loading branch information
Rigidity committed Aug 30, 2024
commit 384945458ad7dd06d55ccf43cd3742c6c1e1a71f
4 changes: 0 additions & 4 deletions crates/chia-consensus/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ chia-traits = { workspace = true }
chia-consensus = { workspace = true }
hex-literal = { workspace = true }

[lib]
name = "fuzzing_utils"
crate-type = ["rlib"]

[[bin]]
name = "puzzle-coin-solution"
path = "fuzz_targets/puzzle-coin-solution.rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use libfuzzer_sys::fuzz_target;

use chia_consensus::gen::conditions::parse_args;
use chia_fuzz::{make_list, BitCursor};
use clvmr::allocator::Allocator;
use fuzzing_utils::{make_list, BitCursor};

use chia_consensus::gen::flags::STRICT_ARGS_COUNT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ use chia_consensus::gen::conditions::{
parse_conditions, MempoolVisitor, ParseState, SpendBundleConditions, SpendConditions,
};
use chia_consensus::gen::spend_visitor::SpendVisitor;
use chia_fuzz::{make_list, BitCursor};
use chia_protocol::Bytes32;
use chia_protocol::Coin;
use clvm_utils::tree_hash;
use clvmr::{Allocator, NodePtr};
use fuzzing_utils::{make_list, BitCursor};
use std::collections::HashSet;
use std::sync::Arc;

Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use libfuzzer_sys::fuzz_target;

use chia_consensus::gen::messages::SpendId;
use chia_fuzz::{make_list, BitCursor};
use clvmr::allocator::Allocator;
use fuzzing_utils::{make_list, BitCursor};

fuzz_target!(|data: &[u8]| {
let mut a = Allocator::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use libfuzzer_sys::fuzz_target;

use chia_consensus::gen::get_puzzle_and_solution::parse_coin_spend;
use chia_fuzz::{make_list, BitCursor};
use clvmr::allocator::Allocator;
use fuzzing_utils::{make_list, BitCursor};

fuzz_target!(|data: &[u8]| {
let mut a = Allocator::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use libfuzzer_sys::fuzz_target;

use chia_consensus::gen::conditions::{parse_spends, MempoolVisitor};
use chia_fuzz::{make_list, BitCursor};
use clvmr::{Allocator, NodePtr};
use fuzzing_utils::{make_list, BitCursor};

use chia_consensus::consensus_constants::TEST_CONSTANTS;
use chia_consensus::gen::flags::{NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT};
Expand Down
2 changes: 1 addition & 1 deletion crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use chia_consensus::gen::conditions::{
process_single_spend, MempoolVisitor, ParseState, SpendBundleConditions,
};
use chia_consensus::gen::flags::{NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT};
use chia_fuzz::{make_tree, BitCursor};
use clvmr::allocator::Allocator;
use fuzzing_utils::{make_tree, BitCursor};
use libfuzzer_sys::fuzz_target;

fuzz_target!(|data: &[u8]| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
use libfuzzer_sys::fuzz_target;

use chia_consensus::gen::get_puzzle_and_solution::get_puzzle_and_solution_for_coin;
use chia_fuzz::{make_tree, BitCursor};
use chia_protocol::Coin;
use clvmr::allocator::Allocator;
use fuzzing_utils::{make_tree, BitCursor};
use std::collections::HashSet;

const HASH: [u8; 32] = [
Expand Down
2 changes: 1 addition & 1 deletion crates/clvm-utils/fuzz/fuzz_targets/curry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
use clvm_traits::{FromClvm, ToClvm};
use libfuzzer_sys::fuzz_target;

use chia_fuzz::{make_tree, BitCursor};
use clvm_utils::CurriedProgram;
use clvmr::allocator::{Allocator, NodePtr};
use fuzzing_utils::{make_tree, BitCursor};

fuzz_target!(|data: &[u8]| {
let mut a = Allocator::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#![no_main]
use libfuzzer_sys::fuzz_target;

use chia_fuzz::{make_tree, BitCursor};
use clvm_utils::{tree_hash, tree_hash_cached, TreeHash};
use clvmr::{Allocator, NodePtr};
use fuzzing_utils::{make_tree, BitCursor};
use std::collections::{HashMap, HashSet};

use clvmr::serde::{node_from_bytes_backrefs_record, node_to_bytes_backrefs};
Expand Down