44 Commits

Author SHA1 Message Date
x
9785777642 chore: Update copyright license year
Happy 2026!
2026-01-01 11:40:45 +00:00
x
add9bb596c chore: Update crate dependencies 2025-12-25 12:22:56 +00:00
x
aa537b9e4b chore: Update crate dependencies 2025-11-24 12:12:14 +02:00
parazyd
fda2a84034 chore: Update dependencies 2025-08-05 09:41:05 +02:00
parazyd
e002530bb2 chore: Update packages to v0.5.0 2025-05-09 11:32:44 +02:00
parazyd
c040d9c00f chore: Update crate dependencies 2025-04-15 10:49:43 +02:00
Paul Otten
abe422d0f4 fuzz/Cargo.toml: don't try to inherit lints
On line 25 we isolate the fuzzer to it's own minimal workspace.
Therefor there are no workplace lints to inherit and we get an error.
2025-04-14 19:42:25 -04:00
Paul Otten
be2ced6543 fuzz/README.md: fuzzing explicitly requires nightly now
While we've moving (almost) everything stable by default now,
fuzzing still requires nightly.

Since stable is now the default we need to add "+nightly" to
various fuzzing commands.
2025-04-14 19:42:25 -04:00
parazyd
13620224c0 chore: Update crate dependencies 2025-02-09 10:32:33 +01:00
parazyd
604f443fd1 chore: Update license header year 2025-01-24 10:36:02 +01:00
parazyd
b5d7c52191 chore: Update crate dependencies 2025-01-21 14:21:32 +01:00
parazyd
242fe81658 chore: Update crate dependencies 2024-10-01 14:15:03 +02:00
parazyd
27fd3785f8 chore: Update crate dependencies and CI Rust version 2024-07-09 12:20:06 +02:00
foo
4eba00236d clippy: add suggested clippy lints to top-level Cargo.toml and enable
clippy linting at the workspace level for all crates

Configure all workspaces to use lints from the top-level Cargo.toml
  file
Add example lints that the project could configure to improve security
  and reliability.
Configure lints to warn level. Using deny level makes other binaries
fail to compile if even one of them has a failure.
No lints are added in this commit. Future changes can enable and fix
lints
2024-06-09 10:35:09 -04:00
parazyd
80d103a2ba chore: Update crate dependencies 2024-06-04 10:24:28 +02:00
parazyd
2e37330d0d chore: Update crate dependencies 2024-05-27 15:29:58 +02:00
foo
ed4385de0c fuzz: Add dictionaries, improve README 2024-05-20 11:16:57 -04:00
parazyd
0de97d0db3 chore: Update crate dependencies 2024-03-05 08:47:43 +01:00
parazyd
0e6f51e895 chore: Update copyright year in license headers 2024-01-16 13:07:22 +01:00
parazyd
f188c2bb05 chore: Update crate dependencies 2023-11-09 14:20:57 +01:00
parazyd
b61127af9a chore: Update crate dependencies 2023-10-27 09:02:18 +02:00
y
82b9ab914e fuzz: add zkas_compile.rs libfuzzer fuzz harness
This should have been done in an earlier commit
(a0e78b576a)
but I forgot to add the file.
2023-09-19 16:16:02 -04:00
y
cd3334806d fuzz: add code coverage artifacts to ignore file 2023-09-19 16:15:49 -04:00
y
2d41e54f14 fuzz: move all artifacts into regressions
Merge the libfuzzer and honggfuzz saved crash inputs into a shared
folder in fuzz/regressions

Add relevant entries to .gitignore
2023-09-19 16:13:50 -04:00
y
e7a7f6d02d fuzz: add regressions/ folder; improve READMEs 2023-09-19 16:09:22 -04:00
y
aaed928482 fuzz: cleanup zkas-compile harness in honggfuzz 2023-09-19 14:44:03 -04:00
y
a0e78b576a fuzz: Enable and document code coverage for zkas
Libfuzzer has more capabilities to provide a helpful code coverage
report for fuzz testing. (Or at least is has better documentation.)
This commit copies the zkas-compile harness from honggfuzz into libfuzzer.
It also includes instructions for generating coverage reports.
2023-09-19 14:41:25 -04:00
y
c669ba4696 fuzz: fix old code comment in script 2023-09-16 23:00:24 +00:00
y
f9ed0b825c fuzz: add script to generate .zk file corpus 2023-09-16 23:00:24 +00:00
y
9d97aebf50 fuzz: Add fuzz harness for zkas compilation
Create a fuzz harness to test the ./zkas binary compilation process. The
whole pipeline is tested: Lexer, Parser, Compiler, Analyzer. This is
performed by copying the relevant code from bin/zkas/src/main.rs.

