Skip to content

Commit

Permalink
chore: make the DAVerifier methods internal (#239)
Browse files Browse the repository at this point in the history
<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

Closes #237

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [ ] New and updated code has appropriate documentation
- [ ] New and updated code has new and/or updated testing
- [ ] Required CI checks are passing
- [ ] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords
  • Loading branch information
rach-id authored Oct 19, 2023
1 parent 3a552d8 commit 8ef3919
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/verifier/DAVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ library DAVerifier {
/// @return `true` if the proof is valid, `false` otherwise.
/// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
function verifySharesToDataRootTupleRoot(IDAOracle _bridge, SharesProof memory _sharesProof, bytes32 _root)
external
internal
view
returns (bool, ErrorCodes)
{
Expand Down Expand Up @@ -136,7 +136,7 @@ library DAVerifier {
BinaryMerkleProof memory _rowProof,
AttestationProof memory _attestationProof,
bytes32 _root
) public view returns (bool, ErrorCodes) {
) internal view returns (bool, ErrorCodes) {
// checking that the data root was committed to by the Blobstream smart contract
if (
!_bridge.verifyAttestation(
Expand Down Expand Up @@ -167,7 +167,7 @@ library DAVerifier {
BinaryMerkleProof[] memory _rowProofs,
AttestationProof memory _attestationProof,
bytes32 _root
) public view returns (bool, ErrorCodes) {
) internal view returns (bool, ErrorCodes) {
// checking that the data root was committed to by the Blobstream smart contract
if (
!_bridge.verifyAttestation(
Expand Down Expand Up @@ -202,7 +202,7 @@ library DAVerifier {
/// @return The square size of the corresponding block.
/// @return an error code if the _proof is invalid, Errors.NoError otherwise.
function computeSquareSizeFromRowProof(BinaryMerkleProof memory _proof)
external
internal
pure
returns (uint256, ErrorCodes)
{
Expand All @@ -221,7 +221,7 @@ library DAVerifier {
/// Note: the minimum square size is 1. Thus, we don't expect the proof not to contain any side node.
/// @param _proof The proof of the shares to the row/column root.
/// @return The square size of the corresponding block.
function computeSquareSizeFromShareProof(NamespaceMerkleMultiproof memory _proof) external pure returns (uint256) {
function computeSquareSizeFromShareProof(NamespaceMerkleMultiproof memory _proof) internal pure returns (uint256) {
uint256 extendedSquareRowSize = 2 ** _proof.sideNodes.length;
// we divide the extended square row size by 2 because the square size is the
// the size of the row of the original square size.
Expand Down

0 comments on commit 8ef3919

Please sign in to comment.