-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 interfaces #920
Merged
Merged
V2 interfaces #920
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
interface IEigenDABatchMetadataStorage { | ||
function batchIdToBatchMetadataHash(uint32 batchId) external view returns (bytes32); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "./IEigenDAStructs.sol"; | ||
import "./IEigenDAThresholdRegistry.sol"; | ||
|
||
interface IEigenDABlobVerifier is IEigenDAThresholdRegistry { | ||
|
||
/** | ||
* @notice Verifies a the blob is valid for the required quorums | ||
* @param blobHeader The blob header to verify | ||
* @param blobVerificationProof The blob verification proof to verify the blob against | ||
*/ | ||
function verifyBlobV1( | ||
BlobHeader calldata blobHeader, | ||
BlobVerificationProof calldata blobVerificationProof | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies that a blob is valid for the required quorums and additional quorums | ||
* @param blobHeader The blob header to verify | ||
* @param blobVerificationProof The blob verification proof to verify the blob against | ||
* @param additionalQuorumNumbersRequired The additional required quorum numbers | ||
*/ | ||
function verifyBlobV1( | ||
BlobHeader calldata blobHeader, | ||
BlobVerificationProof calldata blobVerificationProof, | ||
bytes calldata additionalQuorumNumbersRequired | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies a batch of blobs for the required quorums | ||
* @param blobHeaders The blob headers to verify | ||
* @param blobVerificationProofs The blob verification proofs to verify the blobs against | ||
*/ | ||
function verifyBlobsV1( | ||
BlobHeader[] calldata blobHeaders, | ||
BlobVerificationProof[] calldata blobVerificationProofs | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies a batch of blobs for the required quorums and additional quorums | ||
* @param blobHeaders The blob headers to verify | ||
* @param blobVerificationProofs The blob verification proofs to verify the blobs against | ||
* @param additionalQuorumNumbersRequired The additional required quorum numbers | ||
*/ | ||
function verifyBlobsV1( | ||
BlobHeader[] calldata blobHeaders, | ||
BlobVerificationProof[] calldata blobVerificationProofs, | ||
bytes calldata additionalQuorumNumbersRequired | ||
) external view; | ||
|
||
|
||
/** | ||
* @notice Verifies a blob for the required quorums and the default security thresholds | ||
* @param batchHeader The batch header of the blob | ||
* @param blobVerificationProof The blob verification proof for the blob | ||
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignature to verify the blob against | ||
*/ | ||
function verifyBlobV2( | ||
BatchHeaderV2 calldata batchHeader, | ||
BlobVerificationProofV2 calldata blobVerificationProof, | ||
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies a blob for the required quorums and additional quorums | ||
* @param batchHeader The batch header of the blob | ||
* @param blobVerificationProof The blob verification proof for the blob | ||
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignature to verify the blob against | ||
* @param additionalQuorumNumbersRequired The additional required quorum numbers | ||
*/ | ||
function verifyBlobV2( | ||
BatchHeaderV2 calldata batchHeader, | ||
BlobVerificationProofV2 calldata blobVerificationProof, | ||
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature, | ||
bytes calldata additionalQuorumNumbersRequired | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies a blob for the required quorums and additional quorums and a custom security threshold | ||
* @param batchHeader The batch header of the blob | ||
* @param blobVerificationProof The blob verification proof for the blob | ||
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignature to verify the blob against | ||
* @param securityThreshold The custom security threshold to verify the blob against | ||
* @param additionalQuorumNumbersRequired The additional required quorum numbers | ||
*/ | ||
function verifyBlobV2( | ||
BatchHeaderV2 calldata batchHeader, | ||
BlobVerificationProofV2 calldata blobVerificationProof, | ||
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature, | ||
SecurityThresholds memory securityThreshold, | ||
bytes calldata additionalQuorumNumbersRequired | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies a batch of blobs for the required quorums and additional quorums and a set of custom security threshold | ||
* @param batchHeader The batch headers of the blobs | ||
* @param blobVerificationProof The blob verification proofs for the blobs | ||
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignatures to verify the blobs against | ||
* @param securityThresholds The set of custom security thresholds to verify the blobs against | ||
* @param additionalQuorumNumbersRequired The additional required quorum numbers | ||
*/ | ||
function verifyBlobV2( | ||
BatchHeaderV2 calldata batchHeader, | ||
BlobVerificationProofV2 calldata blobVerificationProof, | ||
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature, | ||
SecurityThresholds[] memory securityThresholds, | ||
bytes calldata additionalQuorumNumbersRequired | ||
) external view; | ||
|
||
/** | ||
* @notice Returns the nonSignerStakesAndSignature for a given blob and signed batch | ||
* @param signedBatch The signed batch to get the nonSignerStakesAndSignature for | ||
* @param blobHeader The blob header of the blob in the signed batch | ||
*/ | ||
function getNonSignerStakesAndSignature( | ||
SignedBatch calldata signedBatch, | ||
BlobHeaderV2 calldata blobHeader | ||
) external view returns (NonSignerStakesAndSignature memory); | ||
|
||
/** | ||
* @notice Verifies the security parameters for a blob | ||
* @param blobParams The blob params to verify | ||
* @param securityThresholds The security thresholds to verify against | ||
*/ | ||
function verifyBlobSecurityParams( | ||
VersionedBlobParams memory blobParams, | ||
SecurityThresholds memory securityThresholds | ||
) external view; | ||
|
||
/** | ||
* @notice Verifies the security parameters for a blob | ||
* @param version The version of the blob to verify | ||
* @param securityThresholds The security thresholds to verify against | ||
*/ | ||
function verifyBlobSecurityParams( | ||
uint16 version, | ||
SecurityThresholds memory securityThresholds | ||
) external view; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
interface IEigenDARelayRegistry { | ||
|
||
event RelayAdded(address indexed relay, uint32 indexed id, string relayURL); | ||
|
||
function setRelayURL(address relay, uint32 id, string memory relayURL) external; | ||
|
||
function getRelayURL(uint32 id) external view returns (string memory); | ||
|
||
function getRelayId(address relay) external view returns (uint32); | ||
|
||
function getRelayAddress(uint32 id) external view returns (address); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: quorumAdversaryThresholdPercentages -> quorumConfirmationThresholdPercentages