Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d2091d43
Unverified
Commit
d2091d43
authored
May 05, 2021
by
smartcontracts
Committed by
GitHub
May 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix[contracts]: Remove verifyExclusionProof (#772)
* fix[contracts]: Remove verifyExclusionProof * chore: Add changeset
parent
b90cfb9e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
89 deletions
+5
-89
thin-horses-change.md
.changeset/thin-horses-change.md
+5
-0
Lib_MerkleTrie.sol
...cts/optimistic-ethereum/libraries/trie/Lib_MerkleTrie.sol
+0
-28
Lib_SecureMerkleTrie.sol
...timistic-ethereum/libraries/trie/Lib_SecureMerkleTrie.sol
+0
-25
TestLib_MerkleTrie.sol
...acts/contracts/test-libraries/trie/TestLib_MerkleTrie.sol
+0
-18
TestLib_SecureMerkleTrie.sol
...ontracts/test-libraries/trie/TestLib_SecureMerkleTrie.sol
+0
-18
No files found.
.changeset/thin-horses-change.md
0 → 100644
View file @
d2091d43
---
'
@eth-optimism/contracts'
:
patch
---
Removed verifyExclusionProof function from MerkleTrie library.
packages/contracts/contracts/optimistic-ethereum/libraries/trie/Lib_MerkleTrie.sol
View file @
d2091d43
...
...
@@ -92,34 +92,6 @@ library Lib_MerkleTrie {
);
}
/**
* @notice Verifies a proof that a given key is *not* present in
* the Merkle trie.
* @param _key Key of the node to search for, as a hex string.
* @param _proof Merkle trie inclusion proof for the node *nearest* the
* target node.
* @param _root Known root of the Merkle trie. Used to verify that the
* included proof is correctly constructed.
* @return _verified `true` if the key is absent in the trie, `false` otherwise.
*/
function verifyExclusionProof(
bytes memory _key,
bytes memory _proof,
bytes32 _root
)
internal
pure
returns (
bool _verified
)
{
(
bool exists,
) = get(_key, _proof, _root);
return exists == false;
}
/**
* @notice Updates a Merkle trie and returns a new root hash.
* @param _key Key of the node to update, as a hex string.
...
...
packages/contracts/contracts/optimistic-ethereum/libraries/trie/Lib_SecureMerkleTrie.sol
View file @
d2091d43
...
...
@@ -42,31 +42,6 @@ library Lib_SecureMerkleTrie {
return Lib_MerkleTrie.verifyInclusionProof(key, _value, _proof, _root);
}
/**
* @notice Verifies a proof that a given key is *not* present in
* the Merkle trie.
* @param _key Key of the node to search for, as a hex string.
* @param _proof Merkle trie inclusion proof for the node *nearest* the
* target node.
* @param _root Known root of the Merkle trie. Used to verify that the
* included proof is correctly constructed.
* @return _verified `true` if the key is not present in the trie, `false` otherwise.
*/
function verifyExclusionProof(
bytes memory _key,
bytes memory _proof,
bytes32 _root
)
internal
pure
returns (
bool _verified
)
{
bytes memory key = _getSecureKey(_key);
return Lib_MerkleTrie.verifyExclusionProof(key, _proof, _root);
}
/**
* @notice Updates a Merkle trie and returns a new root hash.
* @param _key Key of the node to update, as a hex string.
...
...
packages/contracts/contracts/test-libraries/trie/TestLib_MerkleTrie.sol
View file @
d2091d43
...
...
@@ -29,24 +29,6 @@ contract TestLib_MerkleTrie {
);
}
function verifyExclusionProof(
bytes memory _key,
bytes memory _proof,
bytes32 _root
)
public
pure
returns (
bool
)
{
return Lib_MerkleTrie.verifyExclusionProof(
_key,
_proof,
_root
);
}
function update(
bytes memory _key,
bytes memory _value,
...
...
packages/contracts/contracts/test-libraries/trie/TestLib_SecureMerkleTrie.sol
View file @
d2091d43
...
...
@@ -30,24 +30,6 @@ contract TestLib_SecureMerkleTrie {
);
}
function verifyExclusionProof(
bytes memory _key,
bytes memory _proof,
bytes32 _root
)
public
pure
returns (
bool
)
{
return Lib_SecureMerkleTrie.verifyExclusionProof(
_key,
_proof,
_root
);
}
function update(
bytes memory _key,
bytes memory _value,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment