diff --git a/cmd/run_xlayer.go b/cmd/run_xlayer.go index 0df21fe55c..fda0f00ceb 100644 --- a/cmd/run_xlayer.go +++ b/cmd/run_xlayer.go @@ -9,6 +9,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/config/apollo" "github.com/0xPolygonHermez/zkevm-node/dataavailability" "github.com/0xPolygonHermez/zkevm-node/dataavailability/datacommittee" + "github.com/0xPolygonHermez/zkevm-node/dataavailability/eigenda" "github.com/0xPolygonHermez/zkevm-node/etherman" "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" "github.com/0xPolygonHermez/zkevm-node/event" @@ -123,6 +124,19 @@ func newDataAvailability(c config.Config, st *state.State, etherman *etherman.Cl if err != nil { return nil, err } + case string(dataavailability.DataAvailabilityEigenDA): + var ( + pk *ecdsa.PrivateKey + err error + ) + if isSequenceSender { + _, pk, err = etherman.LoadAuthFromKeyStoreXLayer(c.SequenceSender.DAPermitApiPrivateKey.Path, c.SequenceSender.DAPermitApiPrivateKey.Password) + if err != nil { + return nil, err + } + log.Infof("from pk %s", crypto.PubkeyToAddress(pk.PublicKey)) + } + daBackend = eigenda.NewDataAvailabilityProvider(c.DataAvailability) default: return nil, fmt.Errorf("unexpected / unsupported DA protocol: %s", daProtocolName) } diff --git a/config/config.go b/config/config.go index 4e7fb07b20..122e8869ca 100644 --- a/config/config.go +++ b/config/config.go @@ -7,6 +7,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/aggregator" "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygonHermez/zkevm-node/dataavailability" "github.com/0xPolygonHermez/zkevm-node/db" "github.com/0xPolygonHermez/zkevm-node/etherman" "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" @@ -102,6 +103,8 @@ type Config struct { SequenceSender sequencesender.Config // Configuration of the aggregator service Aggregator aggregator.Config + // Configuration of the data availability service + DataAvailability dataavailability.Config // Configuration of the genesis of the network. This is used to known the initial state of the network NetworkConfig NetworkConfig // Configuration of the gas price suggester service diff --git a/config/default.go b/config/default.go index 9a06ad3fef..069875eabe 100644 --- a/config/default.go +++ b/config/default.go @@ -236,6 +236,14 @@ AggLayerTxTimeout = "5m" AggLayerURL = "" SequencerPrivateKey = {} +[DataAvailability] +Hostname = "disperser-holesky.eigenda.xyz" +Port = 443 +Timeout = "30s" +UseSecureGrpcFlag = true +RetrieveBlobStatusPeriod = "5s" +BlobStatusConfirmedTimeout = "15m" + [L2GasPriceSuggester] Type = "follower" UpdatePeriod = "10s" diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index 237ab37129..7b92755067 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -137,6 +137,14 @@ GeneratingProofCleanupThreshold = "10m" UpgradeEtrogBatchNumber = 0 BatchProofL1BlockConfirmations = 2 +[DataAvailability] +Hostname = "disperser-holesky.eigenda.xyz" +Port = 443 +Timeout = "30s" +UseSecureGrpcFlag = true +RetrieveBlobStatusPeriod = "5s" +BlobStatusConfirmedTimeout = "15m" + [EthTxManager] ForcedGas = 0 PrivateKeys = [ diff --git a/config/environments/mainnet/node.config.toml b/config/environments/mainnet/node.config.toml index 64bcdf9d96..ef0bf1dfd4 100644 --- a/config/environments/mainnet/node.config.toml +++ b/config/environments/mainnet/node.config.toml @@ -54,6 +54,14 @@ SyncInterval = "2s" SyncChunkSize = 100 TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc +[DataAvailability] +Hostname = "disperser-holesky.eigenda.xyz" +Port = 443 +Timeout = "30s" +UseSecureGrpcFlag = true +RetrieveBlobStatusPeriod = "5s" +BlobStatusConfirmedTimeout = "15m" + [MTClient] URI = "zkevm-prover:50061" diff --git a/dataavailability/config.go b/dataavailability/config.go index 8163e7bcf4..7f82eaff91 100644 --- a/dataavailability/config.go +++ b/dataavailability/config.go @@ -1,9 +1,23 @@ package dataavailability +import "github.com/0xPolygonHermez/zkevm-node/config/types" + // DABackendType is the data availability protocol for the CDK type DABackendType string const ( // DataAvailabilityCommittee is the DAC protocol backend DataAvailabilityCommittee DABackendType = "DataAvailabilityCommittee" + // DataAvailabilityEigenDA is the EigenDA protocol backend + DataAvailabilityEigenDA DABackendType = "EigenDA" ) + +// Config is the EigenDA network config +type Config struct { + Hostname string `mapstructure:"Hostname"` + Port string `mapstructure:"Port"` + Timeout types.Duration `mapstructure:"Timeout"` + UseSecureGrpcFlag bool `mapstructure:"UseSecureGrpcFlag"` + RetrieveBlobStatusPeriod types.Duration `mapstructure:"RetrieveBlobStatusPeriod"` + BlobStatusConfirmedTimeout types.Duration `mapstructure:"BlobStatusConfirmedTimeout"` +} diff --git a/dataavailability/datacommittee/datacommittee_test.go b/dataavailability/datacommittee/datacommittee_test.go index e2cbb78cb1..78a1f5f44a 100644 --- a/dataavailability/datacommittee/datacommittee_test.go +++ b/dataavailability/datacommittee/datacommittee_test.go @@ -99,7 +99,7 @@ func newSimulatedDacman(t *testing.T, auth *bind.TransactOpts) ( // 10000000 ETH in wei balance, _ := new(big.Int).SetString("10000000000000000000000000", 10) //nolint:gomnd address := auth.From - genesisAlloc := map[common.Address]core.GenesisAccount{ + genesisAlloc := map[common.Address]core.GenesisAccount{ //nolint:staticcheck address: { Balance: balance, }, diff --git a/dataavailability/eigenda/abi.go b/dataavailability/eigenda/abi.go new file mode 100644 index 0000000000..b12a0f2ff9 --- /dev/null +++ b/dataavailability/eigenda/abi.go @@ -0,0 +1,171 @@ +package eigenda + +const blobDataABI = `[ + { + "type": "function", + "name": "BlobData", + "inputs": [ + { + "name": "blobData", + "type": "tuple", + "internalType": "struct EigenDAVerifier.BlobData", + "components": [ + { + "name": "blobHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BlobHeader", + "components": [ + { + "name": "commitment", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "dataLength", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "quorumBlobParams", + "type": "tuple[]", + "internalType": "struct IEigenDAServiceManager.QuorumBlobParam[]", + "components": [ + { + "name": "quorumNumber", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "adversaryThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "confirmationThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "chunkLength", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ] + }, + { + "name": "blobVerificationProof", + "type": "tuple", + "internalType": "struct EigenDARollupUtils.BlobVerificationProof", + "components": [ + { + "name": "batchId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "blobIndex", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "batchMetadata", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchMetadata", + "components": [ + { + "name": "batchHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchHeader", + "components": [ + { + "name": "blobHeadersRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "quorumNumbers", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signedStakeForQuorums", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "referenceBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "signatoryRecordHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "confirmationBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "inclusionProof", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "quorumIndices", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "stateMutability": "pure" + } +]` + +const batchHeaderABI = `[ + { + "type": "function", + "name": "ReducedBatchHeader", + "inputs": [ + { + "name": "batchHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchHeader", + "components": [ + { + "name": "blobHeadersRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "referenceBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ] + } +]` diff --git a/dataavailability/eigenda/blob.go b/dataavailability/eigenda/blob.go new file mode 100644 index 0000000000..01f2b0d050 --- /dev/null +++ b/dataavailability/eigenda/blob.go @@ -0,0 +1,365 @@ +package eigenda + +import ( + "bytes" + "errors" + "fmt" + "math/big" + "reflect" + + disperser_rpc "github.com/Layr-Labs/eigenda/api/grpc/disperser" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +var ( + // HashByteLength is the hash byte length + HashByteLength = 32 + // ErrConvertFromABIInterface is used when there is a decoding error + ErrConvertFromABIInterface = errors.New("conversion from abi interface error") +) + +// BlobData is the EigenDA blob data +type BlobData struct { + BlobHeader BlobHeader `abi:"blobHeader"` + BlobVerificationProof BlobVerificationProof `abi:"blobVerificationProof"` +} + +// BlobHeader is the EigenDA blob header +type BlobHeader struct { + Commitment Commitment `abi:"commitment"` + DataLength uint32 `abi:"dataLength"` + QuorumBlobParams []QuorumBlobParam `abi:"quorumBlobParams"` +} + +// BlobVerificationProof is the EigenDA blob verification proof +type BlobVerificationProof struct { + BatchId uint32 `abi:"batchId"` + BlobIndex uint32 `abi:"blobIndex"` + BatchMetadata BatchMetadata `abi:"batchMetadata"` + InclusionProof []byte `abi:"inclusionProof"` + QuorumIndices []byte `abi:"quorumIndices"` +} + +// Commitment is the EigenDA commitment proof +type Commitment struct { + X *big.Int `abi:"X"` + Y *big.Int `abi:"Y"` +} + +// QuorumBlobParam is the EigenDA quorum blob parameters +type QuorumBlobParam struct { + QuorumNumber uint8 `abi:"quorumNumber"` + AdversaryThresholdPercentage uint8 `abi:"adversaryThresholdPercentage"` + ConfirmationThresholdPercentage uint8 `abi:"confirmationThresholdPercentage"` + ChunkLength uint32 `abi:"chunkLength"` +} + +// BatchMetadata is the EigenDA batch meta data +type BatchMetadata struct { + // The header of the data store + BatchHeader BatchHeader `abi:"batchHeader"` + // The hash of the signatory record + SignatoryRecordHash common.Hash `abi:"signatoryRecordHash"` + // The block number at which the batch was confirmed + ConfirmationBlockNumber uint32 `abi:"confirmationBlockNumber"` +} + +// BatchHeader is the EigenDA batch header +type BatchHeader struct { + BlobHeadersRoot common.Hash `abi:"blobHeadersRoot"` + // Each byte is a different quorum number + QuorumNumbers []byte `abi:"quorumNumbers"` + // Every bytes is an amount less than 100 specifying the percentage of stake + // that has signed in the corresponding quorum in `quorumNumbers` + SignedStakeForQuorums []byte `abi:"signedStakeForQuorums"` + ReferenceBlockNumber uint32 `abi:"referenceBlockNumber"` +} + +// ReducedBatchHeader is the EigenDA reduced batch header +type ReducedBatchHeader struct { + BlobHeadersRoot common.Hash `abi:"blobHeadersRoot"` + ReferenceBlockNumber uint32 `abi:"referenceBlockNumber"` +} + +// GetBlobData gets the blob data from the EigenDA gRPC struct +func GetBlobData(info *disperser_rpc.BlobInfo) (BlobData, error) { + header := GetBlobHeader(info.GetBlobHeader()) + proof, err := GetBlobVerificationProof(info.GetBlobVerificationProof()) + if err != nil { + return BlobData{}, err + } + return BlobData{ + BlobHeader: header, + BlobVerificationProof: proof, + }, nil +} + +// GetBlobHeader gets the blob header from the EigenDA gRPC struct +func GetBlobHeader(header *disperser_rpc.BlobHeader) BlobHeader { + quorums := []QuorumBlobParam{} + for _, quorum := range header.GetBlobQuorumParams() { + q := QuorumBlobParam{ + QuorumNumber: uint8(quorum.GetQuorumNumber()), + AdversaryThresholdPercentage: uint8(quorum.GetAdversaryThresholdPercentage()), + ConfirmationThresholdPercentage: uint8(quorum.GetConfirmationThresholdPercentage()), + ChunkLength: quorum.GetChunkLength(), + } + quorums = append(quorums, q) + } + + return BlobHeader{ + Commitment: Commitment{ + X: new(big.Int).SetBytes(header.GetCommitment().GetX()), + Y: new(big.Int).SetBytes(header.GetCommitment().GetY()), + }, + DataLength: header.GetDataLength(), + QuorumBlobParams: quorums, + } +} + +// GetBlobVerificationProof gets the blob verification proof from the EigenDA gRPC struct +func GetBlobVerificationProof(proof *disperser_rpc.BlobVerificationProof) (BlobVerificationProof, error) { + if len(proof.BatchMetadata.BatchHeader.BatchRoot) != HashByteLength { + return BlobVerificationProof{}, fmt.Errorf("BlobHeadersRoot not type bytes32") + } + + if len(proof.BatchMetadata.SignatoryRecordHash) != HashByteLength { + return BlobVerificationProof{}, fmt.Errorf("SignatoryRecordHash not type bytes32") + } + + return BlobVerificationProof{ + BatchId: proof.BatchId, + BlobIndex: proof.BlobIndex, + BatchMetadata: BatchMetadata{ + BatchHeader: BatchHeader{ + BlobHeadersRoot: common.BytesToHash(proof.BatchMetadata.BatchHeader.BatchRoot), + QuorumNumbers: proof.BatchMetadata.BatchHeader.QuorumNumbers, + SignedStakeForQuorums: proof.BatchMetadata.BatchHeader.QuorumSignedPercentages, + ReferenceBlockNumber: proof.BatchMetadata.BatchHeader.ReferenceBlockNumber, + }, + SignatoryRecordHash: common.BytesToHash(proof.BatchMetadata.SignatoryRecordHash), + ConfirmationBlockNumber: proof.BatchMetadata.ConfirmationBlockNumber, + }, + InclusionProof: proof.InclusionProof, + QuorumIndices: proof.QuorumIndexes, + }, nil +} + +// GetBatchHeaderHash calculates the BatchHeaderHash. +// Ref: https://github.com/Layr-Labs/eigenda/blob/5aecf5c2b679e69d363824513ba227388edcad82/contracts/src/libraries/EigenDAHasher.sol#L50 +func (data BatchMetadata) GetBatchHeaderHash() ([]byte, error) { + parsedABI, err := abi.JSON(bytes.NewReader([]byte(batchHeaderABI))) + if err != nil { + return nil, err + } + + // Encode the data + method, exist := parsedABI.Methods["ReducedBatchHeader"] + if !exist { + return nil, fmt.Errorf("abi error, BatchHeader method not found") + } + + ReducedBatchHeader := ReducedBatchHeader{ + BlobHeadersRoot: data.BatchHeader.BlobHeadersRoot, + ReferenceBlockNumber: data.BatchHeader.ReferenceBlockNumber, + } + encoded, err := method.Inputs.Pack(ReducedBatchHeader) + if err != nil { + return nil, err + } + + return crypto.Keccak256(encoded), nil +} + +// TryEncodeToDataAvailabilityMessage is a fallible encoding method to encode +// EigenDA blob data into data availability message represented as byte array. +func TryEncodeToDataAvailabilityMessage(blobData BlobData) ([]byte, error) { + parsedABI, err := abi.JSON(bytes.NewReader([]byte(blobDataABI))) + if err != nil { + return nil, err + } + + // Encode the data + method, exist := parsedABI.Methods["BlobData"] + if !exist { + return nil, fmt.Errorf("abi error, BlobData method not found") + } + + encoded, err := method.Inputs.Pack(blobData) + if err != nil { + return nil, err + } + + return encoded, nil +} + +// TryDecodeFromDataAvailabilityMessage is a fallible decoding method to +// decode data availability message into EigenDA blob data. +func TryDecodeFromDataAvailabilityMessage(msg []byte) (BlobData, error) { + // Parse the ABI + parsedABI, err := abi.JSON(bytes.NewReader([]byte(blobDataABI))) + if err != nil { + return BlobData{}, err + } + + // Decode the data + method, exist := parsedABI.Methods["BlobData"] + if !exist { + return BlobData{}, fmt.Errorf("abi error, BlobData method not found") + } + + unpackedMap := make(map[string]interface{}) + err = method.Inputs.UnpackIntoMap(unpackedMap, msg) + if err != nil { + return BlobData{}, err + } + unpacked, ok := unpackedMap["blobData"] + if !ok { + return BlobData{}, fmt.Errorf("abi error, failed to unpack to BlobData") + } + + val := reflect.ValueOf(unpacked) + typ := reflect.TypeOf(unpacked) + + blobData := BlobData{} + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + value := val.Field(i) + + switch field.Name { + case "BlobHeader": + blobData.BlobHeader, err = convertBlobHeader(value) + if err != nil { + return BlobData{}, ErrConvertFromABIInterface + } + case "BlobVerificationProof": + blobData.BlobVerificationProof, err = convertBlobVerificationProof(value) + if err != nil { + return BlobData{}, ErrConvertFromABIInterface + } + default: + return BlobData{}, ErrConvertFromABIInterface + } + } + + return blobData, nil +} + +// -------- Helper fallible conversion methods -------- +func convertBlobHeader(val reflect.Value) (BlobHeader, error) { + blobHeader := BlobHeader{} + + for i := 0; i < val.NumField(); i++ { + field := val.Type().Field(i) + value := val.Field(i) + + switch field.Name { + case "Commitment": + blobHeader.Commitment = Commitment{ + X: value.FieldByName("X").Interface().(*big.Int), + Y: value.FieldByName("Y").Interface().(*big.Int), + } + case "DataLength": + blobHeader.DataLength = uint32(value.Uint()) + case "QuorumBlobParams": + params := make([]QuorumBlobParam, value.Len()) + for j := 0; j < value.Len(); j++ { + param := value.Index(j) + params[j] = QuorumBlobParam{ + QuorumNumber: uint8(param.FieldByName("QuorumNumber").Uint()), + AdversaryThresholdPercentage: uint8(param.FieldByName("AdversaryThresholdPercentage").Uint()), + ConfirmationThresholdPercentage: uint8(param.FieldByName("ConfirmationThresholdPercentage").Uint()), + ChunkLength: uint32(param.FieldByName("ChunkLength").Uint()), + } + } + blobHeader.QuorumBlobParams = params + default: + return BlobHeader{}, ErrConvertFromABIInterface + } + } + + return blobHeader, nil +} + +func convertBlobVerificationProof(val reflect.Value) (BlobVerificationProof, error) { + proof := BlobVerificationProof{} + var err error + + for i := 0; i < val.NumField(); i++ { + field := val.Type().Field(i) + value := val.Field(i) + + switch field.Name { + case "BatchId": + proof.BatchId = uint32(value.Uint()) + case "BlobIndex": + proof.BlobIndex = uint32(value.Uint()) + case "BatchMetadata": + proof.BatchMetadata, err = convertBatchMetadata(value) + if err != nil { + return BlobVerificationProof{}, ErrConvertFromABIInterface + } + case "InclusionProof": + proof.InclusionProof = value.Interface().([]byte) + case "QuorumIndices": + proof.QuorumIndices = value.Interface().([]byte) + default: + return BlobVerificationProof{}, ErrConvertFromABIInterface + } + } + + return proof, nil +} + +func convertBatchMetadata(val reflect.Value) (BatchMetadata, error) { + metadata := BatchMetadata{} + var err error + + for i := 0; i < val.NumField(); i++ { + field := val.Type().Field(i) + value := val.Field(i) + + switch field.Name { + case "BatchHeader": + metadata.BatchHeader, err = convertBatchHeader(value) + if err != nil { + return BatchMetadata{}, ErrConvertFromABIInterface + } + case "SignatoryRecordHash": + metadata.SignatoryRecordHash = value.Interface().([32]byte) + case "ConfirmationBlockNumber": + metadata.ConfirmationBlockNumber = uint32(value.Uint()) + default: + return BatchMetadata{}, ErrConvertFromABIInterface + } + } + + return metadata, nil +} + +func convertBatchHeader(val reflect.Value) (BatchHeader, error) { + header := BatchHeader{} + + for i := 0; i < val.NumField(); i++ { + field := val.Type().Field(i) + value := val.Field(i) + + switch field.Name { + case "BlobHeadersRoot": + header.BlobHeadersRoot = value.Interface().([32]byte) + case "QuorumNumbers": + header.QuorumNumbers = value.Interface().([]uint8) + case "SignedStakeForQuorums": + header.SignedStakeForQuorums = value.Interface().([]uint8) + case "ReferenceBlockNumber": + header.ReferenceBlockNumber = uint32(value.Uint()) + default: + return BatchHeader{}, ErrConvertFromABIInterface + } + } + + return header, nil +} diff --git a/dataavailability/eigenda/blob_test.go b/dataavailability/eigenda/blob_test.go new file mode 100644 index 0000000000..c63de8a538 --- /dev/null +++ b/dataavailability/eigenda/blob_test.go @@ -0,0 +1,154 @@ +package eigenda + +import ( + "math/big" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEncodeBlobData(t *testing.T) { + data := BlobData{ + BlobHeader: BlobHeader{ + Commitment: Commitment{ + X: big.NewInt(12345), + Y: big.NewInt(67890), + }, + DataLength: 100, + QuorumBlobParams: []QuorumBlobParam{ + { + QuorumNumber: 1, + AdversaryThresholdPercentage: 50, + ConfirmationThresholdPercentage: 75, + ChunkLength: 1024, + }, + }, + }, + BlobVerificationProof: BlobVerificationProof{ + BatchId: 1, + BlobIndex: 2, + BatchMetadata: BatchMetadata{ + BatchHeader: BatchHeader{ + BlobHeadersRoot: [32]byte{}, + QuorumNumbers: []byte{1, 2, 3}, + SignedStakeForQuorums: []byte{50, 60, 70}, + ReferenceBlockNumber: 12345, + }, + SignatoryRecordHash: [32]byte{}, + ConfirmationBlockNumber: 54321, + }, + InclusionProof: []byte{0x01, 0x02, 0x03}, + QuorumIndices: []byte{0x04, 0x05, 0x06}, + }, + } + msg, err := TryEncodeToDataAvailabilityMessage(data) + assert.NoError(t, err) + assert.NotNil(t, msg) + assert.NotEmpty(t, msg) +} + +func TestEncodeDecodeBlobData(t *testing.T) { + data := BlobData{ + BlobHeader: BlobHeader{ + Commitment: Commitment{ + X: big.NewInt(12345), + Y: big.NewInt(67890), + }, + DataLength: 100, + QuorumBlobParams: []QuorumBlobParam{ + { + QuorumNumber: 1, + AdversaryThresholdPercentage: 50, + ConfirmationThresholdPercentage: 75, + ChunkLength: 1024, + }, + }, + }, + BlobVerificationProof: BlobVerificationProof{ + BatchId: 1, + BlobIndex: 2, + BatchMetadata: BatchMetadata{ + BatchHeader: BatchHeader{ + BlobHeadersRoot: [32]byte{}, + QuorumNumbers: []byte{1, 2, 3}, + SignedStakeForQuorums: []byte{50, 60, 70}, + ReferenceBlockNumber: 12345, + }, + SignatoryRecordHash: [32]byte{}, + ConfirmationBlockNumber: 54321, + }, + InclusionProof: []byte{0x01, 0x02, 0x03}, + QuorumIndices: []byte{0x04, 0x05, 0x06}, + }, + } + msg, err := TryEncodeToDataAvailabilityMessage(data) + assert.NoError(t, err) + assert.NotNil(t, msg) + assert.NotEmpty(t, msg) + + // Check blob header + decoded_data, err := TryDecodeFromDataAvailabilityMessage(msg) + assert.NoError(t, err) + assert.Equal(t, *data.BlobHeader.Commitment.X, *decoded_data.BlobHeader.Commitment.X) + assert.Equal(t, *data.BlobHeader.Commitment.Y, *decoded_data.BlobHeader.Commitment.Y) + assert.Equal(t, data.BlobHeader.DataLength, decoded_data.BlobHeader.DataLength) + for idx, q := range data.BlobHeader.QuorumBlobParams { + assert.Equal(t, q.QuorumNumber, decoded_data.BlobHeader.QuorumBlobParams[idx].QuorumNumber) + assert.Equal(t, q.AdversaryThresholdPercentage, decoded_data.BlobHeader.QuorumBlobParams[idx].AdversaryThresholdPercentage) + assert.Equal(t, q.ConfirmationThresholdPercentage, decoded_data.BlobHeader.QuorumBlobParams[idx].ConfirmationThresholdPercentage) + assert.Equal(t, q.ChunkLength, decoded_data.BlobHeader.QuorumBlobParams[idx].ChunkLength) + } + + // Check blob verification proof + assert.Equal(t, data.BlobVerificationProof.BatchId, decoded_data.BlobVerificationProof.BatchId) + assert.Equal(t, data.BlobVerificationProof.BlobIndex, decoded_data.BlobVerificationProof.BlobIndex) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata, decoded_data.BlobVerificationProof.BatchMetadata) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot, decoded_data.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers, decoded_data.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums, decoded_data.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber, decoded_data.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.SignatoryRecordHash, decoded_data.BlobVerificationProof.BatchMetadata.SignatoryRecordHash) + assert.Equal(t, data.BlobVerificationProof.BatchMetadata.ConfirmationBlockNumber, decoded_data.BlobVerificationProof.BatchMetadata.ConfirmationBlockNumber) + assert.Equal(t, data.BlobVerificationProof.InclusionProof, decoded_data.BlobVerificationProof.InclusionProof) + assert.Equal(t, data.BlobVerificationProof.QuorumIndices, decoded_data.BlobVerificationProof.QuorumIndices) +} + +func TestGetBatchHeaderHash(t *testing.T) { + data := BlobData{ + BlobHeader: BlobHeader{ + Commitment: Commitment{ + X: big.NewInt(12345), + Y: big.NewInt(67890), + }, + DataLength: 100, + QuorumBlobParams: []QuorumBlobParam{ + { + QuorumNumber: 1, + AdversaryThresholdPercentage: 50, + ConfirmationThresholdPercentage: 75, + ChunkLength: 1024, + }, + }, + }, + BlobVerificationProof: BlobVerificationProof{ + BatchId: 1, + BlobIndex: 2, + BatchMetadata: BatchMetadata{ + BatchHeader: BatchHeader{ + BlobHeadersRoot: [32]byte{}, + QuorumNumbers: []byte{1, 2, 3}, + SignedStakeForQuorums: []byte{50, 60, 70}, + ReferenceBlockNumber: 12345, + }, + SignatoryRecordHash: [32]byte{}, + ConfirmationBlockNumber: 54321, + }, + InclusionProof: []byte{0x01, 0x02, 0x03}, + QuorumIndices: []byte{0x04, 0x05, 0x06}, + }, + } + hash, err := data.BlobVerificationProof.BatchMetadata.GetBatchHeaderHash() + assert.NoError(t, err) + assert.NotNil(t, hash) + assert.NotEmpty(t, hash) +} diff --git a/dataavailability/eigenda/disperser_client.go b/dataavailability/eigenda/disperser_client.go new file mode 100644 index 0000000000..9f0fe2b7d6 --- /dev/null +++ b/dataavailability/eigenda/disperser_client.go @@ -0,0 +1,230 @@ +package eigenda + +import ( + "context" + "crypto/tls" + "errors" + "fmt" + "time" + + "github.com/0xPolygonHermez/zkevm-node/dataavailability" + disperser_rpc "github.com/Layr-Labs/eigenda/api/grpc/disperser" + "github.com/Layr-Labs/eigenda/core" + "github.com/Layr-Labs/eigenda/disperser" + "github.com/Layr-Labs/eigenda/encoding" + "github.com/Layr-Labs/eigenda/encoding/rs" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" +) + +// DisperserClient is the EigenDA disperser client to send and get blob data with the disperser. +type DisperserClient struct { + cfg *dataavailability.Config + signer core.BlobRequestSigner +} + +// NewDisperserClient creates a new disperser client +func NewDisperserClient(cfg *dataavailability.Config, signer core.BlobRequestSigner) *DisperserClient { + return &DisperserClient{ + cfg: cfg, + signer: signer, + } +} + +func (c *DisperserClient) getDialOptions() []grpc.DialOption { + if c.cfg.UseSecureGrpcFlag { + cfg := &tls.Config{} //nolint:gosec + credential := credentials.NewTLS(cfg) + return []grpc.DialOption{grpc.WithTransportCredentials(credential)} + } else { + return []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} + } +} + +// DisperseBlob disperses a blob represented as byte array. +func (c *DisperserClient) DisperseBlob(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) { + addr := fmt.Sprintf("%v:%v", c.cfg.Hostname, c.cfg.Port) + + dialOptions := c.getDialOptions() + conn, err := grpc.Dial(addr, dialOptions...) + if err != nil { + return nil, nil, err + } + defer func() { _ = conn.Close() }() + + DisperserClient := disperser_rpc.NewDisperserClient(conn) + ctxTimeout, cancel := context.WithTimeout(ctx, c.cfg.Timeout.Duration) + defer cancel() + + quorumNumbers := make([]uint32, len(quorums)) + for i, q := range quorums { + quorumNumbers[i] = uint32(q) + } + + // check every 32 bytes of data are within the valid range for a bn254 field element + _, err = rs.ToFrArray(data) + if err != nil { + return nil, nil, fmt.Errorf("encountered an error to convert a 32-bytes into a valid field element, please use the correct format where every 32bytes(big-endian) is less than 21888242871839275222246405745257275088548364400416034343698204186575808495617 %w", err) + } + request := &disperser_rpc.DisperseBlobRequest{ + Data: data, + CustomQuorumNumbers: quorumNumbers, + } + + reply, err := DisperserClient.DisperseBlob(ctxTimeout, request) + if err != nil { + return nil, nil, err + } + + blobStatus, err := disperser.FromBlobStatusProto(reply.GetResult()) + if err != nil { + return nil, nil, err + } + + return blobStatus, reply.GetRequestId(), nil +} + +// DisperseBlobAuthenticated disperses a blob represented as byte array. +func (c *DisperserClient) DisperseBlobAuthenticated(ctx context.Context, data []byte, quorums []uint8) (*disperser.BlobStatus, []byte, error) { + addr := fmt.Sprintf("%v:%v", c.cfg.Hostname, c.cfg.Port) + + dialOptions := c.getDialOptions() + conn, err := grpc.Dial(addr, dialOptions...) + if err != nil { + return nil, nil, err + } + defer func() { _ = conn.Close() }() + + DisperserClient := disperser_rpc.NewDisperserClient(conn) + ctxTimeout, cancel := context.WithTimeout(ctx, c.cfg.Timeout.Duration) + + defer cancel() + + stream, err := DisperserClient.DisperseBlobAuthenticated(ctxTimeout) + if err != nil { + return nil, nil, fmt.Errorf("error while calling DisperseBlobAuthenticated: %w", err) + } + + quorumNumbers := make([]uint32, len(quorums)) + for i, q := range quorums { + quorumNumbers[i] = uint32(q) + } + + // check every 32 bytes of data are within the valid range for a bn254 field element + _, err = rs.ToFrArray(data) + if err != nil { + return nil, nil, fmt.Errorf("encountered an error to convert a 32-bytes into a valid field element, please use the correct format where every 32bytes(big-endian) is less than 21888242871839275222246405745257275088548364400416034343698204186575808495617, %w", err) + } + request := &disperser_rpc.DisperseBlobRequest{ + Data: data, + CustomQuorumNumbers: quorumNumbers, + AccountId: c.signer.GetAccountID(), + } + + // Send the initial request + err = stream.Send(&disperser_rpc.AuthenticatedRequest{Payload: &disperser_rpc.AuthenticatedRequest_DisperseRequest{ + DisperseRequest: request, + }}) + + if err != nil { + return nil, nil, fmt.Errorf("failed to send request: %w", err) + } + + // Get the Challenge + reply, err := stream.Recv() + if err != nil { + return nil, nil, fmt.Errorf("error while receiving: %w", err) + } + authHeaderReply, ok := reply.Payload.(*disperser_rpc.AuthenticatedReply_BlobAuthHeader) + if !ok { + return nil, nil, errors.New("expected challenge") + } + + authHeader := core.BlobAuthHeader{ + BlobCommitments: encoding.BlobCommitments{}, + AccountID: "", + Nonce: authHeaderReply.BlobAuthHeader.ChallengeParameter, + } + + authData, err := c.signer.SignBlobRequest(authHeader) + if err != nil { + return nil, nil, errors.New("error signing blob request") + } + + // Process challenge and send back challenge_reply + err = stream.Send(&disperser_rpc.AuthenticatedRequest{Payload: &disperser_rpc.AuthenticatedRequest_AuthenticationData{ + AuthenticationData: &disperser_rpc.AuthenticationData{ + AuthenticationData: authData, + }, + }}) + if err != nil { + return nil, nil, fmt.Errorf("failed to send challenge reply: %w", err) + } + + reply, err = stream.Recv() + if err != nil { + return nil, nil, fmt.Errorf("error while receiving final reply: %w", err) + } + disperseReply, ok := reply.Payload.(*disperser_rpc.AuthenticatedReply_DisperseReply) // Process the final disperse_reply + if !ok { + return nil, nil, errors.New("expected DisperseReply") + } + + blobStatus, err := disperser.FromBlobStatusProto(disperseReply.DisperseReply.GetResult()) + if err != nil { + return nil, nil, err + } + + return blobStatus, disperseReply.DisperseReply.GetRequestId(), nil +} + +// GetBlobStatus gets the blob status from the disperser on EigenDA layer. +func (c *DisperserClient) GetBlobStatus(ctx context.Context, requestID []byte) (*disperser_rpc.BlobStatusReply, error) { + addr := fmt.Sprintf("%v:%v", c.cfg.Hostname, c.cfg.Port) + dialOptions := c.getDialOptions() + conn, err := grpc.Dial(addr, dialOptions...) + if err != nil { + return nil, err + } + + DisperserClient := disperser_rpc.NewDisperserClient(conn) + ctxTimeout, cancel := context.WithTimeout(ctx, time.Second*60) //nolint:gomnd + defer cancel() + + request := &disperser_rpc.BlobStatusRequest{ + RequestId: requestID, + } + + reply, err := DisperserClient.GetBlobStatus(ctxTimeout, request) + if err != nil { + return nil, err + } + + return reply, nil +} + +// RetrieveBlob retrieves the blob from the disperser on EigenDA layer. +func (c *DisperserClient) RetrieveBlob(ctx context.Context, batchHeaderHash []byte, blobIndex uint32) (*disperser_rpc.RetrieveBlobReply, error) { + addr := fmt.Sprintf("%v:%v", c.cfg.Hostname, c.cfg.Port) + dialOptions := c.getDialOptions() + conn, err := grpc.Dial(addr, dialOptions...) + if err != nil { + return nil, err + } + + DisperserClient := disperser_rpc.NewDisperserClient(conn) + ctxTimeout, cancel := context.WithTimeout(ctx, time.Second*60) //nolint:gomnd + defer cancel() + + request := &disperser_rpc.RetrieveBlobRequest{ + BatchHeaderHash: batchHeaderHash, + BlobIndex: blobIndex, + } + reply, err := DisperserClient.RetrieveBlob(ctxTimeout, request) + if err != nil { + return nil, err + } + + return reply, nil +} diff --git a/dataavailability/eigenda/disperser_client_test.go b/dataavailability/eigenda/disperser_client_test.go new file mode 100644 index 0000000000..582bddc91f --- /dev/null +++ b/dataavailability/eigenda/disperser_client_test.go @@ -0,0 +1,71 @@ +package eigenda + +import ( + "context" + "encoding/base64" + "fmt" + "math/rand" + "testing" + "time" + + "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygonHermez/zkevm-node/dataavailability" + "github.com/Layr-Labs/eigenda/disperser" + "github.com/Layr-Labs/eigenda/encoding/utils/codec" + "github.com/stretchr/testify/assert" +) + +func TestDisperserClientDisperseBlobWithStringData(t *testing.T) { + cfg := dataavailability.Config{ + Hostname: "disperser-holesky.eigenda.xyz", + Port: "443", + Timeout: types.NewDuration(30 * time.Second), + UseSecureGrpcFlag: true, + } + signer := MockBlobRequestSigner{} + client := NewDisperserClient(&cfg, signer) + + // Generate mock string batch data + data := []byte("hihihihihihihihihihihihihihihihihihi") + data = codec.ConvertByPaddingEmptyByte(data) + + // Send blob + blobStatus, idBytes, err := client.DisperseBlob(context.Background(), data, []uint8{}) + assert.NoError(t, err) + assert.NotNil(t, blobStatus) + assert.Equal(t, *blobStatus, disperser.Processing) + assert.True(t, len(idBytes) > 0) + id := base64.StdEncoding.EncodeToString(idBytes) + fmt.Println("id: ", id) +} + +func TestDisperserClientDisperseBlobWithRandomData(t *testing.T) { + cfg := dataavailability.Config{ + Hostname: "disperser-holesky.eigenda.xyz", + Port: "443", + Timeout: types.NewDuration(30 * time.Second), + UseSecureGrpcFlag: true, + } + signer := MockBlobRequestSigner{} + client := NewDisperserClient(&cfg, signer) + + // Define Different DataSizes + dataSize := []int{100000, 200000, 1000, 80, 30000} + + // Disperse Blob with different DataSizes + rand.Seed(time.Now().UnixNano()) //nolint:gosec,staticcheck + data := make([]byte, dataSize[rand.Intn(len(dataSize))]) //nolint:gosec,staticcheck + _, err := rand.Read(data) //nolint:gosec,staticcheck + assert.NoError(t, err) + + data = codec.ConvertByPaddingEmptyByte(data) + + // Send blob + blobStatus, idBytes, err := client.DisperseBlob(context.Background(), data, []uint8{}) + assert.NoError(t, err) + assert.NotNil(t, blobStatus) + assert.Equal(t, *blobStatus, disperser.Processing) + assert.True(t, len(idBytes) > 0) + id := base64.StdEncoding.EncodeToString(idBytes) + fmt.Println("id: ", id) +} diff --git a/dataavailability/eigenda/encoding.go b/dataavailability/eigenda/encoding.go new file mode 100644 index 0000000000..d0ce1bb0e3 --- /dev/null +++ b/dataavailability/eigenda/encoding.go @@ -0,0 +1,83 @@ +package eigenda + +import ( + "encoding/binary" + + "github.com/Layr-Labs/eigenda/encoding/utils/codec" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +// EncodeSequence is the helper function to encode sequence data and their metadata into 1D byte array. +// The encoding scheme is ensured to be lossless. +// +// When encoding the blob data, the first 8-bytes stores the size of the batches (n) in the sequence. The +// next n slots of sized 40 bytes stores the metadata of the batches data. +// The first 8-bytes of the batches metadata stores the batches data length, and the next 32-bytes stores +// the batches hash. +// +// The remaining n slots contains the batches data, each slot length is specified in the retrieved batch +// metadata. +// Zero-padding empty 31-byte array using a kzgpad encoding scheme (Pad One Byte codec). +func EncodeSequence(batchesData [][]byte) []byte { + sequence := []byte{} + metadata := []byte{} + n := uint64(len(batchesData)) + bn := make([]byte, 8) //nolint:gomnd + binary.BigEndian.PutUint64(bn, n) + metadata = append(metadata, bn...) + + for _, seq := range batchesData { + // Add batch data to byte array + sequence = append(sequence, seq...) + + // Add batch metadata to byte array + // Batch metadata contains the byte array length and the Keccak256 hash of the + // batch data + n := uint64(len(seq)) + bn := make([]byte, 8) //nolint:gomnd + binary.BigEndian.PutUint64(bn, n) + hash := crypto.Keccak256Hash(seq) + metadata = append(metadata, bn...) + metadata = append(metadata, hash.Bytes()...) + } + sequence = append(metadata, sequence...) + + // Blob serialization + sequence = codec.ConvertByPaddingEmptyByte(sequence) + + return sequence +} + +// DecodeSequence is the helper function to decode the 1D byte array into sequence data and the batches +// metadata. The decoding sceheme is ensured to be lossless and follows the encoding scheme specified in +// the EncodeSequence function. +func DecodeSequence(blobData []byte) ([][]byte, []common.Hash) { + // Blob deserialization + blobData = codec.RemoveEmptyByteFromPaddedBytes(blobData) + + bn := blobData[:8] + n := binary.BigEndian.Uint64(bn) + // Each batch metadata contains the batch data byte array length (8 byte) and the + // batch data hash (32 byte) + metadata := blobData[8 : 40*n+8] + sequence := blobData[40*n+8:] + + batchesData := [][]byte{} + batchesHash := []common.Hash{} + idx := uint64(0) + for i := uint64(0); i < n; i++ { + // Get batch metadata + bn := metadata[40*i : 40*i+8] + n := binary.BigEndian.Uint64(bn) + + hash := common.BytesToHash(metadata[40*i+8 : 40*(i+1)]) + batchesHash = append(batchesHash, hash) + + // Get batch data + batchesData = append(batchesData, sequence[idx:idx+n]) + idx += n + } + + return batchesData, batchesHash +} diff --git a/dataavailability/eigenda/encoding_test.go b/dataavailability/eigenda/encoding_test.go new file mode 100644 index 0000000000..c693591504 --- /dev/null +++ b/dataavailability/eigenda/encoding_test.go @@ -0,0 +1,85 @@ +package eigenda + +import ( + "math/rand" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" +) + +func TestEncodeDecodeSequenceToAndFromStringBlob(t *testing.T) { + mock_string_data := "hihihihihihihihihihihihihihihihihihi" + data := []byte(mock_string_data) + hash := crypto.Keccak256Hash(data) + + // Generate mock sequence data + mockSeqData := [][]byte{} + for i := 0; i < 10; i++ { + mockSeqData = append(mockSeqData, data) + } + blob := EncodeSequence(mockSeqData) + + // Decode blob + decodedBatchesData, decodedBatchesHash := DecodeSequence(blob) + + // Assert decoded sequence length is correct + n_data := len(decodedBatchesData) + n_hash := len(decodedBatchesHash) + assert.Equal(t, 10, n_data) + assert.Equal(t, 10, n_hash) + + // Assert decoded sequence data is correct + for _, batchData := range decodedBatchesData { + data_decoded := string(batchData) + assert.Equal(t, mock_string_data, data_decoded) + } + + // Assert decoded batches' hash is correct + for _, batchHash := range decodedBatchesHash { + assert.Equal(t, hash, batchHash) + } +} + +func TestEncodeDecodeSequenceToAndFromRandomBlob(t *testing.T) { + // Define Different DataSizes + dataSize := []int{100000, 200000, 1000, 80, 30000} + + // Generate mock sequence data + mockSeqData := [][]byte{} + mockSeqHash := []common.Hash{} + for i := 0; i < 10; i++ { + // Disperse Blob with different DataSizes + rand.Seed(time.Now().UnixNano()) //nolint:gosec,staticcheck + data := make([]byte, dataSize[rand.Intn(len(dataSize))]) //nolint:gosec,staticcheck + _, err := rand.Read(data) //nolint:gosec,staticcheck + assert.NoError(t, err) + mockSeqData = append(mockSeqData, data) + + // Get batch hash + hash := crypto.Keccak256Hash(data) + mockSeqHash = append(mockSeqHash, hash) + } + blob := EncodeSequence(mockSeqData) + + // Decode blob + decodedBatchesData, decodedBatchesHash := DecodeSequence(blob) + + // Assert decoded sequence length is correct + n_data := len(decodedBatchesData) + n_hash := len(decodedBatchesHash) + assert.Equal(t, 10, n_data) + assert.Equal(t, 10, n_hash) + + // Assert decoded sequence data is correct + for i := 0; i < n_data; i++ { + assert.Equal(t, mockSeqData[i], decodedBatchesData[i]) + } + + // Assert decoded batches' hash is correct + for i := 0; i < n_hash; i++ { + assert.Equal(t, mockSeqHash[i], decodedBatchesHash[i]) + } +} diff --git a/dataavailability/eigenda/interfaces.go b/dataavailability/eigenda/interfaces.go new file mode 100644 index 0000000000..f6f15ed369 --- /dev/null +++ b/dataavailability/eigenda/interfaces.go @@ -0,0 +1,14 @@ +package eigenda + +import ( + "context" + + "github.com/0xPolygonHermez/zkevm-node/dataavailability" +) + +// BlobRetriever is used to retrieve data availability message from EigenDA blob request ID +type BlobRetriever interface { + dataavailability.BatchDataProvider + GetBatchL2DataFromRequestId(ctx context.Context, id []byte) ([][]byte, error) + GetDataAvailabilityMessageFromId(ctx context.Context, requestID []byte) ([]byte, error) +} diff --git a/dataavailability/eigenda/mock_signer.go b/dataavailability/eigenda/mock_signer.go new file mode 100644 index 0000000000..5872a0f5f0 --- /dev/null +++ b/dataavailability/eigenda/mock_signer.go @@ -0,0 +1,17 @@ +package eigenda + +import "github.com/Layr-Labs/eigenda/core" + +// MockBlobRequestSigner is a moock EigenLayer signer for PoC purposes. +// On production, there will be a need to register a BlobRequestSigner with EigenLayer. +type MockBlobRequestSigner struct{} + +// SignBlobRequest is the mock implementation for the mock signer +func (s MockBlobRequestSigner) SignBlobRequest(header core.BlobAuthHeader) ([]byte, error) { + return []byte{}, nil +} + +// GetAccountID is the mock implementation for the mock signer +func (s MockBlobRequestSigner) GetAccountID() string { + return "" +} diff --git a/dataavailability/eigenda/provider.go b/dataavailability/eigenda/provider.go new file mode 100644 index 0000000000..30ff8b1e9b --- /dev/null +++ b/dataavailability/eigenda/provider.go @@ -0,0 +1,150 @@ +package eigenda + +import ( + "context" + "encoding/base64" + "errors" + "fmt" + "time" + + "github.com/0xPolygonHermez/zkevm-node/dataavailability" + "github.com/0xPolygonHermez/zkevm-node/log" + disperser_rpc "github.com/Layr-Labs/eigenda/api/grpc/disperser" + "github.com/ethereum/go-ethereum/common" +) + +var ( + // ErrDisperseFailed is used when blob dispersion failed + ErrDisperseFailed = errors.New("disperse blob on EigenDA layer failed") + // ErrInsufficientSignatures is there are insufficient signatures + ErrInsufficientSignatures = errors.New("insufficient signatures, confirmation threshold for blob not met") +) + +// DataAvailabilityProvider is the EigenDA backend manager that holds the DA implementation. +// It contains the implementation of SequenceSender and SequenceRetriever of the zkevm's +// dataavailability package. +type DataAvailabilityProvider struct { + cfg dataavailability.Config + client *DisperserClient +} + +// NewDataAvailabilityProvider creates a new data availability provider +func NewDataAvailabilityProvider(cfg dataavailability.Config) *DataAvailabilityProvider { + // TODO: Switch to authenticated blob dispersion pipeline + signer := MockBlobRequestSigner{} + p := &DataAvailabilityProvider{ + cfg: cfg, + client: NewDisperserClient(&cfg, signer), + } + + return p +} + +// Init initializes the data availability provider +func (d *DataAvailabilityProvider) Init() error { + return nil +} + +// PostSequence encodes and posts the sequence to the EigenDA layer and verifies that +// the blob gets confirmed or finalized. If the sequence is successfully posted, the +// pipeline encodes the blob data and returns the data availability message +func (d *DataAvailabilityProvider) PostSequence(ctx context.Context, batchesData [][]byte) ([]byte, error) { + // Send blob to EigenDA disperser + blobData := EncodeSequence(batchesData) + _, idBytes, err := d.client.DisperseBlob(ctx, blobData, []uint8{}) + if err != nil { + log.Error("failed to send blob to EigenDA disperser: ", err) + return nil, err + } + log.Debug("sent blob to EigenDA disperser, request id: ", base64.StdEncoding.EncodeToString(idBytes)) + + startTime := time.Now() + var blobStatusReply *disperser_rpc.BlobStatusReply + for { + blobStatusReply, err = d.client.GetBlobStatus(ctx, idBytes) + if err != nil { + log.Error("error getting blob status: %v\n", err) + return nil, err + } + + // Get blob status + currStatus := blobStatusReply.GetStatus() + if currStatus == disperser_rpc.BlobStatus_CONFIRMED || currStatus == disperser_rpc.BlobStatus_FINALIZED { + break + } else if currStatus == disperser_rpc.BlobStatus_FAILED { + return nil, ErrDisperseFailed + } else if currStatus == disperser_rpc.BlobStatus_INSUFFICIENT_SIGNATURES { + return nil, ErrInsufficientSignatures + } else { + // status == BlobStatus_PROCESSING || BlobStatus_DISPERSING || BlobStatus_UNKNOWN + if time.Since(startTime) > d.cfg.BlobStatusConfirmedTimeout.Duration { + err = fmt.Errorf("blob status confirmation timeout") + log.Error("Error: ", err) + return nil, err + } + } + time.Sleep(d.cfg.RetrieveBlobStatusPeriod.Duration) + } + + if blobStatusReply == nil { + return nil, fmt.Errorf("empty blob status reply returned") + } + + // Get abi-encoded data availability message + info := blobStatusReply.GetInfo() + data, err := GetBlobData(info) + if err != nil { + log.Error("Error getting blob data: ", err) + return nil, err + } + + return TryEncodeToDataAvailabilityMessage(data) +} + +// GetSequence gets blob data from the EigenDA layer and decodes the blob data into +// L2 batches data. The EigenDA provider does not use batchHashes to retrieve the L2 +// batches data. +func (d *DataAvailabilityProvider) GetSequence(ctx context.Context, batchHashes []common.Hash, dataAvailabilityMessage []byte) ([][]byte, error) { + blobData, err := TryDecodeFromDataAvailabilityMessage(dataAvailabilityMessage) + if err != nil { + log.Error("Error decoding from da message: ", err) + return nil, err + } + batchHeaderHash, err := blobData.BlobVerificationProof.BatchMetadata.GetBatchHeaderHash() + if err != nil { + return nil, err + } + + reply, err := d.client.RetrieveBlob(ctx, batchHeaderHash, blobData.BlobVerificationProof.BlobIndex) + if err != nil { + log.Error("Error retrieving blob from EigenDA disperser: ", err) + return nil, err + } + + batchesData, _ := DecodeSequence(reply.GetData()) + return batchesData, nil +} + +// GetDataAvailabilityMessageFromId gets the data availability message from request ID +func (d *DataAvailabilityProvider) GetDataAvailabilityMessageFromId(ctx context.Context, requestId []byte) ([]byte, error) { + blobStatusReply, err := d.client.GetBlobStatus(ctx, requestId) + if err != nil { + log.Error("Error getting blob status from EigenDA disperser: ", err) + return nil, err + } + + // Get blob status + status := blobStatusReply.GetStatus() + confirmedFlag := status == disperser_rpc.BlobStatus_CONFIRMED || status == disperser_rpc.BlobStatus_FINALIZED + if !confirmedFlag { + return nil, fmt.Errorf("EigenDA blob not confirmed, unable to retrieve blob information") + } + + info := blobStatusReply.GetInfo() + blobData, err := GetBlobData(info) + if err != nil { + return nil, err + } + + return TryEncodeToDataAvailabilityMessage(blobData) +} diff --git a/dataavailability/eigenda/provider_test.go b/dataavailability/eigenda/provider_test.go new file mode 100644 index 0000000000..9abb5665af --- /dev/null +++ b/dataavailability/eigenda/provider_test.go @@ -0,0 +1,129 @@ +package eigenda + +import ( + "context" + "fmt" + "math/rand" + "testing" + "time" + + "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygonHermez/zkevm-node/dataavailability" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" +) + +// Set longer timeout flag for test case +func TestDisperseBlobWithStringDataUsingProvider(t *testing.T) { + cfg := dataavailability.Config{ + Hostname: "disperser-holesky.eigenda.xyz", + Port: "443", + Timeout: types.NewDuration(30 * time.Second), + UseSecureGrpcFlag: true, + } + provider := NewDataAvailabilityProvider(cfg) + + // Generate mock string batch data + stringData := "hihihihihihihihihihihihihihihihihihi" + data := []byte(stringData) + + // Generate mock string sequence + mockBatches := [][]byte{} + for i := 0; i < 10; i++ { + mockBatches = append(mockBatches, data) + } + + // send mock sequence with provider + msg, err := provider.PostSequence(context.Background(), mockBatches) + fmt.Println("DA msg: ", msg) + assert.NoError(t, err) + blobData, err := TryDecodeFromDataAvailabilityMessage(msg) + assert.NoError(t, err) + assert.NotZero(t, blobData.BlobVerificationProof.BatchId) + assert.NotZero(t, blobData.BlobVerificationProof.BlobIndex) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot.Bytes()) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot.Bytes()) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums) + assert.NotZero(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.SignatoryRecordHash.Bytes()) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.SignatoryRecordHash.Bytes()) + assert.NotZero(t, blobData.BlobVerificationProof.BatchMetadata.ConfirmationBlockNumber) + assert.NotNil(t, blobData.BlobVerificationProof.InclusionProof) + assert.NotEmpty(t, blobData.BlobVerificationProof.InclusionProof) + assert.NotNil(t, blobData.BlobVerificationProof.QuorumIndices) + assert.NotEmpty(t, blobData.BlobVerificationProof.QuorumIndices) + fmt.Println("Decoding DA msg successful") + + // Retrieve sequence with provider + batchesData, err := provider.GetSequence(context.Background(), []common.Hash{}, msg) + + // Validate retrieved data + assert.NoError(t, err) + assert.Equal(t, 10, len(batchesData)) + for _, batchData := range batchesData { + assert.Equal(t, stringData, string(batchData)) + } +} + +// Set longer timeout flag for test case +func TestDisperseBlobWithRandomDataUsingProvider(t *testing.T) { + cfg := dataavailability.Config{ + Hostname: "disperser-holesky.eigenda.xyz", + Port: "443", + Timeout: types.NewDuration(30 * time.Second), + UseSecureGrpcFlag: true, + } + provider := NewDataAvailabilityProvider(cfg) + + // Define Different DataSizes + dataSize := []int{100000, 200000, 1000, 80, 30000} + + // Disperse Blob with different DataSizes + rand.Seed(time.Now().UnixNano()) //nolint:gosec,staticcheck + data := make([]byte, dataSize[rand.Intn(len(dataSize))]) //nolint:gosec,staticcheck + _, err := rand.Read(data) //nolint:gosec,staticcheck + assert.NoError(t, err) + + // Generate mock string sequence + mockBatches := [][]byte{} + for i := 0; i < 10; i++ { + mockBatches = append(mockBatches, data) + } + + // send mock sequence with provider + msg, err := provider.PostSequence(context.Background(), mockBatches) + fmt.Println("DA msg: ", msg) + assert.NoError(t, err) + blobData, err := TryDecodeFromDataAvailabilityMessage(msg) + assert.NoError(t, err) + assert.NotZero(t, blobData.BlobVerificationProof.BatchId) + assert.NotZero(t, blobData.BlobVerificationProof.BlobIndex) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot.Bytes()) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.BlobHeadersRoot.Bytes()) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.QuorumNumbers) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.SignedStakeForQuorums) + assert.NotZero(t, blobData.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber) + assert.NotNil(t, blobData.BlobVerificationProof.BatchMetadata.SignatoryRecordHash.Bytes()) + assert.NotEmpty(t, blobData.BlobVerificationProof.BatchMetadata.SignatoryRecordHash.Bytes()) + assert.NotZero(t, blobData.BlobVerificationProof.BatchMetadata.ConfirmationBlockNumber) + assert.NotNil(t, blobData.BlobVerificationProof.InclusionProof) + assert.NotEmpty(t, blobData.BlobVerificationProof.InclusionProof) + assert.NotNil(t, blobData.BlobVerificationProof.QuorumIndices) + assert.NotEmpty(t, blobData.BlobVerificationProof.QuorumIndices) + fmt.Println("Decoding DA msg successful") + + // Retrieve sequence with provider + batchesData, err := provider.GetSequence(context.Background(), []common.Hash{}, msg) + + // Validate retrieved data + assert.NoError(t, err) + assert.Equal(t, 10, len(batchesData)) + for idx, batchData := range batchesData { + assert.Equal(t, mockBatches[idx], batchData) + } +} diff --git a/dataavailability/eigenda/requester.go b/dataavailability/eigenda/requester.go new file mode 100644 index 0000000000..0201fccecf --- /dev/null +++ b/dataavailability/eigenda/requester.go @@ -0,0 +1,29 @@ +package eigenda + +import ( + "context" + + "github.com/ethereum/go-ethereum/common" +) + +// DataAvailabilityRetriever is the EigenDA retriever client to retrieveĀ and +// decode EigenDA blobs into L2 batches data +type DataAvailabilityRetriever struct { + backend BlobRetriever +} + +// GetBatchL2DataFromRequestId gets the batch data from the EigenDA request ID +func (d *DataAvailabilityRetriever) GetBatchL2DataFromRequestId(ctx context.Context, id []byte) ([][]byte, error) { + msg, err := d.backend.GetDataAvailabilityMessageFromId(ctx, id) + if err != nil { + return nil, err + } else { + return d.backend.GetBatchL2Data([]uint64{}, []common.Hash{}, msg) + } +} + +// GetDataAvailabilityMessageFromRequestId gets the data availability message +// from the EigenDA request ID +func (d *DataAvailabilityRetriever) GetDataAvailabilityMessageFromRequestId(ctx context.Context, id []byte) ([]byte, error) { + return d.backend.GetDataAvailabilityMessageFromId(ctx, id) +} diff --git a/etherman/etherman_xlayer.go b/etherman/etherman_xlayer.go index 764af960b4..72827914eb 100644 --- a/etherman/etherman_xlayer.go +++ b/etherman/etherman_xlayer.go @@ -20,6 +20,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/etherman/ethgasstation" "github.com/0xPolygonHermez/zkevm-node/etherman/metrics" dataavailabilityprotocol "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/dataavailabilityprotocol_xlayer" + "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/eigendaverifier" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/etrogpolygonzkevm" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/oldpolygonzkevm" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/oldpolygonzkevmglobalexitroot" @@ -179,6 +180,12 @@ type L1Config struct { PolAddr common.Address `json:"polTokenAddress"` // GlobalExitRootManagerAddr Address of the L1 GlobalExitRootManager contract GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"` + // EigenDARollupUtilsAddr Address of the L1 library + EigenDARollupUtilsAddr common.Address `mapstructure:"eigenDARollupUtilsAddress"` + // EigenDAVerifierManagerAddr Address of the L1 contract + EigenDAVerifierManagerAddr common.Address `mapstructure:"eigenDAVerifierManagerAddress"` + // EigenDAServiceManagerAddr Address of the L1 contract + EigenDaServiceManagerAddr common.Address `mapstructure:"eigenDAServiceManagerAddress"` } type externalGasProviders struct { @@ -195,6 +202,7 @@ type Client struct { RollupManager *polygonrollupmanager.Polygonrollupmanager GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot OldGlobalExitRootManager *oldpolygonzkevmglobalexitroot.Oldpolygonzkevmglobalexitroot + EigendaVerifier *eigendaverifier.Eigendaverifier Pol *pol.Pol DAProtocol *dataavailabilityprotocol.Dataavailabilityprotocol SCAddresses []common.Address @@ -251,6 +259,11 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { log.Errorf("error creating NewOldpolygonzkevmglobalexitroot client (%s). Error: %w", l1Config.GlobalExitRootManagerAddr.String(), err) return nil, err } + eigendaVerifier, err := eigendaverifier.NewEigendaverifier(l1Config.EigenDAVerifierManagerAddr, ethClient) + if err != nil { + fmt.Printf("error creating NewEigendaverifier client (%s)\n", l1Config.EigenDAVerifierManagerAddr.String()) + return nil, err + } pol, err := pol.NewPol(l1Config.PolAddr, ethClient) if err != nil { log.Errorf("error creating NewPol client (%s). Error: %w", l1Config.PolAddr.String(), err) @@ -296,6 +309,7 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { GlobalExitRootManager: globalExitRoot, DAProtocol: dap, OldGlobalExitRootManager: oldGlobalExitRoot, + EigendaVerifier: eigendaVerifier, SCAddresses: scAddresses, RollupID: rollupID, GasProviders: externalGasProviders{ @@ -1690,6 +1704,12 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence return sequencedForcedBatches, nil } +// VerifyDataAvailabilityMessage verifies the data availability message from the current +// canonical chain. If DA message is valid, no error is returned. +func (etherMan *Client) VerifyDataAvailabilityMessage(dataAvailabilityMessage []byte) error { + return etherMan.EigendaVerifier.VerifyMessage(&bind.CallOpts{Pending: false}, [32]byte{}, dataAvailabilityMessage) +} + func prepareBlock(vLog types.Log, t time.Time, fullBlock *types.Block) Block { var block Block block.BlockNumber = vLog.BlockNumber diff --git a/etherman/simulated.go b/etherman/simulated.go index e1a1e11bba..9c0aeabafa 100644 --- a/etherman/simulated.go +++ b/etherman/simulated.go @@ -31,7 +31,7 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (*Client, *simula // 10000000 ETH in wei balance, _ := new(big.Int).SetString("10000000000000000000000000", 10) //nolint:gomnd address := auth.From - genesisAlloc := map[common.Address]core.GenesisAccount{ + genesisAlloc := map[common.Address]core.GenesisAccount{ //nolint:staticcheck address: { Balance: balance, }, diff --git a/etherman/smartcontracts/abi/eigendarolluputils.abi b/etherman/smartcontracts/abi/eigendarolluputils.abi new file mode 100644 index 0000000000..8ea77b63c3 --- /dev/null +++ b/etherman/smartcontracts/abi/eigendarolluputils.abi @@ -0,0 +1,166 @@ +[ + { + "type": "function", + "name": "getQuorumAdversaryThreshold", + "inputs": [ + { + "name": "eigenDAServiceManager", + "type": "IEigenDAServiceManager", + "internalType": "contract IEigenDAServiceManager" + }, + { + "name": "quorumNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "adversaryThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "verifyBlob", + "inputs": [ + { + "name": "blobHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BlobHeader", + "components": [ + { + "name": "commitment", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "dataLength", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "quorumBlobParams", + "type": "tuple[]", + "internalType": "struct IEigenDAServiceManager.QuorumBlobParam[]", + "components": [ + { + "name": "quorumNumber", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "adversaryThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "confirmationThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "chunkLength", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ] + }, + { + "name": "eigenDAServiceManager", + "type": "IEigenDAServiceManager", + "internalType": "contract IEigenDAServiceManager" + }, + { + "name": "blobVerificationProof", + "type": "tuple", + "internalType": "struct EigenDARollupUtils.BlobVerificationProof", + "components": [ + { + "name": "batchId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "blobIndex", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "batchMetadata", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchMetadata", + "components": [ + { + "name": "batchHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchHeader", + "components": [ + { + "name": "blobHeadersRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "quorumNumbers", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signedStakeForQuorums", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "referenceBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "signatoryRecordHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "confirmationBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "inclusionProof", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "quorumIndices", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/eigendaverifier.abi b/etherman/smartcontracts/abi/eigendaverifier.abi new file mode 100644 index 0000000000..c639073f3c --- /dev/null +++ b/etherman/smartcontracts/abi/eigendaverifier.abi @@ -0,0 +1,563 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_admin", + "type": "address", + "internalType": "address" + }, + { + "name": "_eigenDAServiceManager", + "type": "address", + "internalType": "contract IEigenDAServiceManager" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "acceptAdminRole", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "admin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "decodeBlobData", + "inputs": [ + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "blobData", + "type": "tuple", + "internalType": "struct EigenDAVerifier.BlobData", + "components": [ + { + "name": "blobHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BlobHeader", + "components": [ + { + "name": "commitment", + "type": "tuple", + "internalType": "struct BN254.G1Point", + "components": [ + { + "name": "X", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "Y", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "dataLength", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "quorumBlobParams", + "type": "tuple[]", + "internalType": "struct IEigenDAServiceManager.QuorumBlobParam[]", + "components": [ + { + "name": "quorumNumber", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "adversaryThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "confirmationThresholdPercentage", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "chunkLength", + "type": "uint32", + "internalType": "uint32" + } + ] + } + ] + }, + { + "name": "blobVerificationProof", + "type": "tuple", + "internalType": "struct EigenDARollupUtils.BlobVerificationProof", + "components": [ + { + "name": "batchId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "blobIndex", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "batchMetadata", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchMetadata", + "components": [ + { + "name": "batchHeader", + "type": "tuple", + "internalType": "struct IEigenDAServiceManager.BatchHeader", + "components": [ + { + "name": "blobHeadersRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "quorumNumbers", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signedStakeForQuorums", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "referenceBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "signatoryRecordHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "confirmationBlockNumber", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "name": "inclusionProof", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "quorumIndices", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ] + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "getDataAvailabilityProtocol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProcotolName", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "pendingAdmin", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setDataAvailabilityProtocol", + "inputs": [ + { + "name": "newDataAvailabilityProtocol", + "type": "address", + "internalType": "contract IEigenDAServiceManager" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferAdminRole", + "inputs": [ + { + "name": "newPendingAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "verifyMessage", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "view" + }, + { + "type": "event", + "name": "AcceptAdminRole", + "inputs": [ + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SetDataAvailabilityProtocol", + "inputs": [ + { + "name": "newTrustedSequencer", + "type": "address", + "indexed": false, + "internalType": "contract IEigenDAServiceManager" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TransferAdminRole", + "inputs": [ + { + "name": "newPendingAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "BatchAlreadyVerified", + "inputs": [] + }, + { + "type": "error", + "name": "BatchNotSequencedOrNotSequenceEnd", + "inputs": [] + }, + { + "type": "error", + "name": "ExceedMaxVerifyBatches", + "inputs": [] + }, + { + "type": "error", + "name": "FinalNumBatchBelowLastVerifiedBatch", + "inputs": [] + }, + { + "type": "error", + "name": "FinalNumBatchDoesNotMatchPendingState", + "inputs": [] + }, + { + "type": "error", + "name": "FinalPendingStateNumInvalid", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchNotAllowed", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchTimeoutNotExpired", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchesAlreadyActive", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchesDecentralized", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchesNotAllowedOnEmergencyState", + "inputs": [] + }, + { + "type": "error", + "name": "ForceBatchesOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForcedDataDoesNotMatch", + "inputs": [] + }, + { + "type": "error", + "name": "GasTokenNetworkMustBeZeroOnEther", + "inputs": [] + }, + { + "type": "error", + "name": "GlobalExitRootNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "HaltTimeoutNotExpired", + "inputs": [] + }, + { + "type": "error", + "name": "HaltTimeoutNotExpiredAfterEmergencyState", + "inputs": [] + }, + { + "type": "error", + "name": "HugeTokenMetadataNotSupported", + "inputs": [] + }, + { + "type": "error", + "name": "InitNumBatchAboveLastVerifiedBatch", + "inputs": [] + }, + { + "type": "error", + "name": "InitNumBatchDoesNotMatchPendingState", + "inputs": [] + }, + { + "type": "error", + "name": "InitSequencedBatchDoesNotMatch", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitializeTransaction", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRangeBatchTimeTarget", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRangeForceBatchTimeout", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRangeMultiplierBatchFee", + "inputs": [] + }, + { + "type": "error", + "name": "MaxTimestampSequenceInvalid", + "inputs": [] + }, + { + "type": "error", + "name": "NewAccInputHashDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "NewPendingStateTimeoutMustBeLower", + "inputs": [] + }, + { + "type": "error", + "name": "NewStateRootNotInsidePrime", + "inputs": [] + }, + { + "type": "error", + "name": "NewTrustedAggregatorTimeoutMustBeLower", + "inputs": [] + }, + { + "type": "error", + "name": "NotEnoughMaticAmount", + "inputs": [] + }, + { + "type": "error", + "name": "NotEnoughPOLAmount", + "inputs": [] + }, + { + "type": "error", + "name": "OldAccInputHashDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "OldStateRootDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyAdmin", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyPendingAdmin", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyRollupManager", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyTrustedAggregator", + "inputs": [] + }, + { + "type": "error", + "name": "OnlyTrustedSequencer", + "inputs": [] + }, + { + "type": "error", + "name": "PendingStateDoesNotExist", + "inputs": [] + }, + { + "type": "error", + "name": "PendingStateInvalid", + "inputs": [] + }, + { + "type": "error", + "name": "PendingStateNotConsolidable", + "inputs": [] + }, + { + "type": "error", + "name": "PendingStateTimeoutExceedHaltAggregationTimeout", + "inputs": [] + }, + { + "type": "error", + "name": "SequenceZeroBatches", + "inputs": [] + }, + { + "type": "error", + "name": "SequencedTimestampBelowForcedTimestamp", + "inputs": [] + }, + { + "type": "error", + "name": "SequencedTimestampInvalid", + "inputs": [] + }, + { + "type": "error", + "name": "StoredRootMustBeDifferentThanNewRoot", + "inputs": [] + }, + { + "type": "error", + "name": "TransactionsLengthAboveMax", + "inputs": [] + }, + { + "type": "error", + "name": "TrustedAggregatorTimeoutExceedHaltAggregationTimeout", + "inputs": [] + }, + { + "type": "error", + "name": "TrustedAggregatorTimeoutNotExpired", + "inputs": [] + } +] \ No newline at end of file diff --git a/etherman/smartcontracts/bin/eigendarolluputils.bin b/etherman/smartcontracts/bin/eigendarolluputils.bin new file mode 100644 index 0000000000..f8a3792fc7 --- /dev/null +++ b/etherman/smartcontracts/bin/eigendarolluputils.bin @@ -0,0 +1 @@ +6114c161003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c80638651838414610045578063ecad0b521461005a575b600080fd5b610058610053366004610cff565b610083565b005b61006d610068366004610d83565b61089c565b60405160ff909116815260200160405180910390f35b6001600160a01b03821663eccbbfc961009f6020840184610dc1565b6040516001600160e01b031960e084901b16815263ffffffff919091166004820152602401602060405180830381865afa1580156100e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101059190610de3565b6101236101156040840184610dfc565b61011e90610f50565b610994565b146101af5760405162461bcd60e51b815260206004820152604b60248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a206260448201527f617463684d6574616461746120646f6573206e6f74206d617463682073746f7260648201526a6564206d6574616461746160a81b608482015260a4015b60405180910390fd5b6102636101bf6060830183611021565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610201925050506040840184610dfc565b61020b908061106f565b3561021d61021887611096565b610a05565b60405160200161022f91815260200190565b604051602081830303815290604052805190602001208460200160208101906102589190610dc1565b63ffffffff16610a35565b6102d55760405162461bcd60e51b815260206004820152603960248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a206960448201527f6e636c7573696f6e2070726f6f6620697320696e76616c69640000000000000060648201526084016101a6565b6000805b6102e660608601866111dc565b9050811015610785576102fc60608601866111dc565b8281811061030c5761030c611226565b610322926020608090920201908101915061123c565b60ff166103326040850185610dfc565b61033c908061106f565b61034a906020810190611021565b6103576080870187611021565b8581811061036757610367611226565b919091013560f81c905081811061038057610380611226565b9050013560f81c60f81b60f81c60ff16146104035760405162461bcd60e51b815260206004820152603a60248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a207160448201527f756f72756d4e756d62657220646f6573206e6f74206d6174636800000000000060648201526084016101a6565b61041060608601866111dc565b8281811061042057610420611226565b9050608002016040016020810190610438919061123c565b60ff1661044860608701876111dc565b8381811061045857610458611226565b9050608002016020016020810190610470919061123c565b60ff16106104f75760405162461bcd60e51b815260206004820152604860248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a206160448201527f64766572736172795468726573686f6c6450657263656e74616765206973206e6064820152671bdd081d985b1a5960c21b608482015260a4016101a6565b60006105388561050a60608901896111dc565b8581811061051a5761051a611226565b610530926020608090920201908101915061123c565b60ff1661089c565b905060ff8116156106025760ff811661055460608801886111dc565b8481811061056457610564611226565b905060800201602001602081019061057c919061123c565b60ff1610156106025760405162461bcd60e51b815260206004820152604660248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a206160448201527f64766572736172795468726573686f6c6450657263656e74616765206973206e6064820152651bdd081b595d60d21b608482015260a4016101a6565b61060f60608701876111dc565b8381811061061f5761061f611226565b9050608002016040016020810190610637919061123c565b60ff166106476040860186610dfc565b610651908061106f565b61065f906040810190611021565b61066c6080880188611021565b8681811061067c5761067c611226565b919091013560f81c905081811061069557610695611226565b9050013560f81c60f81b60f81c60ff16101561072b5760405162461bcd60e51b815260206004820152604960248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a206360448201527f6f6e6669726d6174696f6e5468726573686f6c6450657263656e7461676520696064820152681cc81b9bdd081b595d60ba1b608482015260a4016101a6565b61076f8361073c60608901896111dc565b8581811061074c5761074c611226565b610762926020608090920201908101915061123c565b600160ff919091161b1790565b925050808061077d9061126d565b9150506102d9565b506107fe6107f7846001600160a01b031663e15234ff6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156107ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107f291908101906112aa565b610a4d565b8281161490565b6108965760405162461bcd60e51b815260206004820152605960248201527f456967656e4441526f6c6c75705574696c732e766572696679426c6f623a207260448201527f657175697265642071756f72756d7320617265206e6f7420612073756273657460648201527f206f662074686520636f6e6669726d65642071756f72756d7300000000000000608482015260a4016101a6565b50505050565b600081836001600160a01b0316638687feae6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156108dd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261090591908101906112aa565b51111561098e57826001600160a01b0316638687feae6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561094a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261097291908101906112aa565b828151811061098357610983611226565b016020015160f81c90505b92915050565b600061098e82600001516040516020016109ae919061134d565b60408051808303601f1901815282825280516020918201208682015187840151838601929092528484015260e01b6001600160e01b0319166060840152815160448185030181526064909301909152815191012090565b600081604051602001610a1891906113ad565b604051602081830303815290604052805190602001209050919050565b600083610a43868585610bdd565b1495945050505050565b600061010082511115610ad65760405162461bcd60e51b8152602060048201526044602482018190527f4269746d61705574696c732e6f72646572656442797465734172726179546f42908201527f69746d61703a206f7264657265644279746573417272617920697320746f6f206064820152636c6f6e6760e01b608482015260a4016101a6565b8151600003610ae757506000919050565b60008083600081518110610afd57610afd611226565b0160200151600160f89190911c81901b92505b8451811015610bd457848181518110610b2b57610b2b611226565b0160200151600160f89190911c1b9150828211610bc05760405162461bcd60e51b815260206004820152604760248201527f4269746d61705574696c732e6f72646572656442797465734172726179546f4260448201527f69746d61703a206f72646572656442797465734172726179206973206e6f74206064820152661bdc99195c995960ca1b608482015260a4016101a6565b91811791610bcd8161126d565b9050610b10565b50909392505050565b600060208451610bed9190611456565b15610c745760405162461bcd60e51b815260206004820152604b60248201527f4d65726b6c652e70726f63657373496e636c7573696f6e50726f6f664b65636360448201527f616b3a2070726f6f66206c656e6774682073686f756c642062652061206d756c60648201526a3a34b836329037b310199960a91b608482015260a4016101a6565b8260205b85518111610cda57610c8b600285611456565b600003610caf57816000528086015160205260406000209150600284049350610cc8565b8086015160005281602052604060002091506002840493505b610cd3602082611478565b9050610c78565b50949350505050565b80356001600160a01b0381168114610cfa57600080fd5b919050565b600080600060608486031215610d1457600080fd5b833567ffffffffffffffff80821115610d2c57600080fd5b9085019060808288031215610d4057600080fd5b819450610d4f60208701610ce3565b93506040860135915080821115610d6557600080fd5b50840160a08187031215610d7857600080fd5b809150509250925092565b60008060408385031215610d9657600080fd5b610d9f83610ce3565b946020939093013593505050565b803563ffffffff81168114610cfa57600080fd5b600060208284031215610dd357600080fd5b610ddc82610dad565b9392505050565b600060208284031215610df557600080fd5b5051919050565b60008235605e19833603018112610e1257600080fd5b9190910192915050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610e5557610e55610e1c565b60405290565b6040516080810167ffffffffffffffff81118282101715610e5557610e55610e1c565b6040805190810167ffffffffffffffff81118282101715610e5557610e55610e1c565b604051601f8201601f1916810167ffffffffffffffff81118282101715610eca57610eca610e1c565b604052919050565b600067ffffffffffffffff821115610eec57610eec610e1c565b50601f01601f191660200190565b600082601f830112610f0b57600080fd5b8135610f1e610f1982610ed2565b610ea1565b818152846020838601011115610f3357600080fd5b816020850160208301376000918101602001919091529392505050565b600060608236031215610f6257600080fd5b610f6a610e32565b823567ffffffffffffffff80821115610f8257600080fd5b818501915060808236031215610f9757600080fd5b610f9f610e5b565b82358152602083013582811115610fb557600080fd5b610fc136828601610efa565b602083015250604083013582811115610fd957600080fd5b610fe536828601610efa565b604083015250610ff760608401610dad565b6060820152835250506020838101359082015261101660408401610dad565b604082015292915050565b6000808335601e1984360301811261103857600080fd5b83018035915067ffffffffffffffff82111561105357600080fd5b60200191503681900382131561106857600080fd5b9250929050565b60008235607e19833603018112610e1257600080fd5b803560ff81168114610cfa57600080fd5b60008136036080808212156110aa57600080fd5b6110b2610e32565b6040808412156110c157600080fd5b6110c9610e7e565b935085358452602080870135818601528483526110e7828801610dad565b81840152606094508487013567ffffffffffffffff8082111561110957600080fd5b9088019036601f83011261111c57600080fd5b81358181111561112e5761112e610e1c565b61113c848260051b01610ea1565b818152848101925060079190911b83018401903682111561115c57600080fd5b928401925b818410156111c8578784360312156111795760008081fd5b611181610e5b565b61118a85611085565b8152611197868601611085565b868201526111a6878601611085565b878201526111b58a8601610dad565b818b015283529287019291840191611161565b948601949094525092979650505050505050565b6000808335601e198436030181126111f357600080fd5b83018035915067ffffffffffffffff82111561120e57600080fd5b6020019150600781901b360382131561106857600080fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561124e57600080fd5b610ddc82611085565b634e487b7160e01b600052601160045260246000fd5b60006001820161127f5761127f611257565b5060010190565b60005b838110156112a1578181015183820152602001611289565b50506000910152565b6000602082840312156112bc57600080fd5b815167ffffffffffffffff8111156112d357600080fd5b8201601f810184136112e457600080fd5b80516112f2610f1982610ed2565b81815285602083850101111561130757600080fd5b611318826020830160208601611286565b95945050505050565b60008151808452611339816020860160208601611286565b601f01601f19169290920160200192915050565b6020815281516020820152600060208301516080604084015261137360a0840182611321565b90506040840151601f198483030160608501526113908282611321565b91505063ffffffff60608501511660808401528091505092915050565b6000602080835260a08301845180518386015282810151905060408181870152838701519150606063ffffffff80841682890152828901519350608080818a015285855180885260c08b0191508887019750600096505b80871015611447578751805160ff90811684528a82015181168b850152878201511687840152850151841685830152968801966001969096019590820190611404565b509a9950505050505050505050565b60008261147357634e487b7160e01b600052601260045260246000fd5b500690565b8082018082111561098e5761098e61125756fea264697066735822122092f85c0131f3bfba048e27fa2b071c6407f185ff9ad9d3c7366604e22df7943e64736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/eigendaverifier.bin b/etherman/smartcontracts/bin/eigendaverifier.bin new file mode 100644 index 0000000000..1bbf87728f --- /dev/null +++ b/etherman/smartcontracts/bin/eigendaverifier.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50604051610ddc380380610ddc83398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610d1b806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063aba4c80d11610066578063aba4c80d146100f8578063ada8f91914610118578063b9c67c331461012b578063e4f171201461013c578063f851a4401461016557600080fd5b806326782247146100985780633b51be4b146100c85780637cd76b8b146100dd5780638c3d7301146100f0575b600080fd5b6002546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100db6100d6366004610484565b610178565b005b6100db6100eb3660046104e8565b61020a565b6100db61028a565b61010b610106366004610505565b61030b565b6040516100bf9190610660565b6100db6101263660046104e8565b610326565b6000546001600160a01b03166100ab565b6040805180820182526007815266456967656e444160c81b602082015290516100bf919061073d565b6001546100ab906001600160a01b031681565b6000610184838361030b565b8051600054602083015160405163219460e160e21b815293945073__$399f9ce8dd33a06d144ce1eb24d845e280$__936386518384936101d49390926001600160a01b0390911691600401610750565b60006040518083038186803b1580156101ec57600080fd5b505af4158015610200573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b0316331461023557604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a906020015b60405180910390a150565b6002546001600160a01b031633146102b55760405163d1ec4b2360e01b815260040160405180910390fd5b600254600180546001600160a01b0319166001600160a01b0390921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b61031361039f565b61031f82840184610b27565b9392505050565b6001546001600160a01b0316331461035157604051634755657960e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce69060200161027f565b6040805160e081018252600060a0820181815260c083018290529282019283526060808301919091526080820152908152602081016104366040805160a0808201835260008083526020808401829052845160e0810186526060808201848152608083018290529482015260c081018390529283528201819052818401529091820190815260200160608152602001606081525090565b905290565b60008083601f84011261044d57600080fd5b50813567ffffffffffffffff81111561046557600080fd5b60208301915083602082850101111561047d57600080fd5b9250929050565b60008060006040848603121561049957600080fd5b83359250602084013567ffffffffffffffff8111156104b757600080fd5b6104c38682870161043b565b9497909650939450505050565b6001600160a01b03811681146104e557600080fd5b50565b6000602082840312156104fa57600080fd5b813561031f816104d0565b6000806020838503121561051857600080fd5b823567ffffffffffffffff81111561052f57600080fd5b61053b8582860161043b565b90969095509350505050565b6000815180845260005b8181101561056d57602081850181015186830182015201610551565b506000602082860101526020601f19601f83011685010191505092915050565b600063ffffffff808351168452806020840151166020850152604083015160a060408601528051606060a08701528051610100870152602081015160806101208801526105de610180880182610547565b9050604082015160ff19888303016101408901526105fc8282610547565b91505083606083015116610160880152602083015160c08801528360408401511660e088015260608601519350868103606088015261063b8185610547565b9350505050608083015184820360808601526106578282610547565b95945050505050565b60006020808352835160408285015260e0840161068b60608601835180518252602090810151910152565b8183015163ffffffff1660a0860152604090910151608060c0860181905281519283905290830191600091906101008701905b808410156107155761070182865160ff815116825260ff602082015116602083015260ff604082015116604083015263ffffffff60608201511660608301525050565b9385019360019390930192908201906106be565b5093870151868503601f1901604088015293610731818661058d565b98975050505050505050565b60208152600061031f6020830184610547565b60608152600060e0820161077260608401875180518252602090810151910152565b60208681015163ffffffff1660a08501526040870151608060c0860181905281519384905290820192600091906101008701905b808410156107fd576107e982875160ff815116825260ff602082015116602083015260ff604082015116604083015263ffffffff60608201511660608301525050565b9484019460019390930192908201906107a6565b506001600160a01b03891687850152868103604088015261081e818961058d565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156108655761086561082c565b60405290565b6040516080810167ffffffffffffffff811182821017156108655761086561082c565b60405160a0810167ffffffffffffffff811182821017156108655761086561082c565b6040805190810167ffffffffffffffff811182821017156108655761086561082c565b604051601f8201601f1916810167ffffffffffffffff811182821017156108fd576108fd61082c565b604052919050565b803563ffffffff8116811461091957600080fd5b919050565b803560ff8116811461091957600080fd5b600082601f83011261094057600080fd5b813567ffffffffffffffff81111561095a5761095a61082c565b61096d601f8201601f19166020016108d4565b81815284602083860101111561098257600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082840312156109b157600080fd5b6109b9610842565b9050813567ffffffffffffffff808211156109d357600080fd5b90830190608082860312156109e757600080fd5b6109ef61086b565b82358152602083013582811115610a0557600080fd5b610a118782860161092f565b602083015250604083013582811115610a2957600080fd5b610a358782860161092f565b604083015250610a4760608401610905565b60608201528352505060208281013590820152610a6660408301610905565b604082015292915050565b600060a08284031215610a8357600080fd5b610a8b61088e565b9050610a9682610905565b8152610aa460208301610905565b6020820152604082013567ffffffffffffffff80821115610ac457600080fd5b610ad08583860161099f565b60408401526060840135915080821115610ae957600080fd5b610af58583860161092f565b60608401526080840135915080821115610b0e57600080fd5b50610b1b8482850161092f565b60808301525092915050565b60006020808385031215610b3a57600080fd5b823567ffffffffffffffff80821115610b5257600080fd5b81850191506040808388031215610b6857600080fd5b610b706108b1565b833583811115610b7f57600080fd5b84018089036080811215610b9257600080fd5b610b9a610842565b84821215610ba757600080fd5b610baf6108b1565b9150823582528783013588830152818152610bcb858401610905565b88820152606091508183013586811115610be457600080fd5b8084019350508a601f840112610bf957600080fd5b823586811115610c0b57610c0b61082c565b610c19898260051b016108d4565b81815260079190911b8401890190898101908d831115610c3857600080fd5b948a01945b82861015610ca8576080868f031215610c565760008081fd5b610c5e61086b565b610c678761091e565b8152610c748c880161091e565b8c820152610c8389880161091e565b89820152610c92868801610905565b81870152825260809590950194908a0190610c3d565b96830196909652508352505083850135915082821115610cc757600080fd5b610cd388838601610a71565b8582015280955050505050509291505056fea264697066735822122074ae60b83f74a760fb2c661671d91cbe3b1757e03077b2559d96b421d2e9525164736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/eigendaverifier/eigendaverifier.go b/etherman/smartcontracts/eigendaverifier/eigendaverifier.go new file mode 100644 index 0000000000..4e4d932f67 --- /dev/null +++ b/etherman/smartcontracts/eigendaverifier/eigendaverifier.go @@ -0,0 +1,903 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eigendaverifier + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BN254G1Point is an auto generated low-level Go binding around an user-defined struct. +type BN254G1Point struct { + X *big.Int + Y *big.Int +} + +// EigenDARollupUtilsBlobVerificationProof is an auto generated low-level Go binding around an user-defined struct. +type EigenDARollupUtilsBlobVerificationProof struct { + BatchId uint32 + BlobIndex uint32 + BatchMetadata IEigenDAServiceManagerBatchMetadata + InclusionProof []byte + QuorumIndices []byte +} + +// EigenDAVerifierBlobData is an auto generated low-level Go binding around an user-defined struct. +type EigenDAVerifierBlobData struct { + BlobHeader IEigenDAServiceManagerBlobHeader + BlobVerificationProof EigenDARollupUtilsBlobVerificationProof +} + +// IEigenDAServiceManagerBatchHeader is an auto generated low-level Go binding around an user-defined struct. +type IEigenDAServiceManagerBatchHeader struct { + BlobHeadersRoot [32]byte + QuorumNumbers []byte + SignedStakeForQuorums []byte + ReferenceBlockNumber uint32 +} + +// IEigenDAServiceManagerBatchMetadata is an auto generated low-level Go binding around an user-defined struct. +type IEigenDAServiceManagerBatchMetadata struct { + BatchHeader IEigenDAServiceManagerBatchHeader + SignatoryRecordHash [32]byte + ConfirmationBlockNumber uint32 +} + +// IEigenDAServiceManagerBlobHeader is an auto generated low-level Go binding around an user-defined struct. +type IEigenDAServiceManagerBlobHeader struct { + Commitment BN254G1Point + DataLength uint32 + QuorumBlobParams []IEigenDAServiceManagerQuorumBlobParam +} + +// IEigenDAServiceManagerQuorumBlobParam is an auto generated low-level Go binding around an user-defined struct. +type IEigenDAServiceManagerQuorumBlobParam struct { + QuorumNumber uint8 + AdversaryThresholdPercentage uint8 + ConfirmationThresholdPercentage uint8 + ChunkLength uint32 +} + +// EigendaverifierMetaData contains all meta data concerning the Eigendaverifier contract. +var EigendaverifierMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_admin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_eigenDAServiceManager\",\"type\":\"address\",\"internalType\":\"contractIEigenDAServiceManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"acceptAdminRole\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"admin\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decodeBlobData\",\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"blobData\",\"type\":\"tuple\",\"internalType\":\"structEigenDAVerifier.BlobData\",\"components\":[{\"name\":\"blobHeader\",\"type\":\"tuple\",\"internalType\":\"structIEigenDAServiceManager.BlobHeader\",\"components\":[{\"name\":\"commitment\",\"type\":\"tuple\",\"internalType\":\"structBN254.G1Point\",\"components\":[{\"name\":\"X\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"Y\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"name\":\"dataLength\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"quorumBlobParams\",\"type\":\"tuple[]\",\"internalType\":\"structIEigenDAServiceManager.QuorumBlobParam[]\",\"components\":[{\"name\":\"quorumNumber\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"adversaryThresholdPercentage\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"confirmationThresholdPercentage\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"chunkLength\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}]},{\"name\":\"blobVerificationProof\",\"type\":\"tuple\",\"internalType\":\"structEigenDARollupUtils.BlobVerificationProof\",\"components\":[{\"name\":\"batchId\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"blobIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"batchMetadata\",\"type\":\"tuple\",\"internalType\":\"structIEigenDAServiceManager.BatchMetadata\",\"components\":[{\"name\":\"batchHeader\",\"type\":\"tuple\",\"internalType\":\"structIEigenDAServiceManager.BatchHeader\",\"components\":[{\"name\":\"blobHeadersRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"quorumNumbers\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signedStakeForQuorums\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"referenceBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"signatoryRecordHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"confirmationBlockNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"inclusionProof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"quorumIndices\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getDataAvailabilityProtocol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProcotolName\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"pendingAdmin\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setDataAvailabilityProtocol\",\"inputs\":[{\"name\":\"newDataAvailabilityProtocol\",\"type\":\"address\",\"internalType\":\"contractIEigenDAServiceManager\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferAdminRole\",\"inputs\":[{\"name\":\"newPendingAdmin\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifyMessage\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AcceptAdminRole\",\"inputs\":[{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetDataAvailabilityProtocol\",\"inputs\":[{\"name\":\"newTrustedSequencer\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"contractIEigenDAServiceManager\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferAdminRole\",\"inputs\":[{\"name\":\"newPendingAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"BatchAlreadyVerified\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BatchNotSequencedOrNotSequenceEnd\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExceedMaxVerifyBatches\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FinalNumBatchBelowLastVerifiedBatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FinalNumBatchDoesNotMatchPendingState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FinalPendingStateNumInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchNotAllowed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchTimeoutNotExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchesAlreadyActive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchesDecentralized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchesNotAllowedOnEmergencyState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForceBatchesOverflow\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ForcedDataDoesNotMatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GasTokenNetworkMustBeZeroOnEther\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GlobalExitRootNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"HaltTimeoutNotExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"HaltTimeoutNotExpiredAfterEmergencyState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"HugeTokenMetadataNotSupported\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InitNumBatchAboveLastVerifiedBatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InitNumBatchDoesNotMatchPendingState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InitSequencedBatchDoesNotMatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitializeTransaction\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRangeBatchTimeTarget\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRangeForceBatchTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidRangeMultiplierBatchFee\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MaxTimestampSequenceInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewAccInputHashDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewPendingStateTimeoutMustBeLower\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewStateRootNotInsidePrime\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewTrustedAggregatorTimeoutMustBeLower\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughMaticAmount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughPOLAmount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OldAccInputHashDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OldStateRootDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyAdmin\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyPendingAdmin\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyRollupManager\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTrustedAggregator\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyTrustedSequencer\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingStateDoesNotExist\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingStateInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingStateNotConsolidable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingStateTimeoutExceedHaltAggregationTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SequenceZeroBatches\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SequencedTimestampBelowForcedTimestamp\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SequencedTimestampInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StoredRootMustBeDifferentThanNewRoot\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TransactionsLengthAboveMax\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TrustedAggregatorTimeoutExceedHaltAggregationTimeout\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TrustedAggregatorTimeoutNotExpired\",\"inputs\":[]}]", + Bin: "0x608060405234801561001057600080fd5b50604051610ddc380380610ddc83398101604081905261002f91610078565b600180546001600160a01b039384166001600160a01b031991821617909155600080549290931691161790556100b2565b6001600160a01b038116811461007557600080fd5b50565b6000806040838503121561008b57600080fd5b825161009681610060565b60208401519092506100a781610060565b809150509250929050565b610d1b806100c16000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063aba4c80d11610066578063aba4c80d146100f8578063ada8f91914610118578063b9c67c331461012b578063e4f171201461013c578063f851a4401461016557600080fd5b806326782247146100985780633b51be4b146100c85780637cd76b8b146100dd5780638c3d7301146100f0575b600080fd5b6002546100ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100db6100d6366004610484565b610178565b005b6100db6100eb3660046104e8565b61020a565b6100db61028a565b61010b610106366004610505565b61030b565b6040516100bf9190610660565b6100db6101263660046104e8565b610326565b6000546001600160a01b03166100ab565b6040805180820182526007815266456967656e444160c81b602082015290516100bf919061073d565b6001546100ab906001600160a01b031681565b6000610184838361030b565b8051600054602083015160405163219460e160e21b815293945073__$399f9ce8dd33a06d144ce1eb24d845e280$__936386518384936101d49390926001600160a01b0390911691600401610750565b60006040518083038186803b1580156101ec57600080fd5b505af4158015610200573d6000803e3d6000fd5b5050505050505050565b6001546001600160a01b0316331461023557604051634755657960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a906020015b60405180910390a150565b6002546001600160a01b031633146102b55760405163d1ec4b2360e01b815260040160405180910390fd5b600254600180546001600160a01b0319166001600160a01b0390921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b61031361039f565b61031f82840184610b27565b9392505050565b6001546001600160a01b0316331461035157604051634755657960e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce69060200161027f565b6040805160e081018252600060a0820181815260c083018290529282019283526060808301919091526080820152908152602081016104366040805160a0808201835260008083526020808401829052845160e0810186526060808201848152608083018290529482015260c081018390529283528201819052818401529091820190815260200160608152602001606081525090565b905290565b60008083601f84011261044d57600080fd5b50813567ffffffffffffffff81111561046557600080fd5b60208301915083602082850101111561047d57600080fd5b9250929050565b60008060006040848603121561049957600080fd5b83359250602084013567ffffffffffffffff8111156104b757600080fd5b6104c38682870161043b565b9497909650939450505050565b6001600160a01b03811681146104e557600080fd5b50565b6000602082840312156104fa57600080fd5b813561031f816104d0565b6000806020838503121561051857600080fd5b823567ffffffffffffffff81111561052f57600080fd5b61053b8582860161043b565b90969095509350505050565b6000815180845260005b8181101561056d57602081850181015186830182015201610551565b506000602082860101526020601f19601f83011685010191505092915050565b600063ffffffff808351168452806020840151166020850152604083015160a060408601528051606060a08701528051610100870152602081015160806101208801526105de610180880182610547565b9050604082015160ff19888303016101408901526105fc8282610547565b91505083606083015116610160880152602083015160c08801528360408401511660e088015260608601519350868103606088015261063b8185610547565b9350505050608083015184820360808601526106578282610547565b95945050505050565b60006020808352835160408285015260e0840161068b60608601835180518252602090810151910152565b8183015163ffffffff1660a0860152604090910151608060c0860181905281519283905290830191600091906101008701905b808410156107155761070182865160ff815116825260ff602082015116602083015260ff604082015116604083015263ffffffff60608201511660608301525050565b9385019360019390930192908201906106be565b5093870151868503601f1901604088015293610731818661058d565b98975050505050505050565b60208152600061031f6020830184610547565b60608152600060e0820161077260608401875180518252602090810151910152565b60208681015163ffffffff1660a08501526040870151608060c0860181905281519384905290820192600091906101008701905b808410156107fd576107e982875160ff815116825260ff602082015116602083015260ff604082015116604083015263ffffffff60608201511660608301525050565b9484019460019390930192908201906107a6565b506001600160a01b03891687850152868103604088015261081e818961058d565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156108655761086561082c565b60405290565b6040516080810167ffffffffffffffff811182821017156108655761086561082c565b60405160a0810167ffffffffffffffff811182821017156108655761086561082c565b6040805190810167ffffffffffffffff811182821017156108655761086561082c565b604051601f8201601f1916810167ffffffffffffffff811182821017156108fd576108fd61082c565b604052919050565b803563ffffffff8116811461091957600080fd5b919050565b803560ff8116811461091957600080fd5b600082601f83011261094057600080fd5b813567ffffffffffffffff81111561095a5761095a61082c565b61096d601f8201601f19166020016108d4565b81815284602083860101111561098257600080fd5b816020850160208301376000918101602001919091529392505050565b6000606082840312156109b157600080fd5b6109b9610842565b9050813567ffffffffffffffff808211156109d357600080fd5b90830190608082860312156109e757600080fd5b6109ef61086b565b82358152602083013582811115610a0557600080fd5b610a118782860161092f565b602083015250604083013582811115610a2957600080fd5b610a358782860161092f565b604083015250610a4760608401610905565b60608201528352505060208281013590820152610a6660408301610905565b604082015292915050565b600060a08284031215610a8357600080fd5b610a8b61088e565b9050610a9682610905565b8152610aa460208301610905565b6020820152604082013567ffffffffffffffff80821115610ac457600080fd5b610ad08583860161099f565b60408401526060840135915080821115610ae957600080fd5b610af58583860161092f565b60608401526080840135915080821115610b0e57600080fd5b50610b1b8482850161092f565b60808301525092915050565b60006020808385031215610b3a57600080fd5b823567ffffffffffffffff80821115610b5257600080fd5b81850191506040808388031215610b6857600080fd5b610b706108b1565b833583811115610b7f57600080fd5b84018089036080811215610b9257600080fd5b610b9a610842565b84821215610ba757600080fd5b610baf6108b1565b9150823582528783013588830152818152610bcb858401610905565b88820152606091508183013586811115610be457600080fd5b8084019350508a601f840112610bf957600080fd5b823586811115610c0b57610c0b61082c565b610c19898260051b016108d4565b81815260079190911b8401890190898101908d831115610c3857600080fd5b948a01945b82861015610ca8576080868f031215610c565760008081fd5b610c5e61086b565b610c678761091e565b8152610c748c880161091e565b8c820152610c8389880161091e565b89820152610c92868801610905565b81870152825260809590950194908a0190610c3d565b96830196909652508352505083850135915082821115610cc757600080fd5b610cd388838601610a71565b8582015280955050505050509291505056fea264697066735822122074ae60b83f74a760fb2c661671d91cbe3b1757e03077b2559d96b421d2e9525164736f6c63430008140033", +} + +// EigendaverifierABI is the input ABI used to generate the binding from. +// Deprecated: Use EigendaverifierMetaData.ABI instead. +var EigendaverifierABI = EigendaverifierMetaData.ABI + +// EigendaverifierBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use EigendaverifierMetaData.Bin instead. +var EigendaverifierBin = EigendaverifierMetaData.Bin + +// DeployEigendaverifier deploys a new Ethereum contract, binding an instance of Eigendaverifier to it. +func DeployEigendaverifier(auth *bind.TransactOpts, backend bind.ContractBackend, _admin common.Address, _eigenDAServiceManager common.Address) (common.Address, *types.Transaction, *Eigendaverifier, error) { + parsed, err := EigendaverifierMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(EigendaverifierBin), backend, _admin, _eigenDAServiceManager) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Eigendaverifier{EigendaverifierCaller: EigendaverifierCaller{contract: contract}, EigendaverifierTransactor: EigendaverifierTransactor{contract: contract}, EigendaverifierFilterer: EigendaverifierFilterer{contract: contract}}, nil +} + +// Eigendaverifier is an auto generated Go binding around an Ethereum contract. +type Eigendaverifier struct { + EigendaverifierCaller // Read-only binding to the contract + EigendaverifierTransactor // Write-only binding to the contract + EigendaverifierFilterer // Log filterer for contract events +} + +// EigendaverifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type EigendaverifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EigendaverifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type EigendaverifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EigendaverifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type EigendaverifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// EigendaverifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type EigendaverifierSession struct { + Contract *Eigendaverifier // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EigendaverifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type EigendaverifierCallerSession struct { + Contract *EigendaverifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// EigendaverifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type EigendaverifierTransactorSession struct { + Contract *EigendaverifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// EigendaverifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type EigendaverifierRaw struct { + Contract *Eigendaverifier // Generic contract binding to access the raw methods on +} + +// EigendaverifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type EigendaverifierCallerRaw struct { + Contract *EigendaverifierCaller // Generic read-only contract binding to access the raw methods on +} + +// EigendaverifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type EigendaverifierTransactorRaw struct { + Contract *EigendaverifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEigendaverifier creates a new instance of Eigendaverifier, bound to a specific deployed contract. +func NewEigendaverifier(address common.Address, backend bind.ContractBackend) (*Eigendaverifier, error) { + contract, err := bindEigendaverifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Eigendaverifier{EigendaverifierCaller: EigendaverifierCaller{contract: contract}, EigendaverifierTransactor: EigendaverifierTransactor{contract: contract}, EigendaverifierFilterer: EigendaverifierFilterer{contract: contract}}, nil +} + +// NewEigendaverifierCaller creates a new read-only instance of Eigendaverifier, bound to a specific deployed contract. +func NewEigendaverifierCaller(address common.Address, caller bind.ContractCaller) (*EigendaverifierCaller, error) { + contract, err := bindEigendaverifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &EigendaverifierCaller{contract: contract}, nil +} + +// NewEigendaverifierTransactor creates a new write-only instance of Eigendaverifier, bound to a specific deployed contract. +func NewEigendaverifierTransactor(address common.Address, transactor bind.ContractTransactor) (*EigendaverifierTransactor, error) { + contract, err := bindEigendaverifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &EigendaverifierTransactor{contract: contract}, nil +} + +// NewEigendaverifierFilterer creates a new log filterer instance of Eigendaverifier, bound to a specific deployed contract. +func NewEigendaverifierFilterer(address common.Address, filterer bind.ContractFilterer) (*EigendaverifierFilterer, error) { + contract, err := bindEigendaverifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &EigendaverifierFilterer{contract: contract}, nil +} + +// bindEigendaverifier binds a generic wrapper to an already deployed contract. +func bindEigendaverifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := EigendaverifierMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Eigendaverifier *EigendaverifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Eigendaverifier.Contract.EigendaverifierCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Eigendaverifier *EigendaverifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Eigendaverifier.Contract.EigendaverifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Eigendaverifier *EigendaverifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Eigendaverifier.Contract.EigendaverifierTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Eigendaverifier *EigendaverifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Eigendaverifier.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Eigendaverifier *EigendaverifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Eigendaverifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Eigendaverifier *EigendaverifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Eigendaverifier.Contract.contract.Transact(opts, method, params...) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Eigendaverifier *EigendaverifierCaller) Admin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "admin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Eigendaverifier *EigendaverifierSession) Admin() (common.Address, error) { + return _Eigendaverifier.Contract.Admin(&_Eigendaverifier.CallOpts) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Eigendaverifier *EigendaverifierCallerSession) Admin() (common.Address, error) { + return _Eigendaverifier.Contract.Admin(&_Eigendaverifier.CallOpts) +} + +// DecodeBlobData is a free data retrieval call binding the contract method 0xaba4c80d. +// +// Solidity: function decodeBlobData(bytes data) pure returns((((uint256,uint256),uint32,(uint8,uint8,uint8,uint32)[]),(uint32,uint32,((bytes32,bytes,bytes,uint32),bytes32,uint32),bytes,bytes)) blobData) +func (_Eigendaverifier *EigendaverifierCaller) DecodeBlobData(opts *bind.CallOpts, data []byte) (EigenDAVerifierBlobData, error) { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "decodeBlobData", data) + + if err != nil { + return *new(EigenDAVerifierBlobData), err + } + + out0 := *abi.ConvertType(out[0], new(EigenDAVerifierBlobData)).(*EigenDAVerifierBlobData) + + return out0, err + +} + +// DecodeBlobData is a free data retrieval call binding the contract method 0xaba4c80d. +// +// Solidity: function decodeBlobData(bytes data) pure returns((((uint256,uint256),uint32,(uint8,uint8,uint8,uint32)[]),(uint32,uint32,((bytes32,bytes,bytes,uint32),bytes32,uint32),bytes,bytes)) blobData) +func (_Eigendaverifier *EigendaverifierSession) DecodeBlobData(data []byte) (EigenDAVerifierBlobData, error) { + return _Eigendaverifier.Contract.DecodeBlobData(&_Eigendaverifier.CallOpts, data) +} + +// DecodeBlobData is a free data retrieval call binding the contract method 0xaba4c80d. +// +// Solidity: function decodeBlobData(bytes data) pure returns((((uint256,uint256),uint32,(uint8,uint8,uint8,uint32)[]),(uint32,uint32,((bytes32,bytes,bytes,uint32),bytes32,uint32),bytes,bytes)) blobData) +func (_Eigendaverifier *EigendaverifierCallerSession) DecodeBlobData(data []byte) (EigenDAVerifierBlobData, error) { + return _Eigendaverifier.Contract.DecodeBlobData(&_Eigendaverifier.CallOpts, data) +} + +// GetDataAvailabilityProtocol is a free data retrieval call binding the contract method 0xb9c67c33. +// +// Solidity: function getDataAvailabilityProtocol() view returns(address) +func (_Eigendaverifier *EigendaverifierCaller) GetDataAvailabilityProtocol(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "getDataAvailabilityProtocol") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetDataAvailabilityProtocol is a free data retrieval call binding the contract method 0xb9c67c33. +// +// Solidity: function getDataAvailabilityProtocol() view returns(address) +func (_Eigendaverifier *EigendaverifierSession) GetDataAvailabilityProtocol() (common.Address, error) { + return _Eigendaverifier.Contract.GetDataAvailabilityProtocol(&_Eigendaverifier.CallOpts) +} + +// GetDataAvailabilityProtocol is a free data retrieval call binding the contract method 0xb9c67c33. +// +// Solidity: function getDataAvailabilityProtocol() view returns(address) +func (_Eigendaverifier *EigendaverifierCallerSession) GetDataAvailabilityProtocol() (common.Address, error) { + return _Eigendaverifier.Contract.GetDataAvailabilityProtocol(&_Eigendaverifier.CallOpts) +} + +// GetProcotolName is a free data retrieval call binding the contract method 0xe4f17120. +// +// Solidity: function getProcotolName() pure returns(string) +func (_Eigendaverifier *EigendaverifierCaller) GetProcotolName(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "getProcotolName") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// GetProcotolName is a free data retrieval call binding the contract method 0xe4f17120. +// +// Solidity: function getProcotolName() pure returns(string) +func (_Eigendaverifier *EigendaverifierSession) GetProcotolName() (string, error) { + return _Eigendaverifier.Contract.GetProcotolName(&_Eigendaverifier.CallOpts) +} + +// GetProcotolName is a free data retrieval call binding the contract method 0xe4f17120. +// +// Solidity: function getProcotolName() pure returns(string) +func (_Eigendaverifier *EigendaverifierCallerSession) GetProcotolName() (string, error) { + return _Eigendaverifier.Contract.GetProcotolName(&_Eigendaverifier.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Eigendaverifier *EigendaverifierCaller) PendingAdmin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "pendingAdmin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Eigendaverifier *EigendaverifierSession) PendingAdmin() (common.Address, error) { + return _Eigendaverifier.Contract.PendingAdmin(&_Eigendaverifier.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Eigendaverifier *EigendaverifierCallerSession) PendingAdmin() (common.Address, error) { + return _Eigendaverifier.Contract.PendingAdmin(&_Eigendaverifier.CallOpts) +} + +// VerifyMessage is a free data retrieval call binding the contract method 0x3b51be4b. +// +// Solidity: function verifyMessage(bytes32 , bytes data) view returns() +func (_Eigendaverifier *EigendaverifierCaller) VerifyMessage(opts *bind.CallOpts, arg0 [32]byte, data []byte) error { + var out []interface{} + err := _Eigendaverifier.contract.Call(opts, &out, "verifyMessage", arg0, data) + + if err != nil { + return err + } + + return err + +} + +// VerifyMessage is a free data retrieval call binding the contract method 0x3b51be4b. +// +// Solidity: function verifyMessage(bytes32 , bytes data) view returns() +func (_Eigendaverifier *EigendaverifierSession) VerifyMessage(arg0 [32]byte, data []byte) error { + return _Eigendaverifier.Contract.VerifyMessage(&_Eigendaverifier.CallOpts, arg0, data) +} + +// VerifyMessage is a free data retrieval call binding the contract method 0x3b51be4b. +// +// Solidity: function verifyMessage(bytes32 , bytes data) view returns() +func (_Eigendaverifier *EigendaverifierCallerSession) VerifyMessage(arg0 [32]byte, data []byte) error { + return _Eigendaverifier.Contract.VerifyMessage(&_Eigendaverifier.CallOpts, arg0, data) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Eigendaverifier *EigendaverifierTransactor) AcceptAdminRole(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Eigendaverifier.contract.Transact(opts, "acceptAdminRole") +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Eigendaverifier *EigendaverifierSession) AcceptAdminRole() (*types.Transaction, error) { + return _Eigendaverifier.Contract.AcceptAdminRole(&_Eigendaverifier.TransactOpts) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Eigendaverifier *EigendaverifierTransactorSession) AcceptAdminRole() (*types.Transaction, error) { + return _Eigendaverifier.Contract.AcceptAdminRole(&_Eigendaverifier.TransactOpts) +} + +// SetDataAvailabilityProtocol is a paid mutator transaction binding the contract method 0x7cd76b8b. +// +// Solidity: function setDataAvailabilityProtocol(address newDataAvailabilityProtocol) returns() +func (_Eigendaverifier *EigendaverifierTransactor) SetDataAvailabilityProtocol(opts *bind.TransactOpts, newDataAvailabilityProtocol common.Address) (*types.Transaction, error) { + return _Eigendaverifier.contract.Transact(opts, "setDataAvailabilityProtocol", newDataAvailabilityProtocol) +} + +// SetDataAvailabilityProtocol is a paid mutator transaction binding the contract method 0x7cd76b8b. +// +// Solidity: function setDataAvailabilityProtocol(address newDataAvailabilityProtocol) returns() +func (_Eigendaverifier *EigendaverifierSession) SetDataAvailabilityProtocol(newDataAvailabilityProtocol common.Address) (*types.Transaction, error) { + return _Eigendaverifier.Contract.SetDataAvailabilityProtocol(&_Eigendaverifier.TransactOpts, newDataAvailabilityProtocol) +} + +// SetDataAvailabilityProtocol is a paid mutator transaction binding the contract method 0x7cd76b8b. +// +// Solidity: function setDataAvailabilityProtocol(address newDataAvailabilityProtocol) returns() +func (_Eigendaverifier *EigendaverifierTransactorSession) SetDataAvailabilityProtocol(newDataAvailabilityProtocol common.Address) (*types.Transaction, error) { + return _Eigendaverifier.Contract.SetDataAvailabilityProtocol(&_Eigendaverifier.TransactOpts, newDataAvailabilityProtocol) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Eigendaverifier *EigendaverifierTransactor) TransferAdminRole(opts *bind.TransactOpts, newPendingAdmin common.Address) (*types.Transaction, error) { + return _Eigendaverifier.contract.Transact(opts, "transferAdminRole", newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Eigendaverifier *EigendaverifierSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Eigendaverifier.Contract.TransferAdminRole(&_Eigendaverifier.TransactOpts, newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Eigendaverifier *EigendaverifierTransactorSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Eigendaverifier.Contract.TransferAdminRole(&_Eigendaverifier.TransactOpts, newPendingAdmin) +} + +// EigendaverifierAcceptAdminRoleIterator is returned from FilterAcceptAdminRole and is used to iterate over the raw logs and unpacked data for AcceptAdminRole events raised by the Eigendaverifier contract. +type EigendaverifierAcceptAdminRoleIterator struct { + Event *EigendaverifierAcceptAdminRole // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EigendaverifierAcceptAdminRoleIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EigendaverifierAcceptAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EigendaverifierAcceptAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EigendaverifierAcceptAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EigendaverifierAcceptAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EigendaverifierAcceptAdminRole represents a AcceptAdminRole event raised by the Eigendaverifier contract. +type EigendaverifierAcceptAdminRole struct { + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAcceptAdminRole is a free log retrieval operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) FilterAcceptAdminRole(opts *bind.FilterOpts) (*EigendaverifierAcceptAdminRoleIterator, error) { + + logs, sub, err := _Eigendaverifier.contract.FilterLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return &EigendaverifierAcceptAdminRoleIterator{contract: _Eigendaverifier.contract, event: "AcceptAdminRole", logs: logs, sub: sub}, nil +} + +// WatchAcceptAdminRole is a free log subscription operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) WatchAcceptAdminRole(opts *bind.WatchOpts, sink chan<- *EigendaverifierAcceptAdminRole) (event.Subscription, error) { + + logs, sub, err := _Eigendaverifier.contract.WatchLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EigendaverifierAcceptAdminRole) + if err := _Eigendaverifier.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAcceptAdminRole is a log parse operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) ParseAcceptAdminRole(log types.Log) (*EigendaverifierAcceptAdminRole, error) { + event := new(EigendaverifierAcceptAdminRole) + if err := _Eigendaverifier.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EigendaverifierSetDataAvailabilityProtocolIterator is returned from FilterSetDataAvailabilityProtocol and is used to iterate over the raw logs and unpacked data for SetDataAvailabilityProtocol events raised by the Eigendaverifier contract. +type EigendaverifierSetDataAvailabilityProtocolIterator struct { + Event *EigendaverifierSetDataAvailabilityProtocol // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EigendaverifierSetDataAvailabilityProtocolIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EigendaverifierSetDataAvailabilityProtocol) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EigendaverifierSetDataAvailabilityProtocol) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EigendaverifierSetDataAvailabilityProtocolIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EigendaverifierSetDataAvailabilityProtocolIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EigendaverifierSetDataAvailabilityProtocol represents a SetDataAvailabilityProtocol event raised by the Eigendaverifier contract. +type EigendaverifierSetDataAvailabilityProtocol struct { + NewTrustedSequencer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetDataAvailabilityProtocol is a free log retrieval operation binding the contract event 0xd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a. +// +// Solidity: event SetDataAvailabilityProtocol(address newTrustedSequencer) +func (_Eigendaverifier *EigendaverifierFilterer) FilterSetDataAvailabilityProtocol(opts *bind.FilterOpts) (*EigendaverifierSetDataAvailabilityProtocolIterator, error) { + + logs, sub, err := _Eigendaverifier.contract.FilterLogs(opts, "SetDataAvailabilityProtocol") + if err != nil { + return nil, err + } + return &EigendaverifierSetDataAvailabilityProtocolIterator{contract: _Eigendaverifier.contract, event: "SetDataAvailabilityProtocol", logs: logs, sub: sub}, nil +} + +// WatchSetDataAvailabilityProtocol is a free log subscription operation binding the contract event 0xd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a. +// +// Solidity: event SetDataAvailabilityProtocol(address newTrustedSequencer) +func (_Eigendaverifier *EigendaverifierFilterer) WatchSetDataAvailabilityProtocol(opts *bind.WatchOpts, sink chan<- *EigendaverifierSetDataAvailabilityProtocol) (event.Subscription, error) { + + logs, sub, err := _Eigendaverifier.contract.WatchLogs(opts, "SetDataAvailabilityProtocol") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EigendaverifierSetDataAvailabilityProtocol) + if err := _Eigendaverifier.contract.UnpackLog(event, "SetDataAvailabilityProtocol", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetDataAvailabilityProtocol is a log parse operation binding the contract event 0xd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a. +// +// Solidity: event SetDataAvailabilityProtocol(address newTrustedSequencer) +func (_Eigendaverifier *EigendaverifierFilterer) ParseSetDataAvailabilityProtocol(log types.Log) (*EigendaverifierSetDataAvailabilityProtocol, error) { + event := new(EigendaverifierSetDataAvailabilityProtocol) + if err := _Eigendaverifier.contract.UnpackLog(event, "SetDataAvailabilityProtocol", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EigendaverifierTransferAdminRoleIterator is returned from FilterTransferAdminRole and is used to iterate over the raw logs and unpacked data for TransferAdminRole events raised by the Eigendaverifier contract. +type EigendaverifierTransferAdminRoleIterator struct { + Event *EigendaverifierTransferAdminRole // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EigendaverifierTransferAdminRoleIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EigendaverifierTransferAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EigendaverifierTransferAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EigendaverifierTransferAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EigendaverifierTransferAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EigendaverifierTransferAdminRole represents a TransferAdminRole event raised by the Eigendaverifier contract. +type EigendaverifierTransferAdminRole struct { + NewPendingAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferAdminRole is a free log retrieval operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) FilterTransferAdminRole(opts *bind.FilterOpts) (*EigendaverifierTransferAdminRoleIterator, error) { + + logs, sub, err := _Eigendaverifier.contract.FilterLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return &EigendaverifierTransferAdminRoleIterator{contract: _Eigendaverifier.contract, event: "TransferAdminRole", logs: logs, sub: sub}, nil +} + +// WatchTransferAdminRole is a free log subscription operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) WatchTransferAdminRole(opts *bind.WatchOpts, sink chan<- *EigendaverifierTransferAdminRole) (event.Subscription, error) { + + logs, sub, err := _Eigendaverifier.contract.WatchLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EigendaverifierTransferAdminRole) + if err := _Eigendaverifier.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransferAdminRole is a log parse operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Eigendaverifier *EigendaverifierFilterer) ParseTransferAdminRole(log types.Log) (*EigendaverifierTransferAdminRole, error) { + event := new(EigendaverifierTransferAdminRole) + if err := _Eigendaverifier.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/script.sh b/etherman/smartcontracts/script.sh index 870a8d98f7..9ac34413ad 100755 --- a/etherman/smartcontracts/script.sh +++ b/etherman/smartcontracts/script.sh @@ -19,4 +19,5 @@ gen polygonzkevmglobalexitroot gen polygonrollupmanager gen mockpolygonrollupmanager gen mockverifier -gen proxy \ No newline at end of file +gen proxy +gen eigendaverifier diff --git a/go.mod b/go.mod index e465b3ebe9..127c64c5f7 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,15 @@ go 1.21 require ( github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1 + github.com/Layr-Labs/eigenda v0.6.2 + github.com/Layr-Labs/eigenda/api v0.6.2 github.com/didip/tollbooth/v6 v6.1.2 github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 - github.com/ethereum/go-ethereum v1.13.11 + github.com/ethereum/go-ethereum v1.13.14 github.com/go-git/go-billy/v5 v5.5.0 github.com/go-git/go-git/v5 v5.11.0 github.com/gobuffalo/packr/v2 v2.8.3 - github.com/google/uuid v1.5.0 + github.com/google/uuid v1.6.0 github.com/habx/pg-commands v0.6.1 github.com/hermeznetwork/tracerr v0.3.2 github.com/iden3/go-iden3-crypto v0.0.15 @@ -19,14 +21,14 @@ require ( github.com/jackc/pgx/v4 v4.18.1 github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/client_model v0.5.0 - github.com/prometheus/common v0.45.0 + github.com/prometheus/common v0.48.0 github.com/rubenv/sql-migrate v1.6.1 github.com/spf13/afero v1.11.0 github.com/spf13/viper v1.18.2 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0 - github.com/urfave/cli/v2 v2.26.0 - go.uber.org/zap v1.26.0 + github.com/urfave/cli/v2 v2.27.1 + go.uber.org/zap v1.27.0 golang.org/x/crypto v0.18.0 golang.org/x/net v0.20.0 golang.org/x/sync v0.6.0 @@ -39,6 +41,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240329221113-a1f7ac9ed7d1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/StackExchange/wmi v1.2.1 // indirect @@ -68,8 +71,9 @@ require ( github.com/dlclark/regexp2 v1.7.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect + github.com/fjl/memsize v0.0.2 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect @@ -90,8 +94,9 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect + github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect @@ -120,7 +125,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/miguelmota/go-solidity-sha3 v0.1.1 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -141,25 +145,28 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 // indirect + github.com/urfave/cli v1.22.14 // indirect github.com/valyala/fastjson v1.6.3 // indirect + github.com/wealdtech/go-merkletree v1.0.1-0.20230205101955-ec7a95ea11ca // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.14.0 // indirect + golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect @@ -183,7 +190,7 @@ require ( github.com/apolloconfig/agollo/v4 v4.0.9 github.com/fatih/color v1.16.0 github.com/nacos-group/nacos-sdk-go v1.1.4 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.0 github.com/segmentio/kafka-go v0.4.47 golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/time v0.5.0 diff --git a/go.sum b/go.sum index 4be01dab15..3a901608b0 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/0xPolygon/cdk-data-availability v0.0.5/go.mod h1:aGwqHiJhL+mJbdepl3s5 github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1 h1:4wbCJOGcZ8BTuOfNFrcZ1cAVfTWaX1W9EYHaDx3imLc= github.com/0xPolygonHermez/zkevm-data-streamer v0.2.3-0.20240426122934-6f47d2485fc1/go.mod h1:0QkAXcFa92mFJrCbN3UPUJGJYes851yEgYHLONnaosE= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -59,6 +59,12 @@ github.com/DATA-DOG/go-sqlmock v1.5.1/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Layr-Labs/eigenda v0.6.2 h1:W8P6DtoaL9eZnqm+l6Ti6nOj1M2xBTjzWsVt2j+CKFk= +github.com/Layr-Labs/eigenda v0.6.2/go.mod h1:XongI0xM6ks66DzxvTpF2yi4x2QH0X2RgEbKl/WFebY= +github.com/Layr-Labs/eigenda/api v0.6.2 h1:ZrHYzdkOAonql+U8TUyR5OUXgciTgI2TEZ0E4koEbBI= +github.com/Layr-Labs/eigenda/api v0.6.2/go.mod h1:kVXqWM13s/1hXyv9QdHweWAbKin9MeOBbS4i8c9rLbU= +github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240329221113-a1f7ac9ed7d1 h1:zzApPt1p63xHV2C1SEu4rsj2BKmZyb3m+7/vKAD2wq8= +github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240329221113-a1f7ac9ed7d1/go.mod h1:HOSNuZcwaKbP4cnNk9c1hK2B2RitcMQ36Xj2msBBBpE= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -185,10 +191,10 @@ github.com/didip/tollbooth/v6 v6.1.2/go.mod h1:xjcse6CTHCLuOkzsWrEgdy9WPJFv+p/x6 github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= @@ -210,15 +216,15 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.11 h1:b51Dsm+rEg7anFRUMGB8hODXHvNfcRKzz9vcj8wSdUs= -github.com/ethereum/go-ethereum v1.13.11/go.mod h1:gFtlVORuUcT+UUIcJ/veCNjkuOSujCi338uSHJrYAew= +github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= +github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -226,6 +232,12 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= +github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA= +github.com/gammazero/deque v0.2.0/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= +github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= +github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -378,8 +390,8 @@ github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8q github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -408,6 +420,8 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -416,8 +430,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hermeznetwork/tracerr v0.3.2 h1:QB3TlQxO/4XHyixsg+nRZPuoel/FFQlQ7oAoHDD5l1c= github.com/hermeznetwork/tracerr v0.3.2/go.mod h1:nsWC1+tc4qUEbUGRv4DcPJJTjLsedlPajlFmpJoohK4= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= @@ -597,8 +611,6 @@ github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOq github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -654,8 +666,8 @@ github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= @@ -682,13 +694,13 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -732,13 +744,16 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 h1:17JxqqJY66GmZVHkmAsGEkcIu0oCe3AM420QDgGwZx0= +github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466/go.mod h1:9dIRpgIY7hVhoqfe0/FcYp0bpInZaT7dc3BYOprrIUE= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -775,8 +790,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -787,8 +803,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -814,8 +831,10 @@ github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0 h1:wE2g4ydxJk8kdR github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0/go.mod h1:J+OZNfRCtbaYW3AEc0m47GhwAzlNJjcr9vO86nzOr6E= github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 h1:10Nbw6cACsnQm7r34zlpJky+IzxVLRk6MKTS2d3Vp0E= github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722/go.mod h1:c8J0h9aULj2i3umrfyestM6jCq0LK0U6ly6bWy96nd4= -github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI= -github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= +github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -832,8 +851,12 @@ github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vb github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/wealdtech/go-merkletree v1.0.1-0.20230205101955-ec7a95ea11ca h1:oK35INPN4CiubFw7ZPQkbxm2AsSU6Tjeb9YhciZnvIM= +github.com/wealdtech/go-merkletree v1.0.1-0.20230205101955-ec7a95ea11ca/go.mod h1:bM9mDSjsti+gkjl8FjovMoUH3MPR5bwJ3+ucaYFY0Jk= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -875,8 +898,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -889,8 +912,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -954,8 +977,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=