Skip to content

feat(ctb): MPT Fuzzing contract changes#4234

Merged
mergify[bot] merged 10 commits intodevelopfrom
clabby/ctb-trie/contract-changes
Dec 12, 2022
Merged

feat(ctb): MPT Fuzzing contract changes#4234
mergify[bot] merged 10 commits intodevelopfrom
clabby/ctb-trie/contract-changes

Conversation

@clabby
Copy link
Contributor

@clabby clabby commented Dec 6, 2022

Overview

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
ENG-3048

@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2022

⚠️ No Changeset found

Latest commit: ae7947f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@clabby
Copy link
Contributor Author

clabby commented Dec 6, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@clabby clabby force-pushed the clabby/ctb-trie/go-fuzz branch from fb36a91 to fd4abc8 Compare December 6, 2022 15:22
@clabby clabby force-pushed the clabby/ctb-trie/contract-changes branch from 76bf8ed to afccf16 Compare December 6, 2022 15:22
@clabby clabby force-pushed the clabby/ctb-trie/go-fuzz branch from fd4abc8 to 51a64b8 Compare December 8, 2022 02:16
@clabby clabby force-pushed the clabby/ctb-trie/contract-changes branch from afccf16 to 9301c64 Compare December 8, 2022 02:16
@maurelian maurelian force-pushed the clabby/ctb-trie/contract-changes branch from 9301c64 to d16cc7a Compare December 8, 2022 18:35
@mergify mergify bot added A-indexer Area: indexer sdk labels Dec 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2022

Codecov Report

Merging #4234 (1b42014) into clabby/ctb-trie/go-fuzz (7877931) will increase coverage by 0.75%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                     @@
##           clabby/ctb-trie/go-fuzz    #4234      +/-   ##
===========================================================
+ Coverage                    41.88%   42.64%   +0.75%     
===========================================================
  Files                          297      322      +25     
  Lines                        16730    17419     +689     
  Branches                       660      788     +128     
===========================================================
+ Hits                          7008     7428     +420     
- Misses                        9217     9483     +266     
- Partials                       505      508       +3     
Flag Coverage Δ
bedrock-go-tests 37.28% <ø> (-0.07%) ⬇️
contracts-bedrock-tests 38.78% <0.00%> (-0.06%) ⬇️
contracts-governance-tests 83.05% <ø> (?)
contracts-periphery-tests 99.33% <ø> (ø)
contracts-tests 98.86% <ø> (ø)
core-utils-tests 60.41% <ø> (?)
dtl-tests 47.15% <ø> (ø)
fault-detector-tests 42.17% <ø> (ø)
sdk-tests 39.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ts-bedrock/contracts/libraries/trie/MerkleTrie.sol 0.00% <0.00%> (ø)
op-node/p2p/discovery.go 65.52% <0.00%> (-4.10%) ⬇️
packages/core-utils/src/optimism/rollup-types.ts 100.00% <0.00%> (ø)
packages/core-utils/src/optimism/fees.ts 58.97% <0.00%> (ø)
...ges/contracts-governance/contracts/MintManager.sol 75.00% <0.00%> (ø)
packages/core-utils/src/optimism/alias.ts 100.00% <0.00%> (ø)
packages/core-utils/src/external/ethers/network.ts 33.33% <0.00%> (ø)
packages/core-utils/src/common/test-utils.ts 95.55% <0.00%> (ø)
packages/core-utils/src/optimism/op-provider.ts 16.66% <0.00%> (ø)
packages/core-utils/src/optimism/batch-encoding.ts 89.30% <0.00%> (ø)
... and 18 more

@clabby clabby force-pushed the clabby/ctb-trie/go-fuzz branch from 51a64b8 to 7877931 Compare December 8, 2022 22:32
@clabby clabby force-pushed the clabby/ctb-trie/contract-changes branch 2 times, most recently from 6bd24cb to bb3f1a5 Compare December 8, 2022 22:35
Copy link
Contributor

@smartcontracts smartcontracts left a comment

Choose a reason for hiding this comment

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

Fantastic work here

Base automatically changed from clabby/ctb-trie/go-fuzz to develop December 12, 2022 17:21
@mergify
Copy link
Contributor

mergify bot commented Dec 12, 2022

Hey @clabby! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Dec 12, 2022
@mergify
Copy link
Contributor

mergify bot commented Dec 12, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Dec 12, 2022

Hey @clabby, this pull request failed to merge and has been dequeued from the merge train. If you believe your PR failed in the merge train because of a flaky test, requeue it by commenting with @mergifyio requeue.
More details can be found on the Queue: Embarked in merge train check-run.

@mergify mergify bot removed the on-merge-train label Dec 12, 2022
@clabby clabby force-pushed the clabby/ctb-trie/contract-changes branch from 1b42014 to ae7947f Compare December 12, 2022 17:36
@mergify mergify bot removed the conflict label Dec 12, 2022
mergify bot added a commit that referenced this pull request Dec 12, 2022
@mergify
Copy link
Contributor

mergify bot commented Dec 12, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented Dec 12, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot merged commit 9b74fd6 into develop Dec 12, 2022
@mergify mergify bot deleted the clabby/ctb-trie/contract-changes branch December 12, 2022 18:17
@mergify mergify bot removed the on-merge-train label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-indexer Area: indexer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants