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

Add xcm fuzzer #3869

Merged
merged 13 commits into from
Oct 12, 2021
Merged

Add xcm fuzzer #3869

merged 13 commits into from
Oct 12, 2021

Conversation

viniul
Copy link
Contributor

@viniul viniul commented Sep 16, 2021

CC @shawntabrizi
This PR extends the xcm-simulator to include a fuzzer that fuzzes execute_xcm function

Vincent Ulitzsch and others added 2 commits September 16, 2021 17:39
This commit adds a very basic fuzzer that fuzzes the xcm exectution,
in particular the process_instruction function.
@ordian ordian added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Sep 16, 2021
@ordian
Copy link
Member

ordian commented Sep 16, 2021

Could you please also add it to our CI: https://github.com/paritytech/polkadot/blob/master/.github/workflows/honggfuzz.yml. Thanks!

@@ -0,0 +1,189 @@
// Copyright 2021 Parity Technologies (UK) Ltd.
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if these two mock files can be re-used from the examples, or vice-versa.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that should be possible. Keeping them separate would allow for mock files specific to the fuzzer, which might be useful later.

@viniul
Copy link
Contributor Author

viniul commented Sep 16, 2021

Could you please also add it to our CI: https://github.com/paritytech/polkadot/blob/master/.github/workflows/honggfuzz.yml. Thanks!

Done with commit 7a279b7

Copy link
Member

@shawntabrizi shawntabrizi left a comment

Choose a reason for hiding this comment

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

lgtm

@ordian ordian merged commit dd77681 into paritytech:master Oct 12, 2021
ordian added a commit that referenced this pull request Oct 14, 2021
* master: (40 commits)
  use pipeline-scripts for dependent projects script (#4017)
  companion for substrate/10013 (#4078)
  fix restart issue of staking miner (#4073)
  use `WEIGHT_PER_SECOND` (#4077)
  Switch to compressed runtimes (#4061)
  Create a README for XCMv1 detailing notable changes (#4058)
  Bump proc-macro2 from 1.0.29 to 1.0.30 (#4071)
  Move runtime to with_transaction in order to Rollback state changes (#4067)
  Update wasmtime config to match new version in substrate (#4063)
  Fix XCM Weights on Westend (#4066)
  Dispatchable XCMs should translate to v0 (#4062)
  Add xcm fuzzer (#3869)
  Bump trybuild from 1.0.49 to 1.0.50 (#4060)
  Companion PR for ss58 crate (#3953)
  overseer: simplify debugging some more (#4053)
  Bump thiserror from 1.0.29 to 1.0.30 (#4048)
  Bump strum from 0.21.0 to 0.22.0 (#4047)
  Add para pallets to polkadot benchmarks (#4045)
  Fixes broken docker link in docker descriptiob (#4043)
  Bump trybuild from 1.0.48 to 1.0.49 (#4039)
  ...
emostov pushed a commit that referenced this pull request Nov 1, 2021
* Extend xcm-simulator with a fuzzer for xcm exec

This commit adds a very basic fuzzer that fuzzes the xcm exectution,
in particular the process_instruction function.

* Update cargo.toml in xcm-simulator-fuzzer

* Add xcm-fuzzer to honggfuzz workflow

* Update Cargo.lock

* Update xcm/xcm-simulator/fuzzer/Cargo.toml so honggfuzz shows up on top

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Update relay_chain.rs in xcm-fuzzer

* Use MAX_XCM_DECODE_DEPTH instead of hardcoded decode limit in xcm-fuzzer

* Add comment on how to generate coverage report in xcm-fuzzer

* fix warnings, fmt, and unused result

* fix compiler

Co-authored-by: Vincent Ulitzsch <vincent.ulitzsch@srlabs.de>
Co-authored-by: Vincent Ulitzsch <vincent@srlabs.de>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants