Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
move pools fuzzing to hongfuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma committed Oct 24, 2022
1 parent 3bbdba4 commit bc8a659
Show file tree
Hide file tree
Showing 8 changed files with 449 additions and 363 deletions.
33 changes: 19 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ members = [
"frame/preimage",
"frame/proxy",
"frame/nomination-pools",
"frame/nomination-pools/fuzzer",
"frame/nomination-pools/benchmarking",
"frame/nomination-pools/test-staking",
"frame/nomination-pools/runtime-api",
Expand Down
9 changes: 4 additions & 5 deletions frame/nomination-pools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ sp-core = { version = "6.0.0", default-features = false, path = "../../primitive
sp-io = { version = "6.0.0", default-features = false, path = "../../primitives/io" }
log = { version = "0.4.0", default-features = false }

[dev-dependencies]
pallet-balances = { version = "4.0.0-dev", path = "../balances" }
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing" }
rand = { version = "0.8.5", features = ["small_rng"] }
# Optional: usef for testing and/or fuzzing
pallet-balances = { version = "4.0.0-dev", path = "../balances", optional = true }
sp-tracing = { version = "5.0.0", path = "../../primitives/tracing", optional = true }

[features]
default = ["std"]
fuzzing = ["pallet-balances", "sp-tracing"]
std = [
"codec/std",
"scale-info/std",
Expand All @@ -51,4 +51,3 @@ runtime-benchmarks = [
try-runtime = [
"frame-support/try-runtime"
]
fuzz-test = []
33 changes: 33 additions & 0 deletions frame/nomination-pools/fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "pallet-nomination-pools-fuzzer"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "Fuzzer for fixed point arithmetic primitives."
documentation = "https://docs.rs/sp-arithmetic-fuzzer"
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
honggfuzz = "0.5.54"

pallet-nomination-pools = { path = "..", features = ["fuzzing"] }

frame-system = { path = "../../system" }
frame-support = { path = "../../support" }

sp-runtime = { path = "../../../primitives/runtime" }
sp-io = { path = "../../../primitives/io" }
sp-tracing = { path = "../../../primitives/tracing" }

rand = { version = "0.8.5", features = ["small_rng"] }
log = "0.4.17"

[[bin]]
name = "call"
path = "src/call.rs"
Loading

1 comment on commit bc8a659

@Polkadot-Forum
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/how-to-make-a-fuzz-er-for-wasm-runtime/936/2

Please sign in to comment.