Documentation ¶
Index ¶
- Variables
- func HashBatchHashedMetadata(batchHeaderHash [32]byte, signatoryRecordHash [32]byte, blockNumber uint32) (geth_common.Hash, error)
- func HashBatchMetadata(bh *binding.IEigenDAServiceManagerBatchHeader, sigHash [32]byte, ...) (geth_common.Hash, error)
- func HashBlobHeader(blobHeader BlobHeader) (geth_common.Hash, error)
- func HashEncodeBlobHeader(header BlobHeader) (geth_common.Hash, error)
- func ProcessInclusionProof(proof []byte, leaf common.Hash, index uint64) (common.Hash, error)
- type BlobHeader
- type CertVerifier
- type Certificate
- type Config
- type G1Point
- type QuorumBlobParam
- type Verifier
- func (v *Verifier) Commit(blob []byte) (*bn254.G1Affine, error)
- func (v *Verifier) VerifyCert(cert *Certificate) error
- func (v *Verifier) VerifyCommitment(expectedCommit *common.G1Commitment, blob []byte) error
- func (v *Verifier) VerifySecurityParams(blobHeader BlobHeader, batchHeader binding.IEigenDAServiceManagerBatchHeader) error
Constants ¶
This section is empty.
Variables ¶
var ErrBatchMetadataHashNotFound = errors.New("BatchMetadataHash not found for BatchId")
var (
ErrInvalidDomainType = fmt.Errorf("invalid domain type")
)
Functions ¶
func HashBatchHashedMetadata ¶ added in v1.1.1
func HashBatchHashedMetadata(batchHeaderHash [32]byte, signatoryRecordHash [32]byte, blockNumber uint32) (geth_common.Hash, error)
HashBatchHashedMetadata hashes the given metadata into the commitment that will be stored in the contract replicates: https://github.com/Layr-Labs/eigenda-utils/blob/c4cbc9ec078aeca3e4a04bd278e2fb136bf3e6de/src/libraries/EigenDAHasher.sol#L19-L25
func HashBatchMetadata ¶ added in v1.1.1
func HashBatchMetadata(bh *binding.IEigenDAServiceManagerBatchHeader, sigHash [32]byte, blockNum uint32) (geth_common.Hash, error)
HashBatchMetadata regenerates a batch data hash replicates: https://github.com/Layr-Labs/eigenda-utils/blob/c4cbc9ec078aeca3e4a04bd278e2fb136bf3e6de/src/libraries/EigenDAHasher.sol#L46-L54
func HashBlobHeader ¶ added in v1.1.1
func HashBlobHeader(blobHeader BlobHeader) (geth_common.Hash, error)
HashBlobHeader function to hash BlobHeader
func HashEncodeBlobHeader ¶ added in v1.1.1
func HashEncodeBlobHeader(header BlobHeader) (geth_common.Hash, error)
Function to hash and encode header
Types ¶
type BlobHeader ¶ added in v1.2.0
type BlobHeader struct { Commitment G1Point DataLength uint32 QuorumBlobParams []QuorumBlobParam }
BlobHeader struct to represent BlobHeader in Solidity
type CertVerifier ¶ added in v1.1.1
type CertVerifier struct {
// contains filtered or unexported fields
}
CertVerifier verifies the DA certificate against on-chain EigenDA contracts to ensure disperser returned fields haven't been tampered with
func NewCertVerifier ¶ added in v1.1.1
func NewCertVerifier(cfg *Config, l log.Logger) (*CertVerifier, error)
func (*CertVerifier) VerifyBatch ¶ added in v1.1.1
func (cv *CertVerifier) VerifyBatch(header *binding.IEigenDAServiceManagerBatchHeader, id uint32, recordHash [32]byte, confirmationNumber uint32) error
func (*CertVerifier) VerifyMerkleProof ¶ added in v1.1.1
func (cv *CertVerifier) VerifyMerkleProof(inclusionProof []byte, root []byte, blobIndex uint32, blobHeader BlobHeader) error
VerifyMerkleProof ... Verifies the blob batch inclusion proof against the blob root hash
type Certificate ¶ added in v1.2.0
func (*Certificate) BatchHeaderRoot ¶ added in v1.2.0
func (c *Certificate) BatchHeaderRoot() []byte
func (*Certificate) BlobIndex ¶ added in v1.2.0
func (c *Certificate) BlobIndex() uint32
func (*Certificate) Proof ¶ added in v1.2.0
func (c *Certificate) Proof() *disperser.BlobVerificationProof
func (*Certificate) ReadBlobHeader ¶ added in v1.2.0
func (c *Certificate) ReadBlobHeader() BlobHeader
type QuorumBlobParam ¶ added in v1.2.0
type QuorumBlobParam struct { QuorumNumber uint8 AdversaryThresholdPercentage uint8 ConfirmationThresholdPercentage uint8 ChunkLength uint32 }
QuorumBlobParam struct to represent QuorumBlobParam in Solidity
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func (*Verifier) VerifyCert ¶ added in v1.1.1
func (v *Verifier) VerifyCert(cert *Certificate) error
func (*Verifier) VerifyCommitment ¶ added in v1.1.1
func (v *Verifier) VerifyCommitment(expectedCommit *common.G1Commitment, blob []byte) error
Verify regenerates a commitment from the blob and asserts equivalence to the commitment in the certificate TODO: Optimize implementation by opening a point on the commitment instead
func (*Verifier) VerifySecurityParams ¶ added in v1.1.1
func (v *Verifier) VerifySecurityParams(blobHeader BlobHeader, batchHeader binding.IEigenDAServiceManagerBatchHeader) error
VerifySecurityParams ensures that returned security parameters are valid