Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0aa0 committed Jan 24, 2025
1 parent fe82bba commit 533f901
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 113 deletions.
6 changes: 3 additions & 3 deletions contracts/script/EigenDADeployer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {IBLSApkRegistry} from "eigenlayer-middleware/interfaces/IBLSApkRegistry.
import {EigenDAServiceManager, IAVSDirectory, IRewardsCoordinator} from "../src/core/EigenDAServiceManager.sol";
import {EigenDAHasher} from "../src/libraries/EigenDAHasher.sol";
import {EigenDAThresholdRegistry} from "../src/core/EigenDAThresholdRegistry.sol";
import {EigenDABlobVerifier} from "../src/core/EigenDABlobVerifier.sol";
import {EigenDACertVerifier} from "../src/core/EigenDACertVerifier.sol";
import {IEigenDAThresholdRegistry} from "../src/interfaces/IEigenDAThresholdRegistry.sol";
import {IEigenDABatchMetadataStorage} from "../src/interfaces/IEigenDABatchMetadataStorage.sol";
import {IEigenDASignatureVerifier} from "../src/interfaces/IEigenDASignatureVerifier.sol";
Expand Down Expand Up @@ -46,7 +46,7 @@ contract EigenDADeployer is DeployOpenEigenLayer {
BLSApkRegistry public apkRegistry;
EigenDAServiceManager public eigenDAServiceManager;
EigenDAThresholdRegistry public eigenDAThresholdRegistry;
EigenDABlobVerifier public eigenDABlobVerifier;
EigenDACertVerifier public eigenDACertVerifier;
RegistryCoordinator public registryCoordinator;
IIndexRegistry public indexRegistry;
IStakeRegistry public stakeRegistry;
Expand Down Expand Up @@ -317,7 +317,7 @@ contract EigenDADeployer is DeployOpenEigenLayer {

operatorStateRetriever = new OperatorStateRetriever();

eigenDABlobVerifier = new EigenDABlobVerifier(
eigenDACertVerifier = new EigenDACertVerifier(
IEigenDAThresholdRegistry(address(eigenDAThresholdRegistry)),
IEigenDABatchMetadataStorage(address(eigenDAServiceManager)),
IEigenDASignatureVerifier(address(eigenDAServiceManager)),
Expand Down
2 changes: 1 addition & 1 deletion contracts/script/SetUpEigenDA.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ contract SetupEigenDA is EigenDADeployer, EigenLayerUtils {
vm.serializeAddress(output, "operatorStateRetriever", address(operatorStateRetriever));
vm.serializeAddress(output, "blsApkRegistry" , address(apkRegistry));
vm.serializeAddress(output, "registryCoordinator", address(registryCoordinator));
vm.serializeAddress(output, "blobVerifier", address(eigenDABlobVerifier));
vm.serializeAddress(output, "certVerifier", address(eigenDACertVerifier));

string memory finalJson = vm.serializeString(output, "object", output);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {IEigenDABlobVerifier} from "../interfaces/IEigenDABlobVerifier.sol";
import {IEigenDACertVerifier} from "../interfaces/IEigenDACertVerifier.sol";
import {IEigenDAThresholdRegistry} from "../interfaces/IEigenDAThresholdRegistry.sol";
import {IEigenDABatchMetadataStorage} from "../interfaces/IEigenDABatchMetadataStorage.sol";
import {IEigenDASignatureVerifier} from "../interfaces/IEigenDASignatureVerifier.sol";
import {EigenDABlobVerificationUtils} from "../libraries/EigenDABlobVerificationUtils.sol";
import {EigenDACertVerificationUtils} from "../libraries/EigenDACertVerificationUtils.sol";
import {OperatorStateRetriever} from "lib/eigenlayer-middleware/src/OperatorStateRetriever.sol";
import {IRegistryCoordinator} from "lib/eigenlayer-middleware/src/RegistryCoordinator.sol";
import {IEigenDARelayRegistry} from "../interfaces/IEigenDARelayRegistry.sol";
import "../interfaces/IEigenDAStructs.sol";

contract EigenDABlobVerifier is IEigenDABlobVerifier {
contract EigenDACertVerifier is IEigenDACertVerifier {

IEigenDAThresholdRegistry public immutable eigenDAThresholdRegistry;
IEigenDABatchMetadataStorage public immutable eigenDABatchMetadataStorage;
Expand Down Expand Up @@ -44,11 +44,11 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
* @param blobHeader The blob header to verify
* @param blobVerificationProof The blob verification proof to verify the blob against
*/
function verifyBlobV1(
function verifyDACertV1(
BlobHeader calldata blobHeader,
BlobVerificationProof calldata blobVerificationProof
) external view {
EigenDABlobVerificationUtils._verifyBlobV1ForQuorums(
EigenDACertVerificationUtils._verifyDACertV1ForQuorums(
eigenDAThresholdRegistry,
eigenDABatchMetadataStorage,
blobHeader,
Expand All @@ -62,11 +62,11 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
* @param blobHeaders The blob headers to verify
* @param blobVerificationProofs The blob verification proofs to verify the blobs against
*/
function verifyBlobsV1(
function verifyDACertsV1(
BlobHeader[] calldata blobHeaders,
BlobVerificationProof[] calldata blobVerificationProofs
) external view {
EigenDABlobVerificationUtils._verifyBlobsV1ForQuorums(
EigenDACertVerificationUtils._verifyDACertsV1ForQuorums(
eigenDAThresholdRegistry,
eigenDABatchMetadataStorage,
blobHeaders,
Expand All @@ -80,45 +80,45 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
/**
* @notice Verifies a blob for the base 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 blobInclusionInfo The inclusion proof for the blob
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignature for the blob
*/
function verifyBlobV2(
function verifyDACertV2(
BatchHeaderV2 calldata batchHeader,
BlobVerificationProofV2 calldata blobVerificationProof,
BlobInclusionInfo calldata blobInclusionInfo,
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature
) external view {
EigenDABlobVerificationUtils._verifyBlobV2ForQuorums(
EigenDACertVerificationUtils._verifyDACertV2ForQuorums(
eigenDAThresholdRegistry,
eigenDASignatureVerifier,
eigenDARelayRegistry,
batchHeader,
blobVerificationProof,
blobInclusionInfo,
nonSignerStakesAndSignature,
getDefaultSecurityThresholdsV2(),
blobVerificationProof.blobCertificate.blobHeader.quorumNumbers
blobInclusionInfo.blobCertificate.blobHeader.quorumNumbers
);
}

/**
* @notice Verifies a blob for the base required quorums and the default security thresholds
* @param signedBatch The signed batch to verify the blob against
* @param blobVerificationProof The blob verification proof for the blob
* @param blobInclusionInfo The inclusion proof for the blob
*/
function verifyBlobV2FromSignedBatch(
function verifyDACertV2FromSignedBatch(
SignedBatch calldata signedBatch,
BlobVerificationProofV2 calldata blobVerificationProof
BlobInclusionInfo calldata blobInclusionInfo
) external view {
EigenDABlobVerificationUtils._verifyBlobV2ForQuorumsFromSignedBatch(
EigenDACertVerificationUtils._verifyDACertV2ForQuorumsFromSignedBatch(
eigenDAThresholdRegistry,
eigenDASignatureVerifier,
eigenDARelayRegistry,
operatorStateRetriever,
registryCoordinator,
signedBatch,
blobVerificationProof,
blobInclusionInfo,
getDefaultSecurityThresholdsV2(),
blobVerificationProof.blobCertificate.blobHeader.quorumNumbers
blobInclusionInfo.blobCertificate.blobHeader.quorumNumbers
);
}

Expand All @@ -131,7 +131,7 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
function getNonSignerStakesAndSignature(
SignedBatch calldata signedBatch
) external view returns (NonSignerStakesAndSignature memory) {
return EigenDABlobVerificationUtils._getNonSignerStakesAndSignature(
return EigenDACertVerificationUtils._getNonSignerStakesAndSignature(
operatorStateRetriever,
registryCoordinator,
signedBatch
Expand All @@ -147,7 +147,7 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
VersionedBlobParams memory blobParams,
SecurityThresholds memory securityThresholds
) external view {
EigenDABlobVerificationUtils._verifyBlobSecurityParams(blobParams, securityThresholds);
EigenDACertVerificationUtils._verifyBlobSecurityParams(blobParams, securityThresholds);
}

/**
Expand All @@ -159,7 +159,7 @@ contract EigenDABlobVerifier is IEigenDABlobVerifier {
uint16 version,
SecurityThresholds memory securityThresholds
) external view {
EigenDABlobVerificationUtils._verifyBlobSecurityParams(getBlobParams(version), securityThresholds);
EigenDACertVerificationUtils._verifyBlobSecurityParams(getBlobParams(version), securityThresholds);
}

/// @notice Returns an array of bytes where each byte represents the adversary threshold percentage of the quorum at that index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ pragma solidity ^0.8.9;
import {IEigenDAThresholdRegistry} from "./IEigenDAThresholdRegistry.sol";
import "./IEigenDAStructs.sol";

interface IEigenDABlobVerifier is IEigenDAThresholdRegistry {
interface IEigenDACertVerifier 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(
function verifyDACertV1(
BlobHeader calldata blobHeader,
BlobVerificationProof calldata blobVerificationProof
) external view;
Expand All @@ -22,31 +22,31 @@ interface IEigenDABlobVerifier is IEigenDAThresholdRegistry {
* @param blobHeaders The blob headers to verify
* @param blobVerificationProofs The blob verification proofs to verify the blobs against
*/
function verifyBlobsV1(
function verifyDACertsV1(
BlobHeader[] calldata blobHeaders,
BlobVerificationProof[] calldata blobVerificationProofs
) 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 blobInclusionInfo The inclusion proof for the blob
* @param nonSignerStakesAndSignature The nonSignerStakesAndSignature to verify the blob against
*/
function verifyBlobV2(
function verifyDACertV2(
BatchHeaderV2 calldata batchHeader,
BlobVerificationProofV2 calldata blobVerificationProof,
BlobInclusionInfo calldata blobInclusionInfo,
NonSignerStakesAndSignature calldata nonSignerStakesAndSignature
) external view;

/**
* @notice Verifies a blob for the base required quorums and the default security thresholds
* @param signedBatch The signed batch to verify the blob against
* @param blobVerificationProof The blob verification proof for the blob
* @param blobInclusionInfo The inclusion proof for the blob
*/
function verifyBlobV2FromSignedBatch(
function verifyDACertV2FromSignedBatch(
SignedBatch calldata signedBatch,
BlobVerificationProofV2 calldata blobVerificationProof
BlobInclusionInfo calldata blobInclusionInfo
) external view;

/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/interfaces/IEigenDAStructs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct DisperserInfo {
address disperserAddress;
}

struct BlobVerificationProofV2 {
struct BlobInclusionInfo {
BlobCertificate blobCertificate;
uint32 blobIndex;
bytes inclusionProof;
Expand All @@ -82,8 +82,8 @@ struct BlobHeaderV2 {
uint16 version;
bytes quorumNumbers;
BlobCommitment commitment;
uint32 salt;
bytes32 paymentHeaderHash;
uint32 salt;
}

struct BlobCommitment {
Expand Down
Loading

0 comments on commit 533f901

Please sign in to comment.