Testing the entire pipeline like this is not very efficient in terms of
fuzzing cycles but on the other hand it is a quick-and-dirty way to find
results. It also benefits from testing the actual inputs to the binary
in the way it's expecting, rather than checking each of the components
in a piecemeal way using interfaces that aren't expected to be exposed
anyway.
2023-09-16 23:00:24 +00:00
y
e23a5e9ee5 fuzz: Add differential fuzzing for BTC VarInt
DarkFi's VarInt struct is meant to be equivalent to the one used by BTC.
Most of the source code is extremeley similar. This commit adds very
basic tests to ensure equivalence between DarkFi's implementation and
the one used by the BTC crate.
The tests included here are quite basic. Future work can expand on
the testing done on the deserialized values.
This harness can also be used as as guide or template for future
differential fuzzing.
2023-09-06 10:57:28 +00:00
greptile
8a806b2cfc fuzz: improve docs for memory settings (#208)
* fuzz: improve docs for memory settings

* wording improvement

* Add instructions for more optimal fuzzing

---------

Co-authored-by: y <y>
2023-09-06 10:56:51 +00:00
greptile
d9d918b884 fuzz: Add honggfuzz (#206)
* fuzz: Add honggfuzz

- Added honggfuzz in fuzz2/ (alongside libfuzzer in fuzz/)
- Created convenience script for fuzzing binary decoder
- Created a script to convert inputs that cause crashes into arrays so
  that they can be used in unit tests

* Create honggfuzz as subdirectory of fuzz/

- Reorg so that honggfuzz is under fuzz/ instead of in a separate
  sibling-level directory fuzz2
- Update fuzz/README.md to make it explicit that it covers libfuzzer

Note: `cargo fuzz`/libfuzzer seems to insist that its folder exists at
`$REPO/fuzz/` so that's the reason for this particular folder structure.

---------

Co-authored-by: y <y>
2023-09-04 16:42:34 +00:00
greptile
7e76cf360c docs: Add more details about fuzzing (#201)
Add more documentation to fuzz/README.md, especially when it comes to
interpreting out-of-memory issues.

Co-authored-by: y <y>
Co-authored-by: parazyd <parazyd@users.noreply.github.com>
2023-08-30 05:44:42 +00:00
y
374d19851f fuzz: Restructure corpora git structure
Use artifacts/ rather than corpus/ to track fuzz inputs. corpus appears
to be a temporary directory that will be modified when minimizing test
cases using commands like `cargo fuzz cmin` or `cargo fuzz tmin`. For
this reason it's not suitable for long-term storage and is likely to
make the git commit-staging process very messy.
2023-08-30 05:42:23 +00:00
parazyd
cbe9c64065 chore: Update crate dependencies 2023-08-29 13:08:35 +02:00
parazyd
0440864b3a fuzz: Use patched blake2_simd crate. 2023-08-29 08:58:49 +02:00
y
433ff9d0a6 fuzz: Add harness for decoding strings from bytes
- Add a fuzz harness for deserializing strings from bytes
- Add entry to corpora that triggers an out-of-memory issue in string
  decoding
2023-08-25 06:37:57 +00:00
y
5ac92e3093 fuzz: improve readme and corpora wording 2023-08-24 18:37:46 +00:00
y
7c1cd791f2 Add out-of-memory crash to corpora
This input caused an out-of-memory bug. I haven't figured out why yet
but it's good to keep this in the corpus for future testing.

Something interesting: the fuzzer brute-forced the MAGIC BYTES for the
binary on its own! This file is a good starting point for future fuzzing
because it contains the magic bytes: subsequent runs can start from here
instead of needing to "find" the magic bytes via brute forcing every
time
2023-08-24 18:37:46 +00:00
y
bc16b6c475 Add instructions for building the fuzzing corpus
- Inform devs how to build an organized and useful corpora based on the
results of fuzz testing.
- Modify .gitignore to allow corpus/ tracking. Note: files in corpus/
  should not be blindly committed but selectively added based on
  usefulness
- Add emptyfile to zkas-decoder corpus because it caused a panic
2023-08-24 18:37:46 +00:00
y
382205ad81 Add fuzzer for ZkBinary::decode() 2023-08-24 18:37:46 +00:00
parazyd
fe215e632c fuzz: Add zkas Lexer fuzzer. 2023-08-23 23:54:33 +02:00
parazyd
00e4456787 fuzz: Serialize attempt 2023-08-23 22:21:42 +02:00