Skip to content

feat(ctb): MPT Fuzzing#4142

Closed
clabby wants to merge 18 commits intosc/ctb-mini-trie-refactorfrom
clabby/ctb/merkle-trie-fuzz
Closed

feat(ctb): MPT Fuzzing#4142
clabby wants to merge 18 commits intosc/ctb-mini-trie-refactorfrom
clabby/ctb/merkle-trie-fuzz

Conversation

@clabby
Copy link
Contributor

@clabby clabby commented Dec 1, 2022

Overview

Reopened version of #4008 - CircleCI didn't like the @ in the old branch name.

Do not merge until after #4125 - bedrock contract tests will not pass due to the new testFuzz naming convention change


Adds a fuzz test input generator for testing Bedrock's MerkleTrie.sol.

Go version of #3847

Tests

Adds fuzz tests for MerkleTrie:

  • testFuzz_get_validProofs_success
  • testFuzz_get_invalidRoot_reverts
  • testFuzz_get_extraProofElements_reverts
  • testFuzz_get_invalidLargeInternalHash_reverts
  • testFuzz_get_invalidInternalNodeHash_reverts
  • testFuzz_get_corruptedProof_reverts
  • testFuzz_get_invalidDataRemainder_reverts
  • testFuzz_get_prefixedValidKey_reverts
  • testFuzz_get_emptyKey_reverts
  • testFuzz_get_partialProof_reverts

Metadata
Linear: ENG-3048

@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2022

🦋 Changeset detected

Latest commit: 9e0b5d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@eth-optimism/contracts-bedrock Patch
@eth-optimism/actor-tests Patch
@eth-optimism/sdk Patch
@eth-optimism/drippie-mon Patch
@eth-optimism/message-relayer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mslipper
Copy link
Contributor

mslipper commented Dec 1, 2022

Can you split this into two pieces - the fuzzer itself, then the test implementations? Graphite should have some tools to help you with that.

@clabby clabby force-pushed the clabby/ctb/merkle-trie-fuzz branch from ad2642b to 9e0b5d3 Compare December 1, 2022 21:06
@clabby
Copy link
Contributor Author

clabby commented Dec 2, 2022

Can you split this into two pieces - the fuzzer itself, then the test implementations? Graphite should have some tools to help you with that.

Transferred to #4161

@clabby clabby closed this Dec 2, 2022
@clabby clabby deleted the clabby/ctb/merkle-trie-fuzz branch December 8, 2022 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants