diff --git a/Dockerfile b/Dockerfile index be4c20ad22..2dfbe5ccb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,18 @@ FROM golang:1.21 AS build # INSTALL DEPENDENCIES RUN go install github.com/gobuffalo/packr/v2/packr2@v2.8.3 COPY go.mod go.sum /src/ +COPY . /src RUN cd /src && go mod download # BUILD BINARY -COPY . /src +#COPY . /src RUN cd /src/db && packr2 -RUN cd /src && make build +RUN cd /src && go mod tidy && make build # CONTAINER FOR RUNNING BINARY FROM alpine:3.18.0 COPY --from=build /src/dist/zkevm-node /app/zkevm-node COPY --from=build /src/config/environments/testnet/node.config.toml /app/example.config.toml -RUN apk update && apk add postgresql15-client +RUN apk update && apk add postgresql15-client && cd /app/ && mkdir logs EXPOSE 8123 CMD ["/bin/sh", "-c", "/app/zkevm-node run"] diff --git a/LICENSE b/LICENSE index 6b7dcd6383..f69c8dbcbd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ Polygon zkEVM Mainnet Beta -Copyright (C) 2023 Catenable AG +Copyright (C) 2024 The Horizen Foundation +Copyright (C) 2023 Catenable AG This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -633,4 +634,4 @@ an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 3764292ce6..2cf5eb4cca 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -20,7 +20,9 @@ import ( ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygonHermez/zkevm-node/nhconnector" "github.com/0xPolygonHermez/zkevm-node/state" + substrateTypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" "google.golang.org/grpc" @@ -43,6 +45,12 @@ type finalProofMsg struct { finalProof *prover.FinalProof } +type finalProofElement struct { + finalProof finalProofMsg + attestationId substrateTypes.U64 + proofValue string +} + // Aggregator represents an aggregator type Aggregator struct { prover.UnimplementedAggregatorServiceServer @@ -61,9 +69,11 @@ type Aggregator struct { finalProof chan finalProofMsg verifyingProof bool - srv *grpc.Server - ctx context.Context - exit context.CancelFunc + srv *grpc.Server + ctx context.Context + exit context.CancelFunc + nhConnector nhconnector.NHConnector + finalProofQueue FinalProofsQueue } // New creates a new aggregator. @@ -72,6 +82,7 @@ func New( stateInterface stateInterface, ethTxManager ethTxManager, etherman etherman, + nhConnector nhconnector.NHConnector, ) (Aggregator, error) { var profitabilityChecker aggregatorTxProfitabilityChecker switch cfg.TxProfitabilityCheckerType { @@ -92,7 +103,9 @@ func New( TimeSendFinalProofMutex: &sync.RWMutex{}, TimeCleanupLockedProofs: cfg.CleanupLockedProofsInterval, - finalProof: make(chan finalProofMsg), + finalProof: make(chan finalProofMsg), + nhConnector: nhConnector, + finalProofQueue: FinalProofsQueue{}, } return a, nil @@ -144,7 +157,7 @@ func (a *Aggregator) Start(ctx context.Context) error { a.resetVerifyProofTime() go a.cleanupLockedProofs() - go a.sendFinalProof() + go a.processVerifiedProof() <-ctx.Done() return ctx.Err() @@ -232,6 +245,89 @@ func (a *Aggregator) Channel(stream prover.AggregatorService_ChannelServer) erro } } +func (a *Aggregator) processVerifiedProof() { + + for { + log.Debug("ProcessVerifiedProof...") + if !a.finalProofQueue.IsEmpty() { + proofToCheck, err := a.finalProofQueue.Peek() + log.Debug("Found proof in queue with attestation id: ", proofToCheck.attestationId) + if err != nil { + log.Errorf("Failed to retrieve the finalProofQueue peek element") + } + isProofValidated, err := a.State.IsAttestationPublishedOnL1(a.ctx, proofToCheck.attestationId, nil) + if isProofValidated { + log.Debug("Proof already validated, move on with sending it!") + a.SendFinalProofv2(proofToCheck) + } + + } + time.Sleep(a.cfg.RetryTime.Duration) + } +} + +func (a *Aggregator) SendFinalProofv2(finalProofElement finalProofElement) { + ctx := a.ctx + proof := finalProofElement.finalProof.recursiveProof + + proofMerklePath := a.nhConnector.GetProofMerklePath(finalProofElement.attestationId, finalProofElement.proofValue) + log.Debug("Proof Merkle Path: ", proofMerklePath) + + log.WithFields("proofId", proof.ProofID, "batches", fmt.Sprintf("%d-%d", proof.BatchNumber, proof.BatchNumberFinal)) + log.Info("Verifying final proof with ethereum smart contract") + + a.startProofVerification() + + finalBatch, err := a.State.GetBatchByNumber(ctx, proof.BatchNumberFinal, nil) + if err != nil { + log.Errorf("Failed to retrieve batch with number [%d]: %v", proof.BatchNumberFinal, err) + a.endProofVerification() + return + } + + inputs := ethmanTypes.FinalProofInputs{ + FinalProof: finalProofElement.finalProof.finalProof, + NewLocalExitRoot: finalBatch.LocalExitRoot.Bytes(), + NewStateRoot: finalBatch.StateRoot.Bytes(), + AttestationId: uint64(finalProofElement.attestationId), + LeafCount: uint64(proofMerklePath.NumberOfLeaves), + LeafIndex: uint64(proofMerklePath.LeafIndex), + MerklePath: proofMerklePath.Proof, + } + + log.Infof("Final proof inputs: NewLocalExitRoot [%#x], NewStateRoot [%#x]", inputs.NewLocalExitRoot, inputs.NewStateRoot) + + // add batch verification to be monitored + sender := common.HexToAddress(a.cfg.SenderAddress) + to, data, err := a.Ethman.BuildTrustedVerifyBatchesTxData(proof.BatchNumber-1, proof.BatchNumberFinal, &inputs) + if err != nil { + log.Errorf("Error estimating batch verification to add to eth tx manager: %v", err) + a.handleFailureToAddVerifyBatchToBeMonitored(ctx, proof) + return + } + monitoredTxID := buildMonitoredTxID(proof.BatchNumber, proof.BatchNumberFinal) + err = a.EthTxManager.Add(ctx, ethTxManagerOwner, monitoredTxID, sender, to, nil, data, a.cfg.GasOffset, nil) + if err != nil { + log := log.WithFields("tx", monitoredTxID) + log.Errorf("Error to add batch verification tx to eth tx manager: %v", err) + a.handleFailureToAddVerifyBatchToBeMonitored(ctx, proof) + return + } + + // process monitored batch verifications before starting a next cycle + a.EthTxManager.ProcessPendingMonitoredTxs(ctx, ethTxManagerOwner, func(result ethtxmanager.MonitoredTxResult, dbTx pgx.Tx) { + a.handleMonitoredTxResult(result) + }, nil) + + a.resetVerifyProofTime() + a.endProofVerification() + proofToDelete, err := a.finalProofQueue.Dequeue() + if err != nil { + log.Errorf("Error in removing proof element from the FinalProofQueue %v", err) + } + a.State.DeletePublishedAttestationIds(ctx, proofToDelete.attestationId, nil) +} + // This function waits to receive a final proof from a prover. Once it receives // the proof, it performs these steps in order: // - send the final proof to L1 @@ -304,8 +400,16 @@ func (a *Aggregator) handleFailureToAddVerifyBatchToBeMonitored(ctx context.Cont a.endProofVerification() } +func (a *Aggregator) sendProofToNH(finalProof *prover.FinalProof) nhconnector.PoeNewElement { + proofVerifiedEvent, err := a.nhConnector.SendProofToNH(finalProof) + if err != nil { + log.Errorf("Error in sending proof to NH: %v", err) + } + return proofVerifiedEvent +} + // buildFinalProof builds and return the final proof for an aggregated/batch proof. -func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (*prover.FinalProof, error) { +func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface, proof *state.Proof) (*prover.FinalProof, nhconnector.PoeNewElement, error) { log := log.WithFields( "prover", prover.Name(), "proverId", prover.ID(), @@ -317,7 +421,7 @@ func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface finalProofID, err := prover.FinalProof(proof.Proof, a.cfg.SenderAddress) if err != nil { - return nil, fmt.Errorf("failed to get final proof id: %w", err) + return nil, nhconnector.PoeNewElement{}, fmt.Errorf("failed to get final proof id: %w", err) } proof.ProofID = finalProofID @@ -326,10 +430,11 @@ func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface finalProof, err := prover.WaitFinalProof(ctx, *proof.ProofID) if err != nil { - return nil, fmt.Errorf("failed to get final proof from prover: %w", err) + return nil, nhconnector.PoeNewElement{}, fmt.Errorf("failed to get final proof from prover: %w", err) } log.Info("Final proof generated") + proofVerifiedEvent := a.sendProofToNH(finalProof) // mock prover sanity check if string(finalProof.Public.NewStateRoot) == mockedStateRoot && string(finalProof.Public.NewLocalExitRoot) == mockedLocalExitRoot { @@ -337,7 +442,7 @@ func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface // prover, use the one captured by the executor instead finalBatch, err := a.State.GetBatchByNumber(ctx, proof.BatchNumberFinal, nil) if err != nil { - return nil, fmt.Errorf("failed to retrieve batch with number [%d]", proof.BatchNumberFinal) + return nil, nhconnector.PoeNewElement{}, fmt.Errorf("failed to retrieve batch with number [%d]", proof.BatchNumberFinal) } log.Warnf("NewLocalExitRoot and NewStateRoot look like a mock values, using values from executor instead: LER: %v, SR: %v", finalBatch.LocalExitRoot.TerminalString(), finalBatch.StateRoot.TerminalString()) @@ -345,7 +450,7 @@ func (a *Aggregator) buildFinalProof(ctx context.Context, prover proverInterface finalProof.Public.NewLocalExitRoot = finalBatch.LocalExitRoot.Bytes() } - return finalProof, nil + return finalProof, proofVerifiedEvent, nil } // tryBuildFinalProof checks if the provided proof is eligible to be used to @@ -427,8 +532,8 @@ func (a *Aggregator) tryBuildFinalProof(ctx context.Context, prover proverInterf ) // at this point we have an eligible proof, build the final one using it - finalProof, err := a.buildFinalProof(ctx, prover, proof) - if err != nil { + finalProof, proofVerifiedEvent, err := a.buildFinalProof(ctx, prover, proof) + if err != nil || proofVerifiedEvent.AttestationId == 0 { err = fmt.Errorf("failed to build final proof, %w", err) log.Error(FirstToUpper(err.Error())) return false, err @@ -440,12 +545,13 @@ func (a *Aggregator) tryBuildFinalProof(ctx context.Context, prover proverInterf recursiveProof: proof, finalProof: finalProof, } + a.finalProofQueue.Enqueue(finalProofElement{finalProof: msg, attestationId: proofVerifiedEvent.AttestationId, proofValue: proofVerifiedEvent.Value.Hex()}) - select { + /*select { case <-a.ctx.Done(): return false, a.ctx.Err() case a.finalProof <- msg: - } + }*/ log.Debug("tryBuildFinalProof end") return true, nil @@ -920,6 +1026,7 @@ func (a *Aggregator) startProofVerification() { // endProofVerification set verifyingProof to false to indicate that there is not proof verification in progress func (a *Aggregator) endProofVerification() { + log.Debug("EndProofVerification...") a.TimeSendFinalProofMutex.Lock() defer a.TimeSendFinalProofMutex.Unlock() a.verifyingProof = false @@ -927,6 +1034,7 @@ func (a *Aggregator) endProofVerification() { // resetVerifyProofTime updates the timeout to verify a proof. func (a *Aggregator) resetVerifyProofTime() { + log.Debug("ResetVerifyProofTime...") a.TimeSendFinalProofMutex.Lock() defer a.TimeSendFinalProofMutex.Unlock() a.TimeSendFinalProof = time.Now().Add(a.cfg.VerifyProofInterval.Duration) diff --git a/aggregator/aggregator_test.go b/aggregator/aggregator_test.go index 9303c44454..205c241818 100644 --- a/aggregator/aggregator_test.go +++ b/aggregator/aggregator_test.go @@ -14,6 +14,7 @@ import ( configTypes "github.com/0xPolygonHermez/zkevm-node/config/types" ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" + "github.com/0xPolygonHermez/zkevm-node/nhconnector" "github.com/0xPolygonHermez/zkevm-node/state" "github.com/0xPolygonHermez/zkevm-node/test/testutils" "github.com/ethereum/go-ethereum/common" @@ -190,7 +191,7 @@ func TestSendFinalProof(t *testing.T) { stateMock := mocks.NewStateMock(t) ethTxManager := mocks.NewEthTxManager(t) etherman := mocks.NewEtherman(t) - a, err := New(cfg, stateMock, ethTxManager, etherman) + a, err := New(cfg, stateMock, ethTxManager, etherman, nhconnector.NHConnector{}) require.NoError(err) a.ctx, a.exit = context.WithCancel(context.Background()) m := mox{ @@ -685,7 +686,7 @@ func TestTryAggregateProofs(t *testing.T) { ethTxManager := mocks.NewEthTxManager(t) etherman := mocks.NewEtherman(t) proverMock := mocks.NewProverMock(t) - a, err := New(cfg, stateMock, ethTxManager, etherman) + a, err := New(cfg, stateMock, ethTxManager, etherman, nhconnector.NHConnector{}) require.NoError(err) aggregatorCtx := context.WithValue(context.Background(), "owner", "aggregator") //nolint:staticcheck a.ctx, a.exit = context.WithCancel(aggregatorCtx) @@ -958,7 +959,7 @@ func TestTryGenerateBatchProof(t *testing.T) { ethTxManager := mocks.NewEthTxManager(t) etherman := mocks.NewEtherman(t) proverMock := mocks.NewProverMock(t) - a, err := New(cfg, stateMock, ethTxManager, etherman) + a, err := New(cfg, stateMock, ethTxManager, etherman, nhconnector.NHConnector{}) require.NoError(err) aggregatorCtx := context.WithValue(context.Background(), "owner", "aggregator") //nolint:staticcheck a.ctx, a.exit = context.WithCancel(aggregatorCtx) @@ -1235,7 +1236,7 @@ func TestTryBuildFinalProof(t *testing.T) { ethTxManager := mocks.NewEthTxManager(t) etherman := mocks.NewEtherman(t) proverMock := mocks.NewProverMock(t) - a, err := New(cfg, stateMock, ethTxManager, etherman) + a, err := New(cfg, stateMock, ethTxManager, etherman, nhconnector.NHConnector{}) require.NoError(err) aggregatorCtx := context.WithValue(context.Background(), "owner", "aggregator") //nolint:staticcheck a.ctx, a.exit = context.WithCancel(aggregatorCtx) @@ -1365,7 +1366,7 @@ func TestIsSynced(t *testing.T) { ethTxManager := mocks.NewEthTxManager(t) etherman := mocks.NewEtherman(t) proverMock := mocks.NewProverMock(t) - a, err := New(cfg, stateMock, ethTxManager, etherman) + a, err := New(cfg, stateMock, ethTxManager, etherman, nhconnector.NHConnector{}) require.NoError(err) aggregatorCtx := context.WithValue(context.Background(), "owner", "aggregator") //nolint:staticcheck a.ctx, a.exit = context.WithCancel(aggregatorCtx) diff --git a/aggregator/interfaces.go b/aggregator/interfaces.go index 8f0bc17cdb..bcc9d6f74f 100644 --- a/aggregator/interfaces.go +++ b/aggregator/interfaces.go @@ -8,6 +8,7 @@ import ( ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" "github.com/0xPolygonHermez/zkevm-node/state" + substrateTypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) @@ -62,4 +63,6 @@ type stateInterface interface { DeleteUngeneratedProofs(ctx context.Context, dbTx pgx.Tx) error CleanupGeneratedProofs(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) error CleanupLockedProofs(ctx context.Context, duration string, dbTx pgx.Tx) (int64, error) + IsAttestationPublishedOnL1(ctx context.Context, attestationId substrateTypes.U64, dbTx pgx.Tx) (bool, error) + DeletePublishedAttestationIds(ctx context.Context, attestationId substrateTypes.U64, dbTx pgx.Tx) error } diff --git a/aggregator/mocks/mock_dbtx.go b/aggregator/mocks/mock_dbtx.go index fab84a2baa..8ad33d476e 100644 --- a/aggregator/mocks/mock_dbtx.go +++ b/aggregator/mocks/mock_dbtx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -283,12 +283,13 @@ func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResult return r0 } -// NewDbTxMock creates a new instance of DbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDbTxMock(t interface { +type mockConstructorTestingTNewDbTxMock interface { mock.TestingT Cleanup(func()) -}) *DbTxMock { +} + +// NewDbTxMock creates a new instance of DbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDbTxMock(t mockConstructorTestingTNewDbTxMock) *DbTxMock { mock := &DbTxMock{} mock.Mock.Test(t) diff --git a/aggregator/mocks/mock_etherman.go b/aggregator/mocks/mock_etherman.go index 0850f326e0..50831aac38 100644 --- a/aggregator/mocks/mock_etherman.go +++ b/aggregator/mocks/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -73,12 +73,13 @@ func (_m *Etherman) GetLatestVerifiedBatchNum() (uint64, error) { return r0, r1 } -// NewEtherman creates a new instance of Etherman. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEtherman(t interface { +type mockConstructorTestingTNewEtherman interface { mock.TestingT Cleanup(func()) -}) *Etherman { +} + +// NewEtherman creates a new instance of Etherman. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEtherman(t mockConstructorTestingTNewEtherman) *Etherman { mock := &Etherman{} mock.Mock.Test(t) diff --git a/aggregator/mocks/mock_ethtxmanager.go b/aggregator/mocks/mock_ethtxmanager.go index 17141e8287..5449a61c5b 100644 --- a/aggregator/mocks/mock_ethtxmanager.go +++ b/aggregator/mocks/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -89,12 +89,13 @@ func (_m *EthTxManager) ResultsByStatus(ctx context.Context, owner string, statu return r0, r1 } -// NewEthTxManager creates a new instance of EthTxManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEthTxManager(t interface { +type mockConstructorTestingTNewEthTxManager interface { mock.TestingT Cleanup(func()) -}) *EthTxManager { +} + +// NewEthTxManager creates a new instance of EthTxManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEthTxManager(t mockConstructorTestingTNewEthTxManager) *EthTxManager { mock := &EthTxManager{} mock.Mock.Test(t) diff --git a/aggregator/mocks/mock_profitabilitychecker.go b/aggregator/mocks/mock_profitabilitychecker.go index af64de9ada..870e791f64 100644 --- a/aggregator/mocks/mock_profitabilitychecker.go +++ b/aggregator/mocks/mock_profitabilitychecker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -38,12 +38,13 @@ func (_m *ProfitabilityCheckerMock) IsProfitable(_a0 context.Context, _a1 *big.I return r0, r1 } -// NewProfitabilityCheckerMock creates a new instance of ProfitabilityCheckerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewProfitabilityCheckerMock(t interface { +type mockConstructorTestingTNewProfitabilityCheckerMock interface { mock.TestingT Cleanup(func()) -}) *ProfitabilityCheckerMock { +} + +// NewProfitabilityCheckerMock creates a new instance of ProfitabilityCheckerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewProfitabilityCheckerMock(t mockConstructorTestingTNewProfitabilityCheckerMock) *ProfitabilityCheckerMock { mock := &ProfitabilityCheckerMock{} mock.Mock.Test(t) diff --git a/aggregator/mocks/mock_prover.go b/aggregator/mocks/mock_prover.go index 0cb86c6059..0e7a01384b 100644 --- a/aggregator/mocks/mock_prover.go +++ b/aggregator/mocks/mock_prover.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -208,12 +208,13 @@ func (_m *ProverMock) WaitRecursiveProof(ctx context.Context, proofID string) (s return r0, r1 } -// NewProverMock creates a new instance of ProverMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewProverMock(t interface { +type mockConstructorTestingTNewProverMock interface { mock.TestingT Cleanup(func()) -}) *ProverMock { +} + +// NewProverMock creates a new instance of ProverMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewProverMock(t mockConstructorTestingTNewProverMock) *ProverMock { mock := &ProverMock{} mock.Mock.Test(t) diff --git a/aggregator/mocks/mock_state.go b/aggregator/mocks/mock_state.go index 7d46130a8a..5b858d0ac9 100644 --- a/aggregator/mocks/mock_state.go +++ b/aggregator/mocks/mock_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( mock "github.com/stretchr/testify/mock" state "github.com/0xPolygonHermez/zkevm-node/state" + + types "github.com/centrifuge/go-substrate-rpc-client/v4/types" ) // StateMock is an autogenerated mock type for the stateInterface type @@ -132,6 +134,20 @@ func (_m *StateMock) DeleteGeneratedProofs(ctx context.Context, batchNumber uint return r0 } +// DeletePublishedAttestationIds provides a mock function with given fields: ctx, attestationId, dbTx +func (_m *StateMock) DeletePublishedAttestationIds(ctx context.Context, attestationId types.U64, dbTx pgx.Tx) error { + ret := _m.Called(ctx, attestationId, dbTx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, types.U64, pgx.Tx) error); ok { + r0 = rf(ctx, attestationId, dbTx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // DeleteUngeneratedProofs provides a mock function with given fields: ctx, dbTx func (_m *StateMock) DeleteUngeneratedProofs(ctx context.Context, dbTx pgx.Tx) error { ret := _m.Called(ctx, dbTx) @@ -285,6 +301,30 @@ func (_m *StateMock) GetVirtualBatchToProve(ctx context.Context, lastVerfiedBatc return r0, r1 } +// IsAttestationPublishedOnL1 provides a mock function with given fields: ctx, attestationId, dbTx +func (_m *StateMock) IsAttestationPublishedOnL1(ctx context.Context, attestationId types.U64, dbTx pgx.Tx) (bool, error) { + ret := _m.Called(ctx, attestationId, dbTx) + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.U64, pgx.Tx) (bool, error)); ok { + return rf(ctx, attestationId, dbTx) + } + if rf, ok := ret.Get(0).(func(context.Context, types.U64, pgx.Tx) bool); ok { + r0 = rf(ctx, attestationId, dbTx) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, types.U64, pgx.Tx) error); ok { + r1 = rf(ctx, attestationId, dbTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // UpdateGeneratedProof provides a mock function with given fields: ctx, proof, dbTx func (_m *StateMock) UpdateGeneratedProof(ctx context.Context, proof *state.Proof, dbTx pgx.Tx) error { ret := _m.Called(ctx, proof, dbTx) @@ -299,12 +339,13 @@ func (_m *StateMock) UpdateGeneratedProof(ctx context.Context, proof *state.Proo return r0 } -// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStateMock(t interface { +type mockConstructorTestingTNewStateMock interface { mock.TestingT Cleanup(func()) -}) *StateMock { +} + +// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStateMock(t mockConstructorTestingTNewStateMock) *StateMock { mock := &StateMock{} mock.Mock.Test(t) diff --git a/aggregator/prover/aggregator.pb.go b/aggregator/prover/aggregator.pb.go index 1b54fe910f..ac9e3748cc 100644 --- a/aggregator/prover/aggregator.pb.go +++ b/aggregator/prover/aggregator.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.28.1 // protoc v3.21.12 // source: aggregator.proto @@ -1365,14 +1365,16 @@ func (*GetProofResponse_RecursiveProof) isGetProofResponse_Proof() {} // @dev FinalProof // @param {proof} - groth16 proof +// @param {compact_public_input} - compact version of the public inputs to be verified by proof // @param {public} - public circuit inputs type FinalProof struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Proof string `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` - Public *PublicInputsExtended `protobuf:"bytes,2,opt,name=public,proto3" json:"public,omitempty"` + Proof string `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` + Public *PublicInputsExtended `protobuf:"bytes,2,opt,name=public,proto3" json:"public,omitempty"` + CompactPublicInput string `protobuf:"bytes,3,opt,name=compact_public_input,json=compactPublicInput,proto3" json:"compact_public_input,omitempty"` } func (x *FinalProof) Reset() { @@ -1421,6 +1423,13 @@ func (x *FinalProof) GetPublic() *PublicInputsExtended { return nil } +func (x *FinalProof) GetCompactPublicInput() string { + if x != nil { + return x.CompactPublicInput + } + return "" +} + // @dev PublicInputs // @param {old_state_root} // @param {old_acc_input_hash} @@ -1904,91 +1913,95 @@ var file_aggregator_proto_rawDesc = []byte{ 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x06, 0x42, 0x07, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, - 0x66, 0x22, 0x5f, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x22, 0xfc, 0x02, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x6c, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6f, 0x6c, 0x64, - 0x5f, 0x61, 0x63, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6f, 0x6c, 0x64, 0x41, 0x63, 0x63, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x6c, 0x64, 0x5f, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, - 0x6c, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x22, - 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x32, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x32, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x69, - 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x67, 0x6c, - 0x6f, 0x62, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x74, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x22, 0xe2, 0x02, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x65, - 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x73, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x62, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x02, 0x64, 0x62, 0x12, 0x60, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, - 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x73, 0x42, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x1a, 0x35, 0x0a, 0x07, 0x44, 0x62, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x74, - 0x65, 0x63, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfe, 0x01, 0x0a, 0x14, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, - 0x40, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x66, 0x22, 0x91, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6f, 0x66, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6e, 0x65, 0x77, 0x5f, 0x61, - 0x63, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6e, 0x65, 0x77, 0x41, 0x63, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x77, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x10, 0x6e, 0x65, 0x77, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x52, - 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x2a, 0x5c, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x53, 0x55, - 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, - 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x43, 0x68, - 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x39, 0x5a, 0x37, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, 0x6f, 0x6c, 0x79, - 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, 0x76, 0x6d, 0x2d, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, - 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x74, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x5f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0xfc, 0x02, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x6f, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x12, + 0x6f, 0x6c, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6f, 0x6c, 0x64, 0x41, 0x63, 0x63, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x6c, 0x64, + 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x6f, 0x6c, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6b, 0x49, + 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x32, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4c, + 0x32, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0e, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x22, 0xe2, 0x02, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, + 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x64, 0x62, 0x12, 0x60, 0x0a, 0x12, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x76, + 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x74, 0x65, + 0x63, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x73, 0x42, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x1a, 0x35, 0x0a, 0x07, + 0x44, 0x62, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, + 0x42, 0x79, 0x74, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfe, 0x01, 0x0a, 0x14, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, + 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6e, 0x65, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6e, 0x65, + 0x77, 0x5f, 0x61, 0x63, 0x63, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x6e, 0x65, 0x77, 0x41, 0x63, 0x63, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x13, 0x6e, 0x65, 0x77, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x6e, 0x65, 0x77, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x45, 0x78, + 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, + 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x2a, 0x5c, 0x0a, 0x06, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, + 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x19, 0x0a, + 0x15, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, + 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x64, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, + 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x20, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x39, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, + 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, + 0x76, 0x6d, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/aggregator/prover/aggregator_grpc.pb.go b/aggregator/prover/aggregator_grpc.pb.go index c2c1b6ed54..233cdb96c2 100644 --- a/aggregator/prover/aggregator_grpc.pb.go +++ b/aggregator/prover/aggregator_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 -// source: aggregator.proto package prover @@ -15,13 +11,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - AggregatorService_Channel_FullMethodName = "/aggregator.v1.AggregatorService/Channel" -) - // AggregatorServiceClient is the client API for AggregatorService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -38,7 +29,7 @@ func NewAggregatorServiceClient(cc grpc.ClientConnInterface) AggregatorServiceCl } func (c *aggregatorServiceClient) Channel(ctx context.Context, opts ...grpc.CallOption) (AggregatorService_ChannelClient, error) { - stream, err := c.cc.NewStream(ctx, &AggregatorService_ServiceDesc.Streams[0], AggregatorService_Channel_FullMethodName, opts...) + stream, err := c.cc.NewStream(ctx, &_AggregatorService_serviceDesc.Streams[0], "/aggregator.v1.AggregatorService/Channel", opts...) if err != nil { return nil, err } @@ -92,8 +83,8 @@ type UnsafeAggregatorServiceServer interface { mustEmbedUnimplementedAggregatorServiceServer() } -func RegisterAggregatorServiceServer(s grpc.ServiceRegistrar, srv AggregatorServiceServer) { - s.RegisterService(&AggregatorService_ServiceDesc, srv) +func RegisterAggregatorServiceServer(s *grpc.Server, srv AggregatorServiceServer) { + s.RegisterService(&_AggregatorService_serviceDesc, srv) } func _AggregatorService_Channel_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -122,10 +113,7 @@ func (x *aggregatorServiceChannelServer) Recv() (*ProverMessage, error) { return m, nil } -// AggregatorService_ServiceDesc is the grpc.ServiceDesc for AggregatorService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AggregatorService_ServiceDesc = grpc.ServiceDesc{ +var _AggregatorService_serviceDesc = grpc.ServiceDesc{ ServiceName: "aggregator.v1.AggregatorService", HandlerType: (*AggregatorServiceServer)(nil), Methods: []grpc.MethodDesc{}, diff --git a/aggregator/queue.go b/aggregator/queue.go new file mode 100644 index 0000000000..f884f7094e --- /dev/null +++ b/aggregator/queue.go @@ -0,0 +1,43 @@ +package aggregator + +import ( + "errors" + "fmt" +) + +type FinalProofsQueue struct { + FinalProofs []finalProofElement +} + +func (q *FinalProofsQueue) Enqueue(elem finalProofElement) { + q.FinalProofs = append(q.FinalProofs, elem) +} + +func (q *FinalProofsQueue) Dequeue() (finalProofElement, error) { + if q.IsEmpty() { + fmt.Println("UnderFlow") + return finalProofElement{}, errors.New("empty queue") + } + element := q.FinalProofs[0] + // if q.GetLength() == 1 { + // q.FinalProofs = nil + // return element + // } + q.FinalProofs = q.FinalProofs[1:] + return element, nil // Slice off the element once it is dequeued. +} + +func (q *FinalProofsQueue) GetLength() int { + return len(q.FinalProofs) +} + +func (q *FinalProofsQueue) IsEmpty() bool { + return q.GetLength() == 0 +} + +func (q *FinalProofsQueue) Peek() (finalProofElement, error) { + if q.IsEmpty() { + return finalProofElement{}, errors.New("empty queue") + } + return q.FinalProofs[0], nil +} diff --git a/cmd/run.go b/cmd/run.go index 4bc694f0a2..69271ff0d2 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -29,6 +29,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/log" "github.com/0xPolygonHermez/zkevm-node/merkletree" "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygonHermez/zkevm-node/nhconnector" "github.com/0xPolygonHermez/zkevm-node/pool" "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" "github.com/0xPolygonHermez/zkevm-node/sequencer" @@ -430,7 +431,11 @@ func createSequenceSender(cfg config.Config, pool *pool.Pool, etmStorage *ethtxm } func runAggregator(ctx context.Context, c aggregator.Config, etherman *etherman.Client, ethTxManager *ethtxmanager.Client, st *state.State) { - agg, err := aggregator.New(c, st, ethTxManager, etherman) + nhConnector, err := nhconnector.New() + if err != nil { + log.Fatal(err) + } + agg, err := aggregator.New(c, st, ethTxManager, etherman, nhConnector) if err != nil { log.Fatal(err) } diff --git a/db/migrations/state/0012.sql b/db/migrations/state/0012.sql index 27d0173d8c..04612e67c8 100644 --- a/db/migrations/state/0012.sql +++ b/db/migrations/state/0012.sql @@ -2,7 +2,13 @@ ALTER TABLE state.monitored_txs ADD COLUMN gas_offset DECIMAL(78, 0) NOT NULL DEFAULT 0; ALTER TABLE state.monitored_txs ALTER COLUMN gas_offset DROP DEFAULT; +CREATE TABLE IF NOT EXISTS state.attestation_id +( + attestation_id BIGINT NOT NULL PRIMARY KEY, + block_num BIGINT NOT NULL REFERENCES state.block (block_num) ON DELETE CASCADE +); -- +migrate Down ALTER TABLE state.monitored_txs - DROP COLUMN gas_offset; \ No newline at end of file + DROP COLUMN gas_offset; +DROP TABLE IF EXISTS state.attestation_id; \ No newline at end of file diff --git a/etherman/etherman.go b/etherman/etherman.go index 54dbd5bf22..a903e43e9e 100644 --- a/etherman/etherman.go +++ b/etherman/etherman.go @@ -19,9 +19,11 @@ import ( "github.com/0xPolygonHermez/zkevm-node/etherman/metrics" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/cdkdatacommittee" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" + "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/newhorizenproofverifier" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" + "github.com/0xPolygonHermez/zkevm-node/hex" "github.com/0xPolygonHermez/zkevm-node/log" "github.com/0xPolygonHermez/zkevm-node/state" "github.com/0xPolygonHermez/zkevm-node/test/operations" @@ -63,6 +65,7 @@ var ( acceptAdminRoleSignatureHash = crypto.Keccak256Hash([]byte("AcceptAdminRole(address)")) proveNonDeterministicPendingStateSignatureHash = crypto.Keccak256Hash([]byte("ProveNonDeterministicPendingState(bytes32,bytes32)")) overridePendingStateSignatureHash = crypto.Keccak256Hash([]byte("OverridePendingState(uint64,bytes32,address)")) + addAttestation = crypto.Keccak256Hash([]byte("AttestationPosted(uint256,bytes32)")) // Proxy events initializedSignatureHash = crypto.Keccak256Hash([]byte("Initialized(uint8)")) @@ -101,6 +104,8 @@ const ( SequenceForceBatchesOrder EventOrder = "SequenceForceBatches" // ForkIDsOrder identifies an updateZkevmVersion event ForkIDsOrder EventOrder = "forkIDs" + // AddAttestationOrder indentifies an addAttestation event + AddAttestationOrder EventOrder = "addAttestation" ) type ethereumClient interface { @@ -128,6 +133,8 @@ type L1Config struct { GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"` // Address of the data availability committee contract DataCommitteeAddr common.Address `json:"cdkDataCommitteeContract"` + // Address of the NewHorizenProofVerifier contract + NewHorizenProofVerifierAddr common.Address `json:"newHorizenProofVerifierContract"` } type externalGasProviders struct { @@ -137,12 +144,13 @@ type externalGasProviders struct { // Client is a simple implementation of EtherMan. type Client struct { - EthClient ethereumClient - ZkEVM *polygonzkevm.Polygonzkevm - GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot - Matic *matic.Matic - DataCommittee *cdkdatacommittee.Cdkdatacommittee - SCAddresses []common.Address + EthClient ethereumClient + ZkEVM *polygonzkevm.Polygonzkevm + GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot + Matic *matic.Matic + DataCommittee *cdkdatacommittee.Cdkdatacommittee + NewHorizenProofVerifier *newhorizenproofverifier.Newhorizenproofverifier + SCAddresses []common.Address GasProviders externalGasProviders @@ -176,8 +184,13 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { if err != nil { return nil, err } + newhorizenproofverifier, err := newhorizenproofverifier.NewNewhorizenproofverifier(l1Config.NewHorizenProofVerifierAddr, ethClient) + if err != nil { + return nil, err + } + var scAddresses []common.Address - scAddresses = append(scAddresses, l1Config.ZkEVMAddr, l1Config.GlobalExitRootManagerAddr) + scAddresses = append(scAddresses, l1Config.ZkEVMAddr, l1Config.GlobalExitRootManagerAddr, l1Config.NewHorizenProofVerifierAddr) gProviders := []ethereum.GasPricer{ethClient} if cfg.MultiGasProvider { @@ -192,12 +205,13 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { metrics.Register() return &Client{ - EthClient: ethClient, - ZkEVM: poe, - Matic: matic, - GlobalExitRootManager: globalExitRoot, - DataCommittee: dataCommittee, - SCAddresses: scAddresses, + EthClient: ethClient, + ZkEVM: poe, + Matic: matic, + GlobalExitRootManager: globalExitRoot, + DataCommittee: dataCommittee, + SCAddresses: scAddresses, + NewHorizenProofVerifier: newhorizenproofverifier, GasProviders: externalGasProviders{ MultiGasProvider: cfg.MultiGasProvider, Providers: gProviders, @@ -427,6 +441,9 @@ func (etherMan *Client) processEvent(ctx context.Context, vLog types.Log, blocks case overridePendingStateSignatureHash: log.Debug("OverridePendingState event detected") return nil + case addAttestation: + log.Debug("addAttestation event detected") + return etherMan.addAttestationEvent(ctx, vLog, blocks, blocksOrder) } log.Warn("Event not registered: ", vLog) return nil @@ -606,13 +623,27 @@ func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVe var newStateRoot [32]byte copy(newStateRoot[:], inputs.NewStateRoot) - proof, err := convertProof(inputs.FinalProof.Proof) - if err != nil { - log.Errorf("error converting proof. Error: %v, Proof: %s", err, inputs.FinalProof.Proof) - return nil, nil, err + const pendStateNum = 0 // TODO hardcoded for now until we implement the pending state feature + var merklePath [][32]byte + var hexLeaf [32]byte + for _, element := range inputs.MerklePath { + hex, err := hex.DecodeHex(element) + if err != nil { + log.Error("Failed to convert the MerklePath to bytes: ", element) + } + copy(hexLeaf[:], hex) + merklePath = append(merklePath, hexLeaf) } - const pendStateNum = 0 // TODO hardcoded for now until we implement the pending state feature + // NH Verification request struct + nhVerificationRequest := polygonzkevm.CDKValidiumNewHorizenVerificationRequest{ + AttestationId: new(big.Int).SetUint64(inputs.AttestationId), + MerklePath: merklePath, + LeafCount: new(big.Int).SetUint64(inputs.LeafCount), + Index: new(big.Int).SetUint64(inputs.LeafIndex), + } + + fmt.Printf("NH VERIFICATION REUEST %+v\n", nhVerificationRequest) tx, err := etherMan.ZkEVM.VerifyBatchesTrustedAggregator( &opts, @@ -621,7 +652,7 @@ func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVe newVerifiedBatch, newLocalExitRoot, newStateRoot, - proof, + nhVerificationRequest, ) if err != nil { if parsedErr, ok := tryParseError(err); ok { @@ -953,6 +984,40 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence return sequencedForcedBatches, nil } +func (etherMan *Client) addAttestationEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { + log.Debug("addAttestation event detected") + amr, err := etherMan.NewHorizenProofVerifier.ParseAttestationPosted(vLog) + if err != nil { + return err + } + attestation := Attestation{ + AttestationId: amr.AttestationId.Uint64(), + MerkleRoot: amr.ProofsAttestation, + } + + if len(*blocks) == 0 || ((*blocks)[len(*blocks)-1].BlockHash != vLog.BlockHash || (*blocks)[len(*blocks)-1].BlockNumber != vLog.BlockNumber) { + fullBlock, err := etherMan.EthClient.BlockByHash(ctx, vLog.BlockHash) + if err != nil { + return fmt.Errorf("error getting hashParent. BlockNumber: %d. Error: %w", vLog.BlockNumber, err) + } + t := time.Unix(int64(fullBlock.Time()), 0) + block := prepareBlock(vLog, t, fullBlock) + block.Attestation = append(block.Attestation, attestation) + *blocks = append(*blocks, block) + } else if (*blocks)[len(*blocks)-1].BlockHash == vLog.BlockHash && (*blocks)[len(*blocks)-1].BlockNumber == vLog.BlockNumber { + (*blocks)[len(*blocks)-1].Attestation = append((*blocks)[len(*blocks)-1].Attestation, attestation) + } else { + log.Error("Error processing addAttestationEvent event. BlockHash:", vLog.BlockHash, ". BlockNumber: ", vLog.BlockNumber) + return fmt.Errorf("error processing addAttestationEvent event") + } + or := Order{ + Name: AddAttestationOrder, + Pos: len((*blocks)[len(*blocks)-1].Attestation) - 1, + } + (*blocksOrder)[(*blocks)[len(*blocks)-1].BlockHash] = append((*blocksOrder)[(*blocks)[len(*blocks)-1].BlockHash], or) + return nil +} + func prepareBlock(vLog types.Log, t time.Time, fullBlock *types.Block) Block { var block Block block.BlockNumber = vLog.BlockNumber diff --git a/etherman/mock_etherscan.go b/etherman/mock_etherscan.go index 1cdf7e0a41..d8e3820968 100644 --- a/etherman/mock_etherscan.go +++ b/etherman/mock_etherscan.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package etherman @@ -40,12 +40,13 @@ func (_m *etherscanMock) SuggestGasPrice(ctx context.Context) (*big.Int, error) return r0, r1 } -// newEtherscanMock creates a new instance of etherscanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEtherscanMock(t interface { +type mockConstructorTestingTnewEtherscanMock interface { mock.TestingT Cleanup(func()) -}) *etherscanMock { +} + +// newEtherscanMock creates a new instance of etherscanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEtherscanMock(t mockConstructorTestingTnewEtherscanMock) *etherscanMock { mock := ðerscanMock{} mock.Mock.Test(t) diff --git a/etherman/mock_ethgasstation.go b/etherman/mock_ethgasstation.go index 6e11f8520b..ee9f1d5cba 100644 --- a/etherman/mock_ethgasstation.go +++ b/etherman/mock_ethgasstation.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package etherman @@ -40,12 +40,13 @@ func (_m *ethGasStationMock) SuggestGasPrice(ctx context.Context) (*big.Int, err return r0, r1 } -// newEthGasStationMock creates a new instance of ethGasStationMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEthGasStationMock(t interface { +type mockConstructorTestingTnewEthGasStationMock interface { mock.TestingT Cleanup(func()) -}) *ethGasStationMock { +} + +// newEthGasStationMock creates a new instance of ethGasStationMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEthGasStationMock(t mockConstructorTestingTnewEthGasStationMock) *ethGasStationMock { mock := ðGasStationMock{} mock.Mock.Test(t) diff --git a/etherman/smartcontracts/abi/newhorizenproofverifier.abi b/etherman/smartcontracts/abi/newhorizenproofverifier.abi new file mode 100644 index 0000000000..9ca6aa1aa3 --- /dev/null +++ b/etherman/smartcontracts/abi/newhorizenproofverifier.abi @@ -0,0 +1,396 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "IndexOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAttestation", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBatchCounts", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerCannotRenounce", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_attestationId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_proofsAttestation", + "type": "bytes32" + } + ], + "name": "AttestationPosted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "flipIsEnforcingSequentialAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isEnforcingSequentialAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestAttestationId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proofsAttestations", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_proofsAttestation", + "type": "bytes32" + } + ], + "name": "submitAttestation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_attestationIds", + "type": "uint256[]" + }, + { + "internalType": "bytes32[]", + "name": "_proofsAttestation", + "type": "bytes32[]" + } + ], + "name": "submitAttestationBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_leaf", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "_merklePath", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "_leafCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "verifyProofAttestation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/polygonzkevm.abi b/etherman/smartcontracts/abi/polygonzkevm.abi index 6f62f5344b..6692fa4e03 100644 --- a/etherman/smartcontracts/abi/polygonzkevm.abi +++ b/etherman/smartcontracts/abi/polygonzkevm.abi @@ -12,7 +12,7 @@ "type": "address" }, { - "internalType": "contract IVerifierRollup", + "internalType": "contract INewHorizenProofVerifier", "name": "_rollupVerifier", "type": "address" }, @@ -1208,9 +1208,31 @@ "type": "bytes32" }, { - "internalType": "bytes32[24]", - "name": "proof", - "type": "bytes32[24]" + "components": [ + { + "internalType": "uint256", + "name": "attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merklePath", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "leafCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "internalType": "struct CDKValidium.NewHorizenVerificationRequest", + "name": "verificationRequest", + "type": "tuple" } ], "name": "overridePendingState", @@ -1324,9 +1346,31 @@ "type": "bytes32" }, { - "internalType": "bytes32[24]", - "name": "proof", - "type": "bytes32[24]" + "components": [ + { + "internalType": "uint256", + "name": "attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merklePath", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "leafCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "internalType": "struct CDKValidium.NewHorizenVerificationRequest", + "name": "verificationRequest", + "type": "tuple" } ], "name": "proveNonDeterministicPendingState", @@ -1346,7 +1390,7 @@ "name": "rollupVerifier", "outputs": [ { - "internalType": "contract IVerifierRollup", + "internalType": "contract INewHorizenProofVerifier", "name": "", "type": "address" } @@ -1681,9 +1725,31 @@ "type": "bytes32" }, { - "internalType": "bytes32[24]", - "name": "proof", - "type": "bytes32[24]" + "components": [ + { + "internalType": "uint256", + "name": "attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merklePath", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "leafCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "internalType": "struct CDKValidium.NewHorizenVerificationRequest", + "name": "verificationRequest", + "type": "tuple" } ], "name": "verifyBatches", @@ -1719,9 +1785,31 @@ "type": "bytes32" }, { - "internalType": "bytes32[24]", - "name": "proof", - "type": "bytes32[24]" + "components": [ + { + "internalType": "uint256", + "name": "attestationId", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merklePath", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "leafCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "internalType": "struct CDKValidium.NewHorizenVerificationRequest", + "name": "verificationRequest", + "type": "tuple" } ], "name": "verifyBatchesTrustedAggregator", diff --git a/etherman/smartcontracts/bin/newhorizenproofverifier.bin b/etherman/smartcontracts/bin/newhorizenproofverifier.bin new file mode 100644 index 0000000000..b017c03449 --- /dev/null +++ b/etherman/smartcontracts/bin/newhorizenproofverifier.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50604051620013d9380380620013d98339810160408190526100319161010b565b61003c60003361006c565b6100667f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c8261006c565b5061013b565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610107576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556100c63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006020828403121561011d57600080fd5b81516001600160a01b038116811461013457600080fd5b9392505050565b61128e806200014b6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806391d1485411610097578063bd93187c11610066578063bd93187c1461023d578063d547741f1461024a578063ddea78861461025d578063e0fec29a1461027057600080fd5b806391d14854146101aa578063983d2737146101ee578063a217fddf14610215578063b99047df1461021d57600080fd5b806336568abe116100d357806336568abe14610168578063560f3ba41461017b57806357ae920d146101845780636736ec951461019757600080fd5b806301ffc9a7146100fa578063248a9ca3146101225780632f2ff15d14610153575b600080fd5b61010d610108366004610df1565b610278565b60405190151581526020015b60405180910390f35b610145610130366004610e33565b60009081526020819052604090206001015490565b604051908152602001610119565b610166610161366004610e4c565b610311565b005b610166610176366004610e4c565b61033b565b61014560015481565b610166610192366004610ee1565b610380565b6101666101a5366004610f4d565b610559565b61010d6101b8366004610e4c565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101457f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c81565b610145600081565b61014561022b366004610e33565b60026020526000908152604090205481565b60035461010d9060ff1681565b610166610258366004610e4c565b61061d565b61010d61026b366004610f6f565b610642565b610166610681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061030b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461032c816106de565b61033683836106eb565b505050565b81610372576040517f1d88406500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61037c82826107db565b5050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c6103aa816106de565b8382146103e3576040517f73d99d3700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460035485919060ff161561046e5760005b8281101561046c5761040a816001611003565b6104149083611003565b88888381811061042657610426611016565b9050602002013514610464576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001016103f7565b505b60005b828110156105275785858281811061048b5761048b611016565b90506020020135600260008a8a858181106104a8576104a8611016565b905060200201358152602001908152602001600020819055508585828181106104d3576104d3611016565b905060200201358888838181106104ec576104ec611016565b905060200201357fe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de487860405160405180910390a3600101610471565b508686610535600182611045565b81811061054457610544611016565b60200291909101356001555050505050505050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c610583816106de565b60035460ff1680156105a157506001805461059d91611003565b8314155b156105d8576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183905560008381526002602052604080822084905551839185917fe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de48789190a3505050565b600082815260208190526040902060010154610638816106de565b610336838361088b565b600060015487111561065657506000610677565b60008781526002602052604090205461067381878787878c610942565b9150505b9695505050505050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c6106ab816106de565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6106e88133610ad0565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661037c5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561077d3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b73ffffffffffffffffffffffffffffffffffffffff81163314610885576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61037c82825b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561037c5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600083831061097d576040517f4e23d03500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260405160200161099291815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209050838560005b88811015610ac05760008a8a838181106109eb576109eb611016565b905060200201359050600284610a019190611087565b60011480610a18575082610a16856001611003565b145b15610a4e576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450610a7b565b60408051602081018790529081018290526060016040516020818303038152906040528051906020012094505b610a8660028561109b565b93506002610a95600185611045565b610a9f919061109b565b610aaa906001611003565b9250508080610ab8906110af565b9150506109cf565b5050509096149695505050505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661037c57610b0e81610b88565b610b19836020610ba7565b604051602001610b2a92919061110b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261087c9160040161118c565b606061030b73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610bb68360026111dd565b610bc1906002611003565b67ffffffffffffffff811115610bd957610bd96111f4565b6040519080825280601f01601f191660200182016040528015610c03576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610c3a57610c3a611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c9d57610c9d611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610cd98460026111dd565b610ce4906001611003565b90505b6001811115610d81577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610d2557610d25611016565b1a60f81b828281518110610d3b57610d3b611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610d7a81611223565b9050610ce7565b508315610dea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161087c565b9392505050565b600060208284031215610e0357600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610dea57600080fd5b600060208284031215610e4557600080fd5b5035919050565b60008060408385031215610e5f57600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff81168114610e8a57600080fd5b809150509250929050565b60008083601f840112610ea757600080fd5b50813567ffffffffffffffff811115610ebf57600080fd5b6020830191508360208260051b8501011115610eda57600080fd5b9250929050565b60008060008060408587031215610ef757600080fd5b843567ffffffffffffffff80821115610f0f57600080fd5b610f1b88838901610e95565b90965094506020870135915080821115610f3457600080fd5b50610f4187828801610e95565b95989497509550505050565b60008060408385031215610f6057600080fd5b50508035926020909101359150565b60008060008060008060a08789031215610f8857600080fd5b8635955060208701359450604087013567ffffffffffffffff811115610fad57600080fd5b610fb989828a01610e95565b979a9699509760608101359660809091013595509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8181038181111561030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261109657611096611058565b500690565b6000826110aa576110aa611058565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110e0576110e0610fd4565b5060010190565b60005b838110156111025781810151838201526020016110ea565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111438160178501602088016110e7565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111808160288401602088016110e7565b01602801949350505050565b60208152600082518060208401526111ab8160408501602087016110e7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b808202811582820484141761030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008161123257611232610fd4565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220adcee907f87793daf50397db38deca3628000a6693a39cfbc0703c2646a3530b64736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/polygonzkevm.bin b/etherman/smartcontracts/bin/polygonzkevm.bin index 2999c3900f..07537f0b52 100644 --- a/etherman/smartcontracts/bin/polygonzkevm.bin +++ b/etherman/smartcontracts/bin/polygonzkevm.bin @@ -1 +1 @@ -6101606040523480156200001257600080fd5b5060405162006185380380620061858339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e051610100516101205161014051615f566200022f600039600081816106c801528181610e1e015261321b0152600081816108350152610df40152600081816105d301526119a00152600081816107fb01528181611bf0015281816138b40152614d300152600081816109a101528181610f91015281816111620152818161177b0152818161220f01528181613a9c015261498d015260008181610a4e0152818161415901526145b10152600081816108f101528181611bbe0152818161270001528181613a7001526142470152615f566000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063837a4738116101ff578063c754c7ed1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e7a7ed0214610a19578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d2e129f9116100e9578063d2e129f9146109c3578063d8d1091b146109d6578063d939b315146109e9578063dbc1697614610a1157600080fd5b8063c754c7ed1461092e578063c89e42df1461095a578063cfa8ed471461096d578063d02103ca1461099c57600080fd5b8063a3c573eb11610192578063b4d63f5811610161578063b4d63f5814610885578063b6b0b097146108ec578063ba58ae3914610913578063c0ed84e01461092657600080fd5b8063a3c573eb146107f6578063ada8f9191461081d578063adc879e914610830578063afd23cbe1461085757600080fd5b806399f5634e116101ce57806399f5634e146107b55780639aa972a3146107bd5780639c9f3dfe146107d0578063a066215c146107e357600080fd5b8063837a4738146106ea578063841b24d71461075f5780638c3d73011461078f5780638da5cb5b1461079757600080fd5b8063458c0477116102ef5780636046916911610282578063715018a611610251578063715018a6146106945780637215541a1461069c5780637fcb3653146106af578063831c7ead146106c357600080fd5b80636046916914610646578063621dd4111461064e5780636b8616ce146106615780636ff512cc1461068157600080fd5b80634e487706116102be5780634e487706146105f55780635392c5e014610608578063542028d5146106365780635ec919581461063e57600080fd5b8063458c0477146105875780634a1a89a71461059b5780634a910e6a146105bb5780634df61d24146105ce57600080fd5b80632987898311610367578063394218e911610336578063394218e914610519578063423fa8561461052c578063438a53991461054c578063456052671461055f57600080fd5b806329878983146104b45780632b0006fa146104e05780632c1f816a146104f3578063383b3be81461050657600080fd5b80631816b7e5116103a35780631816b7e51461043357806319d8ac6114610448578063220d78991461045c578063267822471461046f57600080fd5b80630a0d9fbe146103ca578063107bf28c1461040157806315064c9614610416575b600080fd5b606f546103e390610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b610409610aff565b6040516103f8919061535c565b606f546104239060ff1681565b60405190151581526020016103f8565b610446610441366004615376565b610b8d565b005b6073546103e39067ffffffffffffffff1681565b61040961046a3660046153b2565b610ca5565b607b5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103f8565b60745461048f9068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104466104ee366004615417565b610e7c565b61044661050136600461547f565b61104c565b6104236105143660046154f9565b61125a565b6104466105273660046154f9565b6112b0565b6073546103e39068010000000000000000900467ffffffffffffffff1681565b61044661055a366004615581565b611434565b6073546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103e39067ffffffffffffffff1681565b6079546103e39068010000000000000000900467ffffffffffffffff1681565b6104466105c93660046154f9565b611cb1565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466106033660046154f9565b611d64565b6106286106163660046154f9565b60756020526000908152604090205481565b6040519081526020016103f8565b610409611ee8565b610446611ef5565b610628611ff5565b61044661065c366004615417565b61200b565b61062861066f3660046154f9565b60716020526000908152604090205481565b61044661068f366004615633565b612393565b610446612468565b6104466106aa3660046154f9565b61247c565b6074546103e39067ffffffffffffffff1681565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b6107336106f836600461564e565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016103f8565b6079546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104466125ec565b60335473ffffffffffffffffffffffffffffffffffffffff1661048f565b6106286126b8565b6104466107cb36600461547f565b612811565b6104466107de3660046154f9565b6128c2565b6104466107f13660046154f9565b612a3e565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61044661082b366004615633565b612b44565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b606f54610872906901000000000000000000900461ffff1681565b60405161ffff90911681526020016103f8565b6108c66108933660046154f9565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016103f8565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61042361092136600461564e565b612c08565b6103e3612c92565b607b546103e39074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b61044661096836600461574a565b612ce7565b606f5461048f906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466109d136600461577f565b612d74565b6104466109e4366004615832565b6132bf565b6079546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b610446613861565b6073546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b610446610a7e3660046158a7565b61393a565b607b54610423907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b610446610abe366004615633565b613d30565b610446610ad1366004615633565b613e02565b607a5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b61062860705481565b60778054610b0c906158f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b38906158f3565b8015610b855780601f10610b5a57610100808354040283529160200191610b85565b820191906000526020600020905b815481529060010190602001808311610b6857829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610bde576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610bf757506103ff8161ffff16115b15610c2e576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610cd9575081155b15610d10576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610d47576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d5084612c08565b610d86576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ed9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee7868686868686613eb6565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610f6257607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610fea57600080fd5b505af1158015610ffe573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020015b60405180910390a3505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146110a9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b88787878787878761427a565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561113357607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60795467ffffffffffffffff8281166000908152607860205260408120549092429261129e9270010000000000000000000000000000000090920481169116615975565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611301576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611348576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166113b75760795467ffffffffffffffff78010000000000000000000000000000000000000000000000009091048116908216106113b7576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610c9a565b606f5460ff1615611471576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146114d1576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600081900361150d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8811115611549576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156119625760008c8c838181106115b1576115b161599d565b9050608002018036038101906115c791906159cc565b606081015190915067ffffffffffffffff161561173857846115e881615a3d565b955050600081600001518260200151836060015160405160200161164493929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146116cd576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611732576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611836565b6020810151158015906117ff575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190615a64565b155b15611836576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff161080611869575042816040015167ffffffffffffffff16115b156118a0576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e60405160200161192f9594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061195a90615a7d565b915050611595565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906119d99085908c908c90600401615afe565b60006040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050508584611a159190615975565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611a7e576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a8a8285615b21565b611a9e9067ffffffffffffffff1688615b42565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c8416911617930292909217905590915082811690851614611b9457607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611be6333083607054611ba79190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169291906146b4565b611bee614796565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c5657600080fd5b505af1158015611c6a573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611d5857606f5460ff1615611d19576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d228161125a565b611d58576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d6181614843565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611db5576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611dfc576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611e6757607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611e67576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610c9a565b60768054610b0c906158f3565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611f46576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611fa2576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b600060705460646120069190615b55565b905090565b606f5460ff1615612048576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff858116600090815260726020526040902060010154429261209592780100000000000000000000000000000000000000000000000090910481169116615975565b67ffffffffffffffff1611156120d7576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e86120e48686615b21565b67ffffffffffffffff161115612126576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612134868686868686613eb6565b61213d84614a56565b607954700100000000000000000000000000000000900467ffffffffffffffff1660000361228557607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff868116918217909255600090815260756020526040902083905560795416156121e057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561226857600080fd5b505af115801561227c573d6000803e3d6000fd5b50505050612355565b61228d614796565b6079805467ffffffffffffffff169060006122a783615a3d565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f59669060200161103c565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146123e4576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610c9a565b612470614c36565b61247a6000614cb7565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146125e45760006124a5612c92565b90508067ffffffffffffffff168267ffffffffffffffff16116124f4576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000009091048116908316118061253a575067ffffffffffffffff80831660009081526072602052604090206001015416155b15612571576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916125a09162093a809116615975565b67ffffffffffffffff1611156125e2576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611d61614d2e565b607b5473ffffffffffffffffffffffffffffffffffffffff16331461263d576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276b9190615a64565b90506000612777612c92565b60735467ffffffffffffffff6801000000000000000082048116916127cf9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615b21565b6127d99190615975565b6127e39190615b21565b67ffffffffffffffff169050806000036128005760009250505090565b61280a8183615b9b565b9250505090565b606f5460ff161561284e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61285d8787878787878761427a565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a16128b9614d2e565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612913576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561295a576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166129c15760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106129c1576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612a8f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612ad6576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b95576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610c9a565b600067ffffffff0000000167ffffffffffffffff8316108015612c40575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612c61575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612c78575067ffffffff0000000160c083901c105b15612c8557506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612cd6575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612d38576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612d448282615bfd565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610c9a919061535c565b600054610100900460ff1615808015612d945750600054600160ff909116105b80612dae5750303b158015612dae575060005460ff166001145b612e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612e9d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612eaa6020880188615633565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612eff6040880160208901615633565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612f646080880160608901615633565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612fef8682615bfd565b506077612ffc8582615bfd565b5062093a806130116060890160408a016154f9565b67ffffffffffffffff161115613053576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61306360608801604089016154f9565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a806130c560a0890160808a016154f9565b67ffffffffffffffff161115613107576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61311760a08801608089016154f9565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c01000000000006978000000000000000000000000000000000000000001790556131f6614db6565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f0000000000000000000000000000000000000000000000000000000000000000858560405161324c9493929190615d17565b60405180910390a180156128b957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff161561331c576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613359576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819003613395576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88111156133d1576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff7801000000000000000000000000000000000000000000000000820481169161341c918491700100000000000000000000000000000000900416615d4f565b1115613454576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b848110156136fe5760008787838181106134b4576134b461599d565b90506020028101906134c69190615d62565b6134cf90615da0565b9050836134db81615a3d565b8251805160209182012081850151604080870151905194995091945060009361353d9386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146135c6576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff86166000908152607160205260408120556135eb600189615b42565b840361365a5742607b60149054906101000a900467ffffffffffffffff1684604001516136189190615975565b67ffffffffffffffff16111561365a576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c0160405160208183030381529060405280519060200120945050505080806136f690615a7d565b915050613498565b506137098484615975565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146138b2576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561391a57600080fd5b505af115801561392e573d6000803e3d6000fd5b5050505061247a614e56565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613997576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139d4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139de611ff5565b905081811115613a1a576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a56576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a9873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163330846146b4565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b299190615a64565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6383615a3d565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613b9a929190615e30565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cca57607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d29565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d209493929190615e40565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d81576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610c9a565b613e0a614c36565b73ffffffffffffffffffffffffffffffffffffffff8116613ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612e36565b611d6181614cb7565b600080613ec1612c92565b905067ffffffffffffffff881615613f915760795467ffffffffffffffff9081169089161115613f1d576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8089166000908152607860205260409020600281015481549094509091898116680100000000000000009092041614613f8b576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614032565b67ffffffffffffffff8716600090815260756020526040902054915081613fe4576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff161115614032576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff161161407f576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061408e8888888689610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516140c39190615e76565b602060405180830381855afa1580156140e0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906141039190615a64565b61410d9190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a9161418f91899190600401615e9c565b602060405180830381865afa1580156141ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d09190615ed7565b614206576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61426e33614214858b615b21565b67ffffffffffffffff166142266126b8565b6142309190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190614ee5565b50505050505050505050565b600067ffffffffffffffff8816156143485760795467ffffffffffffffff90811690891611156142d6576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8088166000908152607860205260409020600281015481549092888116680100000000000000009092041614614342576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506143e4565b5067ffffffffffffffff85166000908152607560205260409020548061439a576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff90811690871611156143e4576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061441657508767ffffffffffffffff168767ffffffffffffffff1611155b8061443d575060795467ffffffffffffffff68010000000000000000909104811690881611155b15614474576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8781166000908152607860205260409020546801000000000000000090048116908616146144d7576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006144e68787878588610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161451b9190615e76565b602060405180830381855afa158015614538573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061455b9190615a64565b6145659190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a916145e791889190600401615e9c565b602060405180830381865afa158015614604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146289190615ed7565b61465e576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff891660009081526078602052604090206002015485900361426e576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526147909085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614f40565b50505050565b60795467ffffffffffffffff68010000000000000000820481169116111561247a576079546000906147df9068010000000000000000900467ffffffffffffffff166001615975565b90506147ea8161125a565b15611d615760795460009060029061480d90849067ffffffffffffffff16615b21565b6148179190615ef9565b6148219083615975565b905061482c8161125a565b1561483e5761483a81614843565b5050565b61483a825b60795467ffffffffffffffff68010000000000000000909104811690821611158061487d575060795467ffffffffffffffff908116908216115b156148b4576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156149e657600080fd5b505af11580156149fa573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e8460020154604051614a4991815260200190565b60405180910390a3505050565b6000614a60612c92565b905081600080614a708484615b21565b606f5467ffffffffffffffff9182169250600091614a949161010090041642615b42565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614b1f5767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614afd57600181015468010000000000000000900467ffffffffffffffff169450614b19565b614b078686615b21565b67ffffffffffffffff16935050614b1f565b50614a97565b6000614b2b8484615b42565b905083811015614b8257808403600c8111614b465780614b49565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614b7857614b78615b6c565b0460705550614bf2565b838103600c8111614b935780614b96565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614bcd57614bcd615b6c565b04905080607054670de0b6b3a76400000281614beb57614beb615b6c565b0460705550505b683635c9adc5dea000006070541115614c1757683635c9adc5dea000006070556128b9565b633b9aca0060705410156128b957633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461247a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612e36565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614d9657600080fd5b505af1158015614daa573d6000803e3d6000fd5b5050505061247a61504c565b600054610100900460ff16614e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612e36565b61247a33614cb7565b606f5460ff16614e92576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052614f3b9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161470e565b505050565b6000614fa2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166150df9092919063ffffffff16565b805190915015614f3b5780806020019051810190614fc09190615ed7565b614f3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612e36565b606f5460ff1615615089576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b60606150ee84846000856150f6565b949350505050565b606082471015615188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612e36565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151b19190615e76565b60006040518083038185875af1925050503d80600081146151ee576040519150601f19603f3d011682016040523d82523d6000602084013e6151f3565b606091505b50915091506152048783838761520f565b979650505050505050565b606083156152a557825160000361529e5773ffffffffffffffffffffffffffffffffffffffff85163b61529e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612e36565b50816150ee565b6150ee83838151156152ba5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e36919061535c565b60005b838110156153095781810151838201526020016152f1565b50506000910152565b6000815180845261532a8160208601602086016152ee565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061536f6020830184615312565b9392505050565b60006020828403121561538857600080fd5b813561ffff8116811461536f57600080fd5b803567ffffffffffffffff81168114612c8d57600080fd5b600080600080600060a086880312156153ca57600080fd5b6153d38661539a565b94506153e16020870161539a565b94979496505050506040830135926060810135926080909101359150565b80610300810183101561541157600080fd5b92915050565b6000806000806000806103a0878903121561543157600080fd5b61543a8761539a565b95506154486020880161539a565b94506154566040880161539a565b935060608701359250608087013591506154738860a089016153ff565b90509295509295509295565b60008060008060008060006103c0888a03121561549b57600080fd5b6154a48861539a565b96506154b26020890161539a565b95506154c06040890161539a565b94506154ce6060890161539a565b93506080880135925060a088013591506154eb8960c08a016153ff565b905092959891949750929550565b60006020828403121561550b57600080fd5b61536f8261539a565b803573ffffffffffffffffffffffffffffffffffffffff81168114612c8d57600080fd5b60008083601f84011261554a57600080fd5b50813567ffffffffffffffff81111561556257600080fd5b60208301915083602082850101111561557a57600080fd5b9250929050565b60008060008060006060868803121561559957600080fd5b853567ffffffffffffffff808211156155b157600080fd5b818801915088601f8301126155c557600080fd5b8135818111156155d457600080fd5b8960208260071b85010111156155e957600080fd5b602083019750809650506155ff60208901615514565b9450604088013591508082111561561557600080fd5b5061562288828901615538565b969995985093965092949392505050565b60006020828403121561564557600080fd5b61536f82615514565b60006020828403121561566057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156156b1576156b1615667565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156156f7576156f7615667565b8160405280935085815286868601111561571057600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261573b57600080fd5b61536f83833560208501615696565b60006020828403121561575c57600080fd5b813567ffffffffffffffff81111561577357600080fd5b6150ee8482850161572a565b60008060008060008086880361012081121561579a57600080fd5b60a08112156157a857600080fd5b5086955060a0870135945060c087013567ffffffffffffffff808211156157ce57600080fd5b6157da8a838b0161572a565b955060e08901359150808211156157f057600080fd5b6157fc8a838b0161572a565b945061010089013591508082111561581357600080fd5b5061582089828a01615538565b979a9699509497509295939492505050565b6000806020838503121561584557600080fd5b823567ffffffffffffffff8082111561585d57600080fd5b818501915085601f83011261587157600080fd5b81358181111561588057600080fd5b8660208260051b850101111561589557600080fd5b60209290920196919550909350505050565b6000806000604084860312156158bc57600080fd5b833567ffffffffffffffff8111156158d357600080fd5b6158df86828701615538565b909790965060209590950135949350505050565b600181811c9082168061590757607f821691505b602082108103615940577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff81811683821601908082111561599657615996615946565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000608082840312156159de57600080fd5b6040516080810181811067ffffffffffffffff82111715615a0157615a01615667565b80604052508235815260208301356020820152615a206040840161539a565b6040820152615a316060840161539a565b60608201529392505050565b600067ffffffffffffffff808316818103615a5a57615a5a615946565b6001019392505050565b600060208284031215615a7657600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615aae57615aae615946565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615b18604083018486615ab5565b95945050505050565b67ffffffffffffffff82811682821603908082111561599657615996615946565b8181038181111561541157615411615946565b808202811582820484141761541157615411615946565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615baa57615baa615b6c565b500490565b601f821115614f3b57600081815260208120601f850160051c81016020861015615bd65750805b601f850160051c820191505b81811015615bf557828155600101615be2565b505050505050565b815167ffffffffffffffff811115615c1757615c17615667565b615c2b81615c2584546158f3565b84615baf565b602080601f831160018114615c7e5760008415615c485750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615bf5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615ccb57888601518255948401946001909101908401615cac565b5085821015615d0757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615d45606083018486615ab5565b9695505050505050565b8082018082111561541157615411615946565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615d9657600080fd5b9190910192915050565b600060608236031215615db257600080fd5b6040516060810167ffffffffffffffff8282108183111715615dd657615dd6615667565b816040528435915080821115615deb57600080fd5b50830136601f820112615dfd57600080fd5b615e0c36823560208401615696565b82525060208301356020820152615e256040840161539a565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615d45606083018486615ab5565b60008251615d968184602087016152ee565b600082615e9757615e97615b6c565b500690565b61032081016103008085843782018360005b6001811015615ecd578151835260209283019290910190600101615eae565b5050509392505050565b600060208284031215615ee957600080fd5b8151801515811461536f57600080fd5b600067ffffffffffffffff80841680615f1457615f14615b6c565b9216919091049291505056fea2646970667358221220c54659be0c71b5f48f3f4d4bfee20a108aa9b5b089c2412703866a273f30c4f964736f6c63430008140033 \ No newline at end of file +6101606040523480156200001257600080fd5b5060405162006336380380620063368339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e0516101005161012051610140516161076200022f600039600081816106c80152818161102c015261305701526000818161082201526110020152600081816105c001526117d00152600081816107e801528181611a20015281816136f00152614cfb01526000818161098e01528181610c15015281816115ab0152818161203f0152818161388b01528181613a9c0152614637015260008181610a4e0152818161420701526149bd0152600081816108de015281816119ee015281816125ed01528181613a700152614af201526161076000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063837a4738116101ff578063c89e42df1161011a578063e8920e7d116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e8920e7d14610a36578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d8d1091b116100e9578063d8d1091b146109c3578063d939b315146109d6578063dbc16976146109fe578063e7a7ed0214610a0657600080fd5b8063c89e42df14610947578063cfa8ed471461095a578063d02103ca14610989578063d2e129f9146109b057600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b097146108d9578063ba58ae3914610900578063c0ed84e014610913578063c754c7ed1461091b57600080fd5b8063ada8f9191461080a578063adc879e91461081d578063afd23cbe14610844578063b4d63f581461087257600080fd5b806399f5634e116101ce57806399f5634e146107b55780639c9f3dfe146107bd578063a066215c146107d0578063a3c573eb146107e357600080fd5b8063837a4738146106ea578063841b24d71461075f5780638c3d73011461078f5780638da5cb5b1461079757600080fd5b80634a1a89a7116102ef57806362e533b811610282578063715018a611610251578063715018a6146106945780637215541a1461069c5780637fcb3653146106af578063831c7ead146106c357600080fd5b806362e533b81461063b5780636516dbad1461064e5780636b8616ce146106615780636ff512cc1461068157600080fd5b80635392c5e0116102be5780635392c5e0146105f5578063542028d5146106235780635ec919581461062b578063604691691461063357600080fd5b80634a1a89a7146105885780634a910e6a146105a85780634df61d24146105bb5780634e487706146105e257600080fd5b80632678224711610367578063423fa85611610336578063423fa85614610519578063438a539914610539578063456052671461054c578063458c04771461057457600080fd5b8063267822471461048257806329878983146104c7578063383b3be8146104f3578063394218e91461050657600080fd5b806315064c96116103a357806315064c961461042b5780631816b7e51461044857806319d8ac611461045b578063220d78991461046f57600080fd5b806308adf99a146103ca5780630a0d9fbe146103df578063107bf28c14610416575b600080fd5b6103dd6103d83660046153e1565b610aff565b005b606f546103f890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61041e610d0d565b60405161040d91906154e2565b606f546104389060ff1681565b604051901515815260200161040d565b6103dd6104563660046154fc565b610d9b565b6073546103f89067ffffffffffffffff1681565b61041e61047d366004615520565b610eb3565b607b546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040d565b6074546104a29068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61043861050136600461556d565b61108a565b6103dd61051436600461556d565b6110e0565b6073546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105473660046155f5565b611264565b6073546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103f89067ffffffffffffffff1681565b6079546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105b636600461556d565b611ae1565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6105f036600461556d565b611b94565b61061561060336600461556d565b60756020526000908152604090205481565b60405190815260200161040d565b61041e611d18565b6103dd611d25565b610615611e25565b6103dd6106493660046156a7565b611e3b565b6103dd61065c3660046153e1565b6121cf565b61061561066f36600461556d565b60716020526000908152604090205481565b6103dd61068f366004615728565b612280565b6103dd612355565b6103dd6106aa36600461556d565b612369565b6074546103f89067ffffffffffffffff1681565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b6107336106f8366004615743565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff958616815294909316602085015291830152606082015260800161040d565b6079546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd6124d9565b60335473ffffffffffffffffffffffffffffffffffffffff166104a2565b6106156125a5565b6103dd6107cb36600461556d565b6126fe565b6103dd6107de36600461556d565b61287a565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610818366004615728565b612980565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b606f5461085f906901000000000000000000900461ffff1681565b60405161ffff909116815260200161040d565b6108b361088036600461556d565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff928316602085015291169082015260600161040d565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b61043861090e366004615743565b612a44565b6103f8612ace565b607b546103f89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61095536600461583f565b612b23565b606f546104a2906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6109be366004615874565b612bb0565b6103dd6109d1366004615927565b6130fb565b6079546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61369d565b6073546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd610a443660046156a7565b613776565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610a7e36600461599c565b61393a565b607b54610438907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b6103dd610abe366004615728565b613d30565b6103dd610ad1366004615728565b613e02565b607a546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b61061560705481565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610b5c576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b6b87878787878787613eb6565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610be657607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60778054610d1a906159e8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d46906159e8565b8015610d935780601f10610d6857610100808354040283529160200191610d93565b820191906000526020600020905b815481529060010190602001808311610d7657829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610dec576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610e0557506103ff8161ffff16115b15610e3c576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610ee7575081155b15610f1e576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610f55576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f5e84612a44565b610f94576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60795467ffffffffffffffff828116600090815260786020526040812054909242926110ce9270010000000000000000000000000000000090920481169116615a64565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611131576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611178576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166111e75760795467ffffffffffffffff78010000000000000000000000000000000000000000000000009091048116908216106111e7576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610ea8565b606f5460ff16156112a1576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611301576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600081900361133d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8811115611379576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156117925760008c8c838181106113e1576113e1615a8c565b9050608002018036038101906113f79190615abb565b606081015190915067ffffffffffffffff1615611568578461141881615b2c565b955050600081600001518260200151836060015160405160200161147493929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146114fd576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611562576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611666565b60208101511580159061162f575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af1158015611609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162d9190615b53565b155b15611666576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff161080611699575042816040015167ffffffffffffffff16115b156116d0576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e60405160200161175f9594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061178a90615b6c565b9150506113c5565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906118099085908c908c90600401615bed565b60006040518083038186803b15801561182157600080fd5b505afa158015611835573d6000803e3d6000fd5b5050505085846118459190615a64565b60735490945067ffffffffffffffff7801000000000000000000000000000000000000000000000000909104811690841611156118ae576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118ba8285615c10565b6118ce9067ffffffffffffffff1688615c31565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c84169116179302929092179055909150828116908516146119c457607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611a163330836070546119d79190615c4a565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692919061435e565b611a1e614440565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611a8657600080fd5b505af1158015611a9a573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611b8857606f5460ff1615611b49576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b528161108a565b611b88576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b91816144ed565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611be5576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611c2c576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611c9757607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611c97576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610ea8565b60768054610d1a906159e8565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611d76576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611dd2576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611e369190615c4a565b905090565b606f5460ff1615611e78576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8581166000908152607260205260409020600101544292611ec592780100000000000000000000000000000000000000000000000090910481169116615a64565b67ffffffffffffffff161115611f07576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8611f148686615c10565b67ffffffffffffffff161115611f56576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f64868686868686614700565b611f6d84614b19565b607954700100000000000000000000000000000000900467ffffffffffffffff166000036120b557607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561201057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561209857600080fd5b505af11580156120ac573d6000803e3d6000fd5b50505050612185565b6120bd614440565b6079805467ffffffffffffffff169060006120d783615b2c565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a3505050505050565b606f5460ff161561220c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61221b87878787878787613eb6565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1612277614cf9565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146122d1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610ea8565b61235d614d81565b6123676000614e02565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146124d1576000612392612ace565b90508067ffffffffffffffff168267ffffffffffffffff16116123e1576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000090910481169083161180612427575067ffffffffffffffff80831660009081526072602052604090206001015416155b1561245e576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff808316600090815260726020526040902060010154429161248d9162093a809116615a64565b67ffffffffffffffff1611156124cf576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611b91614cf9565b607b5473ffffffffffffffffffffffffffffffffffffffff16331461252a576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126589190615b53565b90506000612664612ace565b60735467ffffffffffffffff6801000000000000000082048116916126bc9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615c10565b6126c69190615a64565b6126d09190615c10565b67ffffffffffffffff169050806000036126ed5760009250505090565b6126f78183615c90565b9250505090565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461274f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115612796576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166127fd5760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106127fd576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610ea8565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146128cb576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612912576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610ea8565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146129d1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610ea8565b600067ffffffff0000000167ffffffffffffffff8316108015612a7c575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612a9d575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612ab4575067ffffffff0000000160c083901c105b15612ac157506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612b12575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b74576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612b808282615cf2565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610ea891906154e2565b600054610100900460ff1615808015612bd05750600054600160ff909116105b80612bea5750303b158015612bea575060005460ff166001145b612c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612cd957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612ce66020880188615728565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612d3b6040880160208901615728565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612da06080880160608901615728565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612e2b8682615cf2565b506077612e388582615cf2565b5062093a80612e4d6060890160408a0161556d565b67ffffffffffffffff161115612e8f576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e9f606088016040890161556d565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a80612f0160a0890160808a0161556d565b67ffffffffffffffff161115612f43576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f5360a088016080890161556d565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055613032614e79565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516130889493929190615e0c565b60405180910390a1801561227757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613158576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613195576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190036131d1576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561320d576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613258918491700100000000000000000000000000000000900416615e44565b1115613290576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b8481101561353a5760008787838181106132f0576132f0615a8c565b90506020028101906133029190615e57565b61330b90615e95565b90508361331781615b2c565b825180516020918201208185015160408087015190519499509194506000936133799386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8916600090815260719093529120549091508114613402576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8616600090815260716020526040812055613427600189615c31565b84036134965742607b60149054906101000a900467ffffffffffffffff1684604001516134549190615a64565b67ffffffffffffffff161115613496576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c01604051602081830303815290604052805190602001209450505050808061353290615b6c565b9150506132d4565b506135458484615a64565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146136ee576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561375657600080fd5b505af115801561376a573d6000803e3d6000fd5b50505050612367614f19565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146137d3576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6137e1868686868686614700565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561385c57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156138e457600080fd5b505af11580156138f8573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020016121bf565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613997576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139d4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139de611e25565b905081811115613a1a576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a56576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a9873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461435e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b299190615b53565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6383615b2c565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613b9a929190615f25565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cca57607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d29565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d209493929190615f35565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d81576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610ea8565b613e0a614d81565b73ffffffffffffffffffffffffffffffffffffffff8116613ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612c72565b611b9181614e02565b600067ffffffffffffffff881615613f845760795467ffffffffffffffff9081169089161115613f12576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8088166000908152607860205260409020600281015481549092888116680100000000000000009092041614613f7e576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614020565b5067ffffffffffffffff851660009081526075602052604090205480613fd6576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff9081169087161115614020576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061405257508767ffffffffffffffff168767ffffffffffffffff1611155b80614079575060795467ffffffffffffffff68010000000000000000909104811690881611155b156140b0576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff878116600090815260786020526040902054680100000000000000009004811690861614614113576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006141228787878588610eb3565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516141579190615f6b565b602060405180830381855afa158015614174573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906141979190615b53565b6141a19190615f7d565b905060006040518060400160405280600681526020017f66666c6f6e6b0000000000000000000000000000000000000000000000000000815250826040516020016141ed929190615f91565b6040516020818303038152906040528051906020012090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddea78868660000135838880602001906142579190615fb3565b8a604001358b606001356040518763ffffffff1660e01b81526004016142829695949392919061601b565b6020604051808303816000875af11580156142a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142c59190616088565b6142fb576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8a16600090815260786020526040902060020154869003614351576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261443a9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614fa8565b50505050565b60795467ffffffffffffffff680100000000000000008204811691161115612367576079546000906144899068010000000000000000900467ffffffffffffffff166001615a64565b90506144948161108a565b15611b91576079546000906002906144b790849067ffffffffffffffff16615c10565b6144c191906160aa565b6144cb9083615a64565b90506144d68161108a565b156144e8576144e4816144ed565b5050565b6144e4825b60795467ffffffffffffffff680100000000000000009091048116908216111580614527575060795467ffffffffffffffff908116908216115b1561455e576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561469057600080fd5b505af11580156146a4573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e84600201546040516146f391815260200190565b60405180910390a3505050565b60008061470b612ace565b905067ffffffffffffffff8816156147db5760795467ffffffffffffffff9081169089161115614767576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80891660009081526078602052604090206002810154815490945090918981166801000000000000000090920416146147d5576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061487c565b67ffffffffffffffff871660009081526075602052604090205491508161482e576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff16111561487c576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff16116148c9576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006148d88888888689610eb3565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161490d9190615f6b565b602060405180830381855afa15801561492a573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061494d9190615b53565b6149579190615f7d565b905060006040518060400160405280600681526020017f66666c6f6e6b0000000000000000000000000000000000000000000000000000815250826040516020016149a3929190615f91565b6040516020818303038152906040528051906020012090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddea7886876000013583898060200190614a0d9190615fb3565b8b604001358c606001356040518763ffffffff1660e01b8152600401614a389695949392919061601b565b6020604051808303816000875af1158015614a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a7b9190616088565b614ab1576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61435133614abf868c615c10565b67ffffffffffffffff16614ad16125a5565b614adb9190615c4a565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691906150b9565b6000614b23612ace565b905081600080614b338484615c10565b606f5467ffffffffffffffff9182169250600091614b579161010090041642615c31565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614be25767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614bc057600181015468010000000000000000900467ffffffffffffffff169450614bdc565b614bca8686615c10565b67ffffffffffffffff16935050614be2565b50614b5a565b6000614bee8484615c31565b905083811015614c4557808403600c8111614c095780614c0c565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614c3b57614c3b615c61565b0460705550614cb5565b838103600c8111614c565780614c59565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614c9057614c90615c61565b04905080607054670de0b6b3a76400000281614cae57614cae615c61565b0460705550505b683635c9adc5dea000006070541115614cda57683635c9adc5dea00000607055612277565b633b9aca00607054101561227757633b9aca0060705550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614d6157600080fd5b505af1158015614d75573d6000803e3d6000fd5b5050505061236761510f565b60335473ffffffffffffffffffffffffffffffffffffffff163314612367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612c72565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612c72565b61236733614e02565b606f5460ff16614f55576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600061500a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166151a29092919063ffffffff16565b8051909150156150b457808060200190518101906150289190616088565b6150b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612c72565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526150b49084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016143b8565b606f5460ff161561514c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b60606151b184846000856151b9565b949350505050565b60608247101561524b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612c72565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516152749190615f6b565b60006040518083038185875af1925050503d80600081146152b1576040519150601f19603f3d011682016040523d82523d6000602084013e6152b6565b606091505b50915091506152c7878383876152d2565b979650505050505050565b606083156153685782516000036153615773ffffffffffffffffffffffffffffffffffffffff85163b615361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612c72565b50816151b1565b6151b1838381511561537d5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7291906154e2565b803567ffffffffffffffff81168114612ac957600080fd5b6000608082840312156153db57600080fd5b50919050565b600080600080600080600060e0888a0312156153fc57600080fd5b615405886153b1565b9650615413602089016153b1565b9550615421604089016153b1565b945061542f606089016153b1565b93506080880135925060a0880135915060c088013567ffffffffffffffff81111561545957600080fd5b6154658a828b016153c9565b91505092959891949750929550565b60005b8381101561548f578181015183820152602001615477565b50506000910152565b600081518084526154b0816020860160208601615474565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006154f56020830184615498565b9392505050565b60006020828403121561550e57600080fd5b813561ffff811681146154f557600080fd5b600080600080600060a0868803121561553857600080fd5b615541866153b1565b945061554f602087016153b1565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561557f57600080fd5b6154f5826153b1565b803573ffffffffffffffffffffffffffffffffffffffff81168114612ac957600080fd5b60008083601f8401126155be57600080fd5b50813567ffffffffffffffff8111156155d657600080fd5b6020830191508360208285010111156155ee57600080fd5b9250929050565b60008060008060006060868803121561560d57600080fd5b853567ffffffffffffffff8082111561562557600080fd5b818801915088601f83011261563957600080fd5b81358181111561564857600080fd5b8960208260071b850101111561565d57600080fd5b6020830197508096505061567360208901615588565b9450604088013591508082111561568957600080fd5b50615696888289016155ac565b969995985093965092949392505050565b60008060008060008060c087890312156156c057600080fd5b6156c9876153b1565b95506156d7602088016153b1565b94506156e5604088016153b1565b9350606087013592506080870135915060a087013567ffffffffffffffff81111561570f57600080fd5b61571b89828a016153c9565b9150509295509295509295565b60006020828403121561573a57600080fd5b6154f582615588565b60006020828403121561575557600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156157a6576157a661575c565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156157ec576157ec61575c565b8160405280935085815286868601111561580557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261583057600080fd5b6154f58383356020850161578b565b60006020828403121561585157600080fd5b813567ffffffffffffffff81111561586857600080fd5b6151b18482850161581f565b60008060008060008086880361012081121561588f57600080fd5b60a081121561589d57600080fd5b5086955060a0870135945060c087013567ffffffffffffffff808211156158c357600080fd5b6158cf8a838b0161581f565b955060e08901359150808211156158e557600080fd5b6158f18a838b0161581f565b945061010089013591508082111561590857600080fd5b5061591589828a016155ac565b979a9699509497509295939492505050565b6000806020838503121561593a57600080fd5b823567ffffffffffffffff8082111561595257600080fd5b818501915085601f83011261596657600080fd5b81358181111561597557600080fd5b8660208260051b850101111561598a57600080fd5b60209290920196919550909350505050565b6000806000604084860312156159b157600080fd5b833567ffffffffffffffff8111156159c857600080fd5b6159d4868287016155ac565b909790965060209590950135949350505050565b600181811c908216806159fc57607f821691505b6020821081036153db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115615a8557615a85615a35565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808284031215615acd57600080fd5b6040516080810181811067ffffffffffffffff82111715615af057615af061575c565b80604052508235815260208301356020820152615b0f604084016153b1565b6040820152615b20606084016153b1565b60608201529392505050565b600067ffffffffffffffff808316818103615b4957615b49615a35565b6001019392505050565b600060208284031215615b6557600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615b9d57615b9d615a35565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615c07604083018486615ba4565b95945050505050565b67ffffffffffffffff828116828216039080821115615a8557615a85615a35565b81810381811115615c4457615c44615a35565b92915050565b8082028115828204841417615c4457615c44615a35565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615c9f57615c9f615c61565b500490565b601f8211156150b457600081815260208120601f850160051c81016020861015615ccb5750805b601f850160051c820191505b81811015615cea57828155600101615cd7565b505050505050565b815167ffffffffffffffff811115615d0c57615d0c61575c565b615d2081615d1a84546159e8565b84615ca4565b602080601f831160018114615d735760008415615d3d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615cea565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615dc057888601518255948401946001909101908401615da1565b5085821015615dfc57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615e3a606083018486615ba4565b9695505050505050565b80820180821115615c4457615c44615a35565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615e8b57600080fd5b9190910192915050565b600060608236031215615ea757600080fd5b6040516060810167ffffffffffffffff8282108183111715615ecb57615ecb61575c565b816040528435915080821115615ee057600080fd5b50830136601f820112615ef257600080fd5b615f013682356020840161578b565b82525060208301356020820152615f1a604084016153b1565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615e3a606083018486615ba4565b60008251615e8b818460208701615474565b600082615f8c57615f8c615c61565b500690565b60008351615fa3818460208801615474565b9190910191825250602001919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615fe857600080fd5b83018035915067ffffffffffffffff82111561600357600080fd5b6020019150600581901b36038213156155ee57600080fd5b86815285602082015260a060408201528360a082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561606057600080fd5b8460051b808760c085013760608301949094525060808101919091520160c001949350505050565b60006020828403121561609a57600080fd5b815180151581146154f557600080fd5b600067ffffffffffffffff808416806160c5576160c5615c61565b9216919091049291505056fea2646970667358221220ce19e4a1286e22b746deda38345f3b7dabe3afa34ac98a05ea40907a9c5eec1164736f6c63430008140033 \ No newline at end of file diff --git a/etherman/smartcontracts/newhorizenproofverifier/newhorizenproofverifier.go b/etherman/smartcontracts/newhorizenproofverifier/newhorizenproofverifier.go new file mode 100644 index 0000000000..e97889eb35 --- /dev/null +++ b/etherman/smartcontracts/newhorizenproofverifier/newhorizenproofverifier.go @@ -0,0 +1,1247 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package newhorizenproofverifier + +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 +) + +// NewhorizenproofverifierMetaData contains all meta data concerning the Newhorizenproofverifier contract. +var NewhorizenproofverifierMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBatchCounts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotRenounce\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_attestationId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proofsAttestation\",\"type\":\"bytes32\"}],\"name\":\"AttestationPosted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flipIsEnforcingSequentialAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEnforcingSequentialAttestations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestAttestationId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proofsAttestations\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_proofsAttestation\",\"type\":\"bytes32\"}],\"name\":\"submitAttestation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_attestationIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"_proofsAttestation\",\"type\":\"bytes32[]\"}],\"name\":\"submitAttestationBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_leaf\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"_merklePath\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"_leafCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"verifyProofAttestation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051620013d9380380620013d98339810160408190526100319161010b565b61003c60003361006c565b6100667f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c8261006c565b5061013b565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610107576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556100c63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006020828403121561011d57600080fd5b81516001600160a01b038116811461013457600080fd5b9392505050565b61128e806200014b6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806391d1485411610097578063bd93187c11610066578063bd93187c1461023d578063d547741f1461024a578063ddea78861461025d578063e0fec29a1461027057600080fd5b806391d14854146101aa578063983d2737146101ee578063a217fddf14610215578063b99047df1461021d57600080fd5b806336568abe116100d357806336568abe14610168578063560f3ba41461017b57806357ae920d146101845780636736ec951461019757600080fd5b806301ffc9a7146100fa578063248a9ca3146101225780632f2ff15d14610153575b600080fd5b61010d610108366004610df1565b610278565b60405190151581526020015b60405180910390f35b610145610130366004610e33565b60009081526020819052604090206001015490565b604051908152602001610119565b610166610161366004610e4c565b610311565b005b610166610176366004610e4c565b61033b565b61014560015481565b610166610192366004610ee1565b610380565b6101666101a5366004610f4d565b610559565b61010d6101b8366004610e4c565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101457f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c81565b610145600081565b61014561022b366004610e33565b60026020526000908152604090205481565b60035461010d9060ff1681565b610166610258366004610e4c565b61061d565b61010d61026b366004610f6f565b610642565b610166610681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061030b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461032c816106de565b61033683836106eb565b505050565b81610372576040517f1d88406500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61037c82826107db565b5050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c6103aa816106de565b8382146103e3576040517f73d99d3700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460035485919060ff161561046e5760005b8281101561046c5761040a816001611003565b6104149083611003565b88888381811061042657610426611016565b9050602002013514610464576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001016103f7565b505b60005b828110156105275785858281811061048b5761048b611016565b90506020020135600260008a8a858181106104a8576104a8611016565b905060200201358152602001908152602001600020819055508585828181106104d3576104d3611016565b905060200201358888838181106104ec576104ec611016565b905060200201357fe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de487860405160405180910390a3600101610471565b508686610535600182611045565b81811061054457610544611016565b60200291909101356001555050505050505050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c610583816106de565b60035460ff1680156105a157506001805461059d91611003565b8314155b156105d8576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183905560008381526002602052604080822084905551839185917fe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de48789190a3505050565b600082815260208190526040902060010154610638816106de565b610336838361088b565b600060015487111561065657506000610677565b60008781526002602052604090205461067381878787878c610942565b9150505b9695505050505050565b7f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c6106ab816106de565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6106e88133610ad0565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661037c5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561077d3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b73ffffffffffffffffffffffffffffffffffffffff81163314610885576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61037c82825b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561037c5760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600083831061097d576040517f4e23d03500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008260405160200161099291815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209050838560005b88811015610ac05760008a8a838181106109eb576109eb611016565b905060200201359050600284610a019190611087565b60011480610a18575082610a16856001611003565b145b15610a4e576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450610a7b565b60408051602081018790529081018290526060016040516020818303038152906040528051906020012094505b610a8660028561109b565b93506002610a95600185611045565b610a9f919061109b565b610aaa906001611003565b9250508080610ab8906110af565b9150506109cf565b5050509096149695505050505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661037c57610b0e81610b88565b610b19836020610ba7565b604051602001610b2a92919061110b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261087c9160040161118c565b606061030b73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610bb68360026111dd565b610bc1906002611003565b67ffffffffffffffff811115610bd957610bd96111f4565b6040519080825280601f01601f191660200182016040528015610c03576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610c3a57610c3a611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c9d57610c9d611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610cd98460026111dd565b610ce4906001611003565b90505b6001811115610d81577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610d2557610d25611016565b1a60f81b828281518110610d3b57610d3b611016565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610d7a81611223565b9050610ce7565b508315610dea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161087c565b9392505050565b600060208284031215610e0357600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610dea57600080fd5b600060208284031215610e4557600080fd5b5035919050565b60008060408385031215610e5f57600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff81168114610e8a57600080fd5b809150509250929050565b60008083601f840112610ea757600080fd5b50813567ffffffffffffffff811115610ebf57600080fd5b6020830191508360208260051b8501011115610eda57600080fd5b9250929050565b60008060008060408587031215610ef757600080fd5b843567ffffffffffffffff80821115610f0f57600080fd5b610f1b88838901610e95565b90965094506020870135915080821115610f3457600080fd5b50610f4187828801610e95565b95989497509550505050565b60008060408385031215610f6057600080fd5b50508035926020909101359150565b60008060008060008060a08789031215610f8857600080fd5b8635955060208701359450604087013567ffffffffffffffff811115610fad57600080fd5b610fb989828a01610e95565b979a9699509760608101359660809091013595509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8181038181111561030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261109657611096611058565b500690565b6000826110aa576110aa611058565b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036110e0576110e0610fd4565b5060010190565b60005b838110156111025781810151838201526020016110ea565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111438160178501602088016110e7565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111808160288401602088016110e7565b01602801949350505050565b60208152600082518060208401526111ab8160408501602087016110e7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b808202811582820484141761030b5761030b610fd4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008161123257611232610fd4565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220adcee907f87793daf50397db38deca3628000a6693a39cfbc0703c2646a3530b64736f6c63430008140033", +} + +// NewhorizenproofverifierABI is the input ABI used to generate the binding from. +// Deprecated: Use NewhorizenproofverifierMetaData.ABI instead. +var NewhorizenproofverifierABI = NewhorizenproofverifierMetaData.ABI + +// NewhorizenproofverifierBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use NewhorizenproofverifierMetaData.Bin instead. +var NewhorizenproofverifierBin = NewhorizenproofverifierMetaData.Bin + +// DeployNewhorizenproofverifier deploys a new Ethereum contract, binding an instance of Newhorizenproofverifier to it. +func DeployNewhorizenproofverifier(auth *bind.TransactOpts, backend bind.ContractBackend, _operator common.Address) (common.Address, *types.Transaction, *Newhorizenproofverifier, error) { + parsed, err := NewhorizenproofverifierMetaData.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(NewhorizenproofverifierBin), backend, _operator) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Newhorizenproofverifier{NewhorizenproofverifierCaller: NewhorizenproofverifierCaller{contract: contract}, NewhorizenproofverifierTransactor: NewhorizenproofverifierTransactor{contract: contract}, NewhorizenproofverifierFilterer: NewhorizenproofverifierFilterer{contract: contract}}, nil +} + +// Newhorizenproofverifier is an auto generated Go binding around an Ethereum contract. +type Newhorizenproofverifier struct { + NewhorizenproofverifierCaller // Read-only binding to the contract + NewhorizenproofverifierTransactor // Write-only binding to the contract + NewhorizenproofverifierFilterer // Log filterer for contract events +} + +// NewhorizenproofverifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type NewhorizenproofverifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NewhorizenproofverifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type NewhorizenproofverifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NewhorizenproofverifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type NewhorizenproofverifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// NewhorizenproofverifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type NewhorizenproofverifierSession struct { + Contract *Newhorizenproofverifier // 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 +} + +// NewhorizenproofverifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type NewhorizenproofverifierCallerSession struct { + Contract *NewhorizenproofverifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// NewhorizenproofverifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type NewhorizenproofverifierTransactorSession struct { + Contract *NewhorizenproofverifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// NewhorizenproofverifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type NewhorizenproofverifierRaw struct { + Contract *Newhorizenproofverifier // Generic contract binding to access the raw methods on +} + +// NewhorizenproofverifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type NewhorizenproofverifierCallerRaw struct { + Contract *NewhorizenproofverifierCaller // Generic read-only contract binding to access the raw methods on +} + +// NewhorizenproofverifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type NewhorizenproofverifierTransactorRaw struct { + Contract *NewhorizenproofverifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewNewhorizenproofverifier creates a new instance of Newhorizenproofverifier, bound to a specific deployed contract. +func NewNewhorizenproofverifier(address common.Address, backend bind.ContractBackend) (*Newhorizenproofverifier, error) { + contract, err := bindNewhorizenproofverifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Newhorizenproofverifier{NewhorizenproofverifierCaller: NewhorizenproofverifierCaller{contract: contract}, NewhorizenproofverifierTransactor: NewhorizenproofverifierTransactor{contract: contract}, NewhorizenproofverifierFilterer: NewhorizenproofverifierFilterer{contract: contract}}, nil +} + +// NewNewhorizenproofverifierCaller creates a new read-only instance of Newhorizenproofverifier, bound to a specific deployed contract. +func NewNewhorizenproofverifierCaller(address common.Address, caller bind.ContractCaller) (*NewhorizenproofverifierCaller, error) { + contract, err := bindNewhorizenproofverifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierCaller{contract: contract}, nil +} + +// NewNewhorizenproofverifierTransactor creates a new write-only instance of Newhorizenproofverifier, bound to a specific deployed contract. +func NewNewhorizenproofverifierTransactor(address common.Address, transactor bind.ContractTransactor) (*NewhorizenproofverifierTransactor, error) { + contract, err := bindNewhorizenproofverifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierTransactor{contract: contract}, nil +} + +// NewNewhorizenproofverifierFilterer creates a new log filterer instance of Newhorizenproofverifier, bound to a specific deployed contract. +func NewNewhorizenproofverifierFilterer(address common.Address, filterer bind.ContractFilterer) (*NewhorizenproofverifierFilterer, error) { + contract, err := bindNewhorizenproofverifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierFilterer{contract: contract}, nil +} + +// bindNewhorizenproofverifier binds a generic wrapper to an already deployed contract. +func bindNewhorizenproofverifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := NewhorizenproofverifierMetaData.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 (_Newhorizenproofverifier *NewhorizenproofverifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Newhorizenproofverifier.Contract.NewhorizenproofverifierCaller.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 (_Newhorizenproofverifier *NewhorizenproofverifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.NewhorizenproofverifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Newhorizenproofverifier *NewhorizenproofverifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.NewhorizenproofverifierTransactor.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 (_Newhorizenproofverifier *NewhorizenproofverifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Newhorizenproofverifier.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 (_Newhorizenproofverifier *NewhorizenproofverifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.contract.Transact(opts, method, params...) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) DEFAULTADMINROLE() ([32]byte, error) { + return _Newhorizenproofverifier.Contract.DEFAULTADMINROLE(&_Newhorizenproofverifier.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _Newhorizenproofverifier.Contract.DEFAULTADMINROLE(&_Newhorizenproofverifier.CallOpts) +} + +// OPERATOR is a free data retrieval call binding the contract method 0x983d2737. +// +// Solidity: function OPERATOR() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) OPERATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "OPERATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OPERATOR is a free data retrieval call binding the contract method 0x983d2737. +// +// Solidity: function OPERATOR() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) OPERATOR() ([32]byte, error) { + return _Newhorizenproofverifier.Contract.OPERATOR(&_Newhorizenproofverifier.CallOpts) +} + +// OPERATOR is a free data retrieval call binding the contract method 0x983d2737. +// +// Solidity: function OPERATOR() view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) OPERATOR() ([32]byte, error) { + return _Newhorizenproofverifier.Contract.OPERATOR(&_Newhorizenproofverifier.CallOpts) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _Newhorizenproofverifier.Contract.GetRoleAdmin(&_Newhorizenproofverifier.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _Newhorizenproofverifier.Contract.GetRoleAdmin(&_Newhorizenproofverifier.CallOpts, role) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _Newhorizenproofverifier.Contract.HasRole(&_Newhorizenproofverifier.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _Newhorizenproofverifier.Contract.HasRole(&_Newhorizenproofverifier.CallOpts, role, account) +} + +// IsEnforcingSequentialAttestations is a free data retrieval call binding the contract method 0xbd93187c. +// +// Solidity: function isEnforcingSequentialAttestations() view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) IsEnforcingSequentialAttestations(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "isEnforcingSequentialAttestations") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEnforcingSequentialAttestations is a free data retrieval call binding the contract method 0xbd93187c. +// +// Solidity: function isEnforcingSequentialAttestations() view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) IsEnforcingSequentialAttestations() (bool, error) { + return _Newhorizenproofverifier.Contract.IsEnforcingSequentialAttestations(&_Newhorizenproofverifier.CallOpts) +} + +// IsEnforcingSequentialAttestations is a free data retrieval call binding the contract method 0xbd93187c. +// +// Solidity: function isEnforcingSequentialAttestations() view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) IsEnforcingSequentialAttestations() (bool, error) { + return _Newhorizenproofverifier.Contract.IsEnforcingSequentialAttestations(&_Newhorizenproofverifier.CallOpts) +} + +// LatestAttestationId is a free data retrieval call binding the contract method 0x560f3ba4. +// +// Solidity: function latestAttestationId() view returns(uint256) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) LatestAttestationId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "latestAttestationId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LatestAttestationId is a free data retrieval call binding the contract method 0x560f3ba4. +// +// Solidity: function latestAttestationId() view returns(uint256) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) LatestAttestationId() (*big.Int, error) { + return _Newhorizenproofverifier.Contract.LatestAttestationId(&_Newhorizenproofverifier.CallOpts) +} + +// LatestAttestationId is a free data retrieval call binding the contract method 0x560f3ba4. +// +// Solidity: function latestAttestationId() view returns(uint256) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) LatestAttestationId() (*big.Int, error) { + return _Newhorizenproofverifier.Contract.LatestAttestationId(&_Newhorizenproofverifier.CallOpts) +} + +// ProofsAttestations is a free data retrieval call binding the contract method 0xb99047df. +// +// Solidity: function proofsAttestations(uint256 ) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) ProofsAttestations(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "proofsAttestations", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProofsAttestations is a free data retrieval call binding the contract method 0xb99047df. +// +// Solidity: function proofsAttestations(uint256 ) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) ProofsAttestations(arg0 *big.Int) ([32]byte, error) { + return _Newhorizenproofverifier.Contract.ProofsAttestations(&_Newhorizenproofverifier.CallOpts, arg0) +} + +// ProofsAttestations is a free data retrieval call binding the contract method 0xb99047df. +// +// Solidity: function proofsAttestations(uint256 ) view returns(bytes32) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) ProofsAttestations(arg0 *big.Int) ([32]byte, error) { + return _Newhorizenproofverifier.Contract.ProofsAttestations(&_Newhorizenproofverifier.CallOpts, arg0) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _Newhorizenproofverifier.Contract.SupportsInterface(&_Newhorizenproofverifier.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _Newhorizenproofverifier.Contract.SupportsInterface(&_Newhorizenproofverifier.CallOpts, interfaceId) +} + +// VerifyProofAttestation is a free data retrieval call binding the contract method 0xddea7886. +// +// Solidity: function verifyProofAttestation(uint256 _attestationId, bytes32 _leaf, bytes32[] _merklePath, uint256 _leafCount, uint256 _index) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCaller) VerifyProofAttestation(opts *bind.CallOpts, _attestationId *big.Int, _leaf [32]byte, _merklePath [][32]byte, _leafCount *big.Int, _index *big.Int) (bool, error) { + var out []interface{} + err := _Newhorizenproofverifier.contract.Call(opts, &out, "verifyProofAttestation", _attestationId, _leaf, _merklePath, _leafCount, _index) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// VerifyProofAttestation is a free data retrieval call binding the contract method 0xddea7886. +// +// Solidity: function verifyProofAttestation(uint256 _attestationId, bytes32 _leaf, bytes32[] _merklePath, uint256 _leafCount, uint256 _index) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) VerifyProofAttestation(_attestationId *big.Int, _leaf [32]byte, _merklePath [][32]byte, _leafCount *big.Int, _index *big.Int) (bool, error) { + return _Newhorizenproofverifier.Contract.VerifyProofAttestation(&_Newhorizenproofverifier.CallOpts, _attestationId, _leaf, _merklePath, _leafCount, _index) +} + +// VerifyProofAttestation is a free data retrieval call binding the contract method 0xddea7886. +// +// Solidity: function verifyProofAttestation(uint256 _attestationId, bytes32 _leaf, bytes32[] _merklePath, uint256 _leafCount, uint256 _index) view returns(bool) +func (_Newhorizenproofverifier *NewhorizenproofverifierCallerSession) VerifyProofAttestation(_attestationId *big.Int, _leaf [32]byte, _merklePath [][32]byte, _leafCount *big.Int, _index *big.Int) (bool, error) { + return _Newhorizenproofverifier.Contract.VerifyProofAttestation(&_Newhorizenproofverifier.CallOpts, _attestationId, _leaf, _merklePath, _leafCount, _index) +} + +// FlipIsEnforcingSequentialAttestations is a paid mutator transaction binding the contract method 0xe0fec29a. +// +// Solidity: function flipIsEnforcingSequentialAttestations() returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) FlipIsEnforcingSequentialAttestations(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "flipIsEnforcingSequentialAttestations") +} + +// FlipIsEnforcingSequentialAttestations is a paid mutator transaction binding the contract method 0xe0fec29a. +// +// Solidity: function flipIsEnforcingSequentialAttestations() returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) FlipIsEnforcingSequentialAttestations() (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.FlipIsEnforcingSequentialAttestations(&_Newhorizenproofverifier.TransactOpts) +} + +// FlipIsEnforcingSequentialAttestations is a paid mutator transaction binding the contract method 0xe0fec29a. +// +// Solidity: function flipIsEnforcingSequentialAttestations() returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) FlipIsEnforcingSequentialAttestations() (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.FlipIsEnforcingSequentialAttestations(&_Newhorizenproofverifier.TransactOpts) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.GrantRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.GrantRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "renounceRole", role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.RenounceRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.RenounceRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.RevokeRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.RevokeRole(&_Newhorizenproofverifier.TransactOpts, role, account) +} + +// SubmitAttestation is a paid mutator transaction binding the contract method 0x6736ec95. +// +// Solidity: function submitAttestation(uint256 _attestationId, bytes32 _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) SubmitAttestation(opts *bind.TransactOpts, _attestationId *big.Int, _proofsAttestation [32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "submitAttestation", _attestationId, _proofsAttestation) +} + +// SubmitAttestation is a paid mutator transaction binding the contract method 0x6736ec95. +// +// Solidity: function submitAttestation(uint256 _attestationId, bytes32 _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) SubmitAttestation(_attestationId *big.Int, _proofsAttestation [32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.SubmitAttestation(&_Newhorizenproofverifier.TransactOpts, _attestationId, _proofsAttestation) +} + +// SubmitAttestation is a paid mutator transaction binding the contract method 0x6736ec95. +// +// Solidity: function submitAttestation(uint256 _attestationId, bytes32 _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) SubmitAttestation(_attestationId *big.Int, _proofsAttestation [32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.SubmitAttestation(&_Newhorizenproofverifier.TransactOpts, _attestationId, _proofsAttestation) +} + +// SubmitAttestationBatch is a paid mutator transaction binding the contract method 0x57ae920d. +// +// Solidity: function submitAttestationBatch(uint256[] _attestationIds, bytes32[] _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactor) SubmitAttestationBatch(opts *bind.TransactOpts, _attestationIds []*big.Int, _proofsAttestation [][32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.contract.Transact(opts, "submitAttestationBatch", _attestationIds, _proofsAttestation) +} + +// SubmitAttestationBatch is a paid mutator transaction binding the contract method 0x57ae920d. +// +// Solidity: function submitAttestationBatch(uint256[] _attestationIds, bytes32[] _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierSession) SubmitAttestationBatch(_attestationIds []*big.Int, _proofsAttestation [][32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.SubmitAttestationBatch(&_Newhorizenproofverifier.TransactOpts, _attestationIds, _proofsAttestation) +} + +// SubmitAttestationBatch is a paid mutator transaction binding the contract method 0x57ae920d. +// +// Solidity: function submitAttestationBatch(uint256[] _attestationIds, bytes32[] _proofsAttestation) returns() +func (_Newhorizenproofverifier *NewhorizenproofverifierTransactorSession) SubmitAttestationBatch(_attestationIds []*big.Int, _proofsAttestation [][32]byte) (*types.Transaction, error) { + return _Newhorizenproofverifier.Contract.SubmitAttestationBatch(&_Newhorizenproofverifier.TransactOpts, _attestationIds, _proofsAttestation) +} + +// NewhorizenproofverifierAttestationPostedIterator is returned from FilterAttestationPosted and is used to iterate over the raw logs and unpacked data for AttestationPosted events raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierAttestationPostedIterator struct { + Event *NewhorizenproofverifierAttestationPosted // 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 *NewhorizenproofverifierAttestationPostedIterator) 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(NewhorizenproofverifierAttestationPosted) + 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(NewhorizenproofverifierAttestationPosted) + 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 *NewhorizenproofverifierAttestationPostedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NewhorizenproofverifierAttestationPostedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NewhorizenproofverifierAttestationPosted represents a AttestationPosted event raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierAttestationPosted struct { + AttestationId *big.Int + ProofsAttestation [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAttestationPosted is a free log retrieval operation binding the contract event 0xe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de4878. +// +// Solidity: event AttestationPosted(uint256 indexed _attestationId, bytes32 indexed _proofsAttestation) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) FilterAttestationPosted(opts *bind.FilterOpts, _attestationId []*big.Int, _proofsAttestation [][32]byte) (*NewhorizenproofverifierAttestationPostedIterator, error) { + + var _attestationIdRule []interface{} + for _, _attestationIdItem := range _attestationId { + _attestationIdRule = append(_attestationIdRule, _attestationIdItem) + } + var _proofsAttestationRule []interface{} + for _, _proofsAttestationItem := range _proofsAttestation { + _proofsAttestationRule = append(_proofsAttestationRule, _proofsAttestationItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.FilterLogs(opts, "AttestationPosted", _attestationIdRule, _proofsAttestationRule) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierAttestationPostedIterator{contract: _Newhorizenproofverifier.contract, event: "AttestationPosted", logs: logs, sub: sub}, nil +} + +// WatchAttestationPosted is a free log subscription operation binding the contract event 0xe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de4878. +// +// Solidity: event AttestationPosted(uint256 indexed _attestationId, bytes32 indexed _proofsAttestation) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) WatchAttestationPosted(opts *bind.WatchOpts, sink chan<- *NewhorizenproofverifierAttestationPosted, _attestationId []*big.Int, _proofsAttestation [][32]byte) (event.Subscription, error) { + + var _attestationIdRule []interface{} + for _, _attestationIdItem := range _attestationId { + _attestationIdRule = append(_attestationIdRule, _attestationIdItem) + } + var _proofsAttestationRule []interface{} + for _, _proofsAttestationItem := range _proofsAttestation { + _proofsAttestationRule = append(_proofsAttestationRule, _proofsAttestationItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.WatchLogs(opts, "AttestationPosted", _attestationIdRule, _proofsAttestationRule) + 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(NewhorizenproofverifierAttestationPosted) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "AttestationPosted", 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 +} + +// ParseAttestationPosted is a log parse operation binding the contract event 0xe64e12e2dfd684ae91bf1a6c52fbf2af6986db5927d23f5b643e0d50f7de4878. +// +// Solidity: event AttestationPosted(uint256 indexed _attestationId, bytes32 indexed _proofsAttestation) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) ParseAttestationPosted(log types.Log) (*NewhorizenproofverifierAttestationPosted, error) { + event := new(NewhorizenproofverifierAttestationPosted) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "AttestationPosted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NewhorizenproofverifierRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleAdminChangedIterator struct { + Event *NewhorizenproofverifierRoleAdminChanged // 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 *NewhorizenproofverifierRoleAdminChangedIterator) 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(NewhorizenproofverifierRoleAdminChanged) + 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(NewhorizenproofverifierRoleAdminChanged) + 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 *NewhorizenproofverifierRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NewhorizenproofverifierRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NewhorizenproofverifierRoleAdminChanged represents a RoleAdminChanged event raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*NewhorizenproofverifierRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierRoleAdminChangedIterator{contract: _Newhorizenproofverifier.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *NewhorizenproofverifierRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + 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(NewhorizenproofverifierRoleAdminChanged) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleAdminChanged", 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 +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) ParseRoleAdminChanged(log types.Log) (*NewhorizenproofverifierRoleAdminChanged, error) { + event := new(NewhorizenproofverifierRoleAdminChanged) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NewhorizenproofverifierRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleGrantedIterator struct { + Event *NewhorizenproofverifierRoleGranted // 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 *NewhorizenproofverifierRoleGrantedIterator) 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(NewhorizenproofverifierRoleGranted) + 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(NewhorizenproofverifierRoleGranted) + 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 *NewhorizenproofverifierRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NewhorizenproofverifierRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NewhorizenproofverifierRoleGranted represents a RoleGranted event raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*NewhorizenproofverifierRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierRoleGrantedIterator{contract: _Newhorizenproofverifier.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *NewhorizenproofverifierRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + 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(NewhorizenproofverifierRoleGranted) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleGranted", 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 +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) ParseRoleGranted(log types.Log) (*NewhorizenproofverifierRoleGranted, error) { + event := new(NewhorizenproofverifierRoleGranted) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// NewhorizenproofverifierRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleRevokedIterator struct { + Event *NewhorizenproofverifierRoleRevoked // 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 *NewhorizenproofverifierRoleRevokedIterator) 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(NewhorizenproofverifierRoleRevoked) + 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(NewhorizenproofverifierRoleRevoked) + 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 *NewhorizenproofverifierRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *NewhorizenproofverifierRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// NewhorizenproofverifierRoleRevoked represents a RoleRevoked event raised by the Newhorizenproofverifier contract. +type NewhorizenproofverifierRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*NewhorizenproofverifierRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &NewhorizenproofverifierRoleRevokedIterator{contract: _Newhorizenproofverifier.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *NewhorizenproofverifierRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Newhorizenproofverifier.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + 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(NewhorizenproofverifierRoleRevoked) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleRevoked", 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 +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_Newhorizenproofverifier *NewhorizenproofverifierFilterer) ParseRoleRevoked(log types.Log) (*NewhorizenproofverifierRoleRevoked, error) { + event := new(NewhorizenproofverifierRoleRevoked) + if err := _Newhorizenproofverifier.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/polygonzkevm/polygonzkevm.go b/etherman/smartcontracts/polygonzkevm/polygonzkevm.go index 1c88dee57f..f064a2345d 100644 --- a/etherman/smartcontracts/polygonzkevm/polygonzkevm.go +++ b/etherman/smartcontracts/polygonzkevm/polygonzkevm.go @@ -53,10 +53,18 @@ type CDKValidiumInitializePackedParameters struct { TrustedAggregatorTimeout uint64 } +// CDKValidiumNewHorizenVerificationRequest is an auto generated low-level Go binding around an user-defined struct. +type CDKValidiumNewHorizenVerificationRequest struct { + AttestationId *big.Int + MerklePath [][32]byte + LeafCount *big.Int + Index *big.Int +} + // PolygonzkevmMetaData contains all meta data concerning the Polygonzkevm contract. var PolygonzkevmMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"_matic\",\"type\":\"address\"},{\"internalType\":\"contractIVerifierRollup\",\"name\":\"_rollupVerifier\",\"type\":\"address\"},{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"_bridgeAddress\",\"type\":\"address\"},{\"internalType\":\"contractICDKDataCommittee\",\"name\":\"_dataCommitteeAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_forkID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BatchAlreadyVerified\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSequencedOrNotSequenceEnd\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedMaxVerifyBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchBelowLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalPendingStateNumInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesAlreadyActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForcedDataDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HaltTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchAboveLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeBatchTimeTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeForceBatchTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeMultiplierBatchFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewPendingStateTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewStateRootNotInsidePrime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewTrustedAggregatorTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughMaticAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldStateRootDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPendingAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedAggregator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedSequencer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateNotConsolidable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequenceZeroBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampBelowForcedTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StoredRootMustBeDifferentThanNewRoot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionsLengthAboveMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutNotExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AcceptAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ActivateForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"ConsolidatePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"forceBatchNum\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"lastGlobalExitRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"}],\"name\":\"ForceBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"OverridePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"storedStateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"provedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"ProveNonDeterministicPendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"SetForceBatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"SetMultiplierBatchFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"SetPendingStateTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"SetTrustedAggregator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"SetTrustedAggregatorTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"SetTrustedSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"SetTrustedSequencerURL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"SetVerifyBatchTimeTarget\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"TransferAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"forkID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"UpdateZkEVMVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatchesTrustedAggregator\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sequencedBatchNum\",\"type\":\"uint64\"}],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"batchNumToStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"calculateRewardPerBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newStateRoot\",\"type\":\"uint256\"}],\"name\":\"checkStateRootInsidePrime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"consolidatePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataCommitteeAddress\",\"outputs\":[{\"internalType\":\"contractICDKDataCommittee\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maticAmount\",\"type\":\"uint256\"}],\"name\":\"forceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forceBatchTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"forcedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forkID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getForcedBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"oldStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"}],\"name\":\"getInputSnarkBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trustedSequencer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"pendingStateTimeout\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"trustedAggregator\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"trustedAggregatorTimeout\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.InitializePackedParameters\",\"name\":\"initializePackedParameters\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"genesisRoot\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_trustedSequencerURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isForcedBatchDisallowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"isPendingStateConsolidable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingState\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingStateConsolidated\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimestamp\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"matic\",\"outputs\":[{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multiplierBatchFee\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[24]\",\"name\":\"proof\",\"type\":\"bytes32[24]\"}],\"name\":\"overridePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingStateTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingStateTransitions\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"exitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[24]\",\"name\":\"proof\",\"type\":\"bytes32[24]\"}],\"name\":\"proveNonDeterministicPendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupVerifier\",\"outputs\":[{\"internalType\":\"contractIVerifierRollup\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"transactionsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.BatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"l2Coinbase\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signaturesAndAddrs\",\"type\":\"bytes\"}],\"name\":\"sequenceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.ForcedBatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"}],\"name\":\"sequenceForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"sequencedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accInputHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sequencedTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"previousLastBatchSequenced\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"setForceBatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"setMultiplierBatchFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"setPendingStateTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"setTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"setTrustedAggregatorTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"setTrustedSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"setTrustedSequencerURL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"setVerifyBatchTimeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"transferAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregatorTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencerURL\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifyBatchTimeTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[24]\",\"name\":\"proof\",\"type\":\"bytes32[24]\"}],\"name\":\"verifyBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[24]\",\"name\":\"proof\",\"type\":\"bytes32[24]\"}],\"name\":\"verifyBatchesTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101606040523480156200001257600080fd5b5060405162006185380380620061858339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e051610100516101205161014051615f566200022f600039600081816106c801528181610e1e015261321b0152600081816108350152610df40152600081816105d301526119a00152600081816107fb01528181611bf0015281816138b40152614d300152600081816109a101528181610f91015281816111620152818161177b0152818161220f01528181613a9c015261498d015260008181610a4e0152818161415901526145b10152600081816108f101528181611bbe0152818161270001528181613a7001526142470152615f566000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063837a4738116101ff578063c754c7ed1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e7a7ed0214610a19578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d2e129f9116100e9578063d2e129f9146109c3578063d8d1091b146109d6578063d939b315146109e9578063dbc1697614610a1157600080fd5b8063c754c7ed1461092e578063c89e42df1461095a578063cfa8ed471461096d578063d02103ca1461099c57600080fd5b8063a3c573eb11610192578063b4d63f5811610161578063b4d63f5814610885578063b6b0b097146108ec578063ba58ae3914610913578063c0ed84e01461092657600080fd5b8063a3c573eb146107f6578063ada8f9191461081d578063adc879e914610830578063afd23cbe1461085757600080fd5b806399f5634e116101ce57806399f5634e146107b55780639aa972a3146107bd5780639c9f3dfe146107d0578063a066215c146107e357600080fd5b8063837a4738146106ea578063841b24d71461075f5780638c3d73011461078f5780638da5cb5b1461079757600080fd5b8063458c0477116102ef5780636046916911610282578063715018a611610251578063715018a6146106945780637215541a1461069c5780637fcb3653146106af578063831c7ead146106c357600080fd5b80636046916914610646578063621dd4111461064e5780636b8616ce146106615780636ff512cc1461068157600080fd5b80634e487706116102be5780634e487706146105f55780635392c5e014610608578063542028d5146106365780635ec919581461063e57600080fd5b8063458c0477146105875780634a1a89a71461059b5780634a910e6a146105bb5780634df61d24146105ce57600080fd5b80632987898311610367578063394218e911610336578063394218e914610519578063423fa8561461052c578063438a53991461054c578063456052671461055f57600080fd5b806329878983146104b45780632b0006fa146104e05780632c1f816a146104f3578063383b3be81461050657600080fd5b80631816b7e5116103a35780631816b7e51461043357806319d8ac6114610448578063220d78991461045c578063267822471461046f57600080fd5b80630a0d9fbe146103ca578063107bf28c1461040157806315064c9614610416575b600080fd5b606f546103e390610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b610409610aff565b6040516103f8919061535c565b606f546104239060ff1681565b60405190151581526020016103f8565b610446610441366004615376565b610b8d565b005b6073546103e39067ffffffffffffffff1681565b61040961046a3660046153b2565b610ca5565b607b5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103f8565b60745461048f9068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104466104ee366004615417565b610e7c565b61044661050136600461547f565b61104c565b6104236105143660046154f9565b61125a565b6104466105273660046154f9565b6112b0565b6073546103e39068010000000000000000900467ffffffffffffffff1681565b61044661055a366004615581565b611434565b6073546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103e39067ffffffffffffffff1681565b6079546103e39068010000000000000000900467ffffffffffffffff1681565b6104466105c93660046154f9565b611cb1565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466106033660046154f9565b611d64565b6106286106163660046154f9565b60756020526000908152604090205481565b6040519081526020016103f8565b610409611ee8565b610446611ef5565b610628611ff5565b61044661065c366004615417565b61200b565b61062861066f3660046154f9565b60716020526000908152604090205481565b61044661068f366004615633565b612393565b610446612468565b6104466106aa3660046154f9565b61247c565b6074546103e39067ffffffffffffffff1681565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b6107336106f836600461564e565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff95861681529490931660208501529183015260608201526080016103f8565b6079546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104466125ec565b60335473ffffffffffffffffffffffffffffffffffffffff1661048f565b6106286126b8565b6104466107cb36600461547f565b612811565b6104466107de3660046154f9565b6128c2565b6104466107f13660046154f9565b612a3e565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61044661082b366004615633565b612b44565b6103e37f000000000000000000000000000000000000000000000000000000000000000081565b606f54610872906901000000000000000000900461ffff1681565b60405161ffff90911681526020016103f8565b6108c66108933660046154f9565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff92831660208501529116908201526060016103f8565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b61042361092136600461564e565b612c08565b6103e3612c92565b607b546103e39074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b61044661096836600461574a565b612ce7565b606f5461048f906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b6104466109d136600461577f565b612d74565b6104466109e4366004615832565b6132bf565b6079546103e390700100000000000000000000000000000000900467ffffffffffffffff1681565b610446613861565b6073546103e3907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b61048f7f000000000000000000000000000000000000000000000000000000000000000081565b610446610a7e3660046158a7565b61393a565b607b54610423907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b610446610abe366004615633565b613d30565b610446610ad1366004615633565b613e02565b607a5461048f9073ffffffffffffffffffffffffffffffffffffffff1681565b61062860705481565b60778054610b0c906158f3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b38906158f3565b8015610b855780601f10610b5a57610100808354040283529160200191610b85565b820191906000526020600020905b815481529060010190602001808311610b6857829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610bde576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610bf757506103ff8161ffff16115b15610c2e576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610cd9575081155b15610d10576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610d47576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d5084612c08565b610d86576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610ed9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee7868686868686613eb6565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610f6257607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610fea57600080fd5b505af1158015610ffe573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020015b60405180910390a3505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146110a9576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b88787878787878761427a565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561113357607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156111bb57600080fd5b505af11580156111cf573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60795467ffffffffffffffff8281166000908152607860205260408120549092429261129e9270010000000000000000000000000000000090920481169116615975565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611301576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611348576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166113b75760795467ffffffffffffffff78010000000000000000000000000000000000000000000000009091048116908216106113b7576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610c9a565b606f5460ff1615611471576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146114d1576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600081900361150d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8811115611549576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156119625760008c8c838181106115b1576115b161599d565b9050608002018036038101906115c791906159cc565b606081015190915067ffffffffffffffff161561173857846115e881615a3d565b955050600081600001518260200151836060015160405160200161164493929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146116cd576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611732576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611836565b6020810151158015906117ff575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190615a64565b155b15611836576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff161080611869575042816040015167ffffffffffffffff16115b156118a0576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e60405160200161192f9594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061195a90615a7d565b915050611595565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906119d99085908c908c90600401615afe565b60006040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050508584611a159190615975565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611a7e576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a8a8285615b21565b611a9e9067ffffffffffffffff1688615b42565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c8416911617930292909217905590915082811690851614611b9457607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611be6333083607054611ba79190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169291906146b4565b611bee614796565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611c5657600080fd5b505af1158015611c6a573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611d5857606f5460ff1615611d19576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d228161125a565b611d58576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d6181614843565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611db5576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611dfc576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611e6757607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611e67576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610c9a565b60768054610b0c906158f3565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611f46576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611fa2576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b600060705460646120069190615b55565b905090565b606f5460ff1615612048576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff858116600090815260726020526040902060010154429261209592780100000000000000000000000000000000000000000000000090910481169116615975565b67ffffffffffffffff1611156120d7576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e86120e48686615b21565b67ffffffffffffffff161115612126576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612134868686868686613eb6565b61213d84614a56565b607954700100000000000000000000000000000000900467ffffffffffffffff1660000361228557607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff868116918217909255600090815260756020526040902083905560795416156121e057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561226857600080fd5b505af115801561227c573d6000803e3d6000fd5b50505050612355565b61228d614796565b6079805467ffffffffffffffff169060006122a783615a3d565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f59669060200161103c565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146123e4576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610c9a565b612470614c36565b61247a6000614cb7565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146125e45760006124a5612c92565b90508067ffffffffffffffff168267ffffffffffffffff16116124f4576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000009091048116908316118061253a575067ffffffffffffffff80831660009081526072602052604090206001015416155b15612571576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916125a09162093a809116615975565b67ffffffffffffffff1611156125e2576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611d61614d2e565b607b5473ffffffffffffffffffffffffffffffffffffffff16331461263d576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276b9190615a64565b90506000612777612c92565b60735467ffffffffffffffff6801000000000000000082048116916127cf9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615b21565b6127d99190615975565b6127e39190615b21565b67ffffffffffffffff169050806000036128005760009250505090565b61280a8183615b9b565b9250505090565b606f5460ff161561284e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61285d8787878787878761427a565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a16128b9614d2e565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612913576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561295a576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166129c15760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106129c1576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612a8f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612ad6576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610c9a565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b95576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610c9a565b600067ffffffff0000000167ffffffffffffffff8316108015612c40575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612c61575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612c78575067ffffffff0000000160c083901c105b15612c8557506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612cd6575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612d38576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612d448282615bfd565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610c9a919061535c565b600054610100900460ff1615808015612d945750600054600160ff909116105b80612dae5750303b158015612dae575060005460ff166001145b612e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612e9d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612eaa6020880188615633565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612eff6040880160208901615633565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612f646080880160608901615633565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612fef8682615bfd565b506077612ffc8582615bfd565b5062093a806130116060890160408a016154f9565b67ffffffffffffffff161115613053576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61306360608801604089016154f9565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a806130c560a0890160808a016154f9565b67ffffffffffffffff161115613107576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61311760a08801608089016154f9565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c01000000000006978000000000000000000000000000000000000000001790556131f6614db6565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f0000000000000000000000000000000000000000000000000000000000000000858560405161324c9493929190615d17565b60405180910390a180156128b957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff161561331c576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613359576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819003613395576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88111156133d1576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff7801000000000000000000000000000000000000000000000000820481169161341c918491700100000000000000000000000000000000900416615d4f565b1115613454576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b848110156136fe5760008787838181106134b4576134b461599d565b90506020028101906134c69190615d62565b6134cf90615da0565b9050836134db81615a3d565b8251805160209182012081850151604080870151905194995091945060009361353d9386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146135c6576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff86166000908152607160205260408120556135eb600189615b42565b840361365a5742607b60149054906101000a900467ffffffffffffffff1684604001516136189190615975565b67ffffffffffffffff16111561365a576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c0160405160208183030381529060405280519060200120945050505080806136f690615a7d565b915050613498565b506137098484615975565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146138b2576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561391a57600080fd5b505af115801561392e573d6000803e3d6000fd5b5050505061247a614e56565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613997576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139d4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139de611ff5565b905081811115613a1a576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a56576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a9873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163330846146b4565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b299190615a64565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6383615a3d565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613b9a929190615e30565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cca57607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d29565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d209493929190615e40565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d81576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610c9a565b613e0a614c36565b73ffffffffffffffffffffffffffffffffffffffff8116613ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612e36565b611d6181614cb7565b600080613ec1612c92565b905067ffffffffffffffff881615613f915760795467ffffffffffffffff9081169089161115613f1d576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8089166000908152607860205260409020600281015481549094509091898116680100000000000000009092041614613f8b576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614032565b67ffffffffffffffff8716600090815260756020526040902054915081613fe4576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff161115614032576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff161161407f576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061408e8888888689610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516140c39190615e76565b602060405180830381855afa1580156140e0573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906141039190615a64565b61410d9190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a9161418f91899190600401615e9c565b602060405180830381865afa1580156141ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d09190615ed7565b614206576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61426e33614214858b615b21565b67ffffffffffffffff166142266126b8565b6142309190615b55565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190614ee5565b50505050505050505050565b600067ffffffffffffffff8816156143485760795467ffffffffffffffff90811690891611156142d6576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8088166000908152607860205260409020600281015481549092888116680100000000000000009092041614614342576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506143e4565b5067ffffffffffffffff85166000908152607560205260409020548061439a576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff90811690871611156143e4576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061441657508767ffffffffffffffff168767ffffffffffffffff1611155b8061443d575060795467ffffffffffffffff68010000000000000000909104811690881611155b15614474576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8781166000908152607860205260409020546801000000000000000090048116908616146144d7576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006144e68787878588610ca5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161451b9190615e76565b602060405180830381855afa158015614538573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061455b9190615a64565b6145659190615e88565b6040805160208101825282815290517f9121da8a00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691639121da8a916145e791889190600401615e9c565b602060405180830381865afa158015614604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146289190615ed7565b61465e576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff891660009081526078602052604090206002015485900361426e576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526147909085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614f40565b50505050565b60795467ffffffffffffffff68010000000000000000820481169116111561247a576079546000906147df9068010000000000000000900467ffffffffffffffff166001615975565b90506147ea8161125a565b15611d615760795460009060029061480d90849067ffffffffffffffff16615b21565b6148179190615ef9565b6148219083615975565b905061482c8161125a565b1561483e5761483a81614843565b5050565b61483a825b60795467ffffffffffffffff68010000000000000000909104811690821611158061487d575060795467ffffffffffffffff908116908216115b156148b4576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156149e657600080fd5b505af11580156149fa573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e8460020154604051614a4991815260200190565b60405180910390a3505050565b6000614a60612c92565b905081600080614a708484615b21565b606f5467ffffffffffffffff9182169250600091614a949161010090041642615b42565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614b1f5767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614afd57600181015468010000000000000000900467ffffffffffffffff169450614b19565b614b078686615b21565b67ffffffffffffffff16935050614b1f565b50614a97565b6000614b2b8484615b42565b905083811015614b8257808403600c8111614b465780614b49565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614b7857614b78615b6c565b0460705550614bf2565b838103600c8111614b935780614b96565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614bcd57614bcd615b6c565b04905080607054670de0b6b3a76400000281614beb57614beb615b6c565b0460705550505b683635c9adc5dea000006070541115614c1757683635c9adc5dea000006070556128b9565b633b9aca0060705410156128b957633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461247a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612e36565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614d9657600080fd5b505af1158015614daa573d6000803e3d6000fd5b5050505061247a61504c565b600054610100900460ff16614e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612e36565b61247a33614cb7565b606f5460ff16614e92576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052614f3b9084907fa9059cbb000000000000000000000000000000000000000000000000000000009060640161470e565b505050565b6000614fa2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166150df9092919063ffffffff16565b805190915015614f3b5780806020019051810190614fc09190615ed7565b614f3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612e36565b606f5460ff1615615089576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b60606150ee84846000856150f6565b949350505050565b606082471015615188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612e36565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151b19190615e76565b60006040518083038185875af1925050503d80600081146151ee576040519150601f19603f3d011682016040523d82523d6000602084013e6151f3565b606091505b50915091506152048783838761520f565b979650505050505050565b606083156152a557825160000361529e5773ffffffffffffffffffffffffffffffffffffffff85163b61529e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612e36565b50816150ee565b6150ee83838151156152ba5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e36919061535c565b60005b838110156153095781810151838201526020016152f1565b50506000910152565b6000815180845261532a8160208601602086016152ee565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061536f6020830184615312565b9392505050565b60006020828403121561538857600080fd5b813561ffff8116811461536f57600080fd5b803567ffffffffffffffff81168114612c8d57600080fd5b600080600080600060a086880312156153ca57600080fd5b6153d38661539a565b94506153e16020870161539a565b94979496505050506040830135926060810135926080909101359150565b80610300810183101561541157600080fd5b92915050565b6000806000806000806103a0878903121561543157600080fd5b61543a8761539a565b95506154486020880161539a565b94506154566040880161539a565b935060608701359250608087013591506154738860a089016153ff565b90509295509295509295565b60008060008060008060006103c0888a03121561549b57600080fd5b6154a48861539a565b96506154b26020890161539a565b95506154c06040890161539a565b94506154ce6060890161539a565b93506080880135925060a088013591506154eb8960c08a016153ff565b905092959891949750929550565b60006020828403121561550b57600080fd5b61536f8261539a565b803573ffffffffffffffffffffffffffffffffffffffff81168114612c8d57600080fd5b60008083601f84011261554a57600080fd5b50813567ffffffffffffffff81111561556257600080fd5b60208301915083602082850101111561557a57600080fd5b9250929050565b60008060008060006060868803121561559957600080fd5b853567ffffffffffffffff808211156155b157600080fd5b818801915088601f8301126155c557600080fd5b8135818111156155d457600080fd5b8960208260071b85010111156155e957600080fd5b602083019750809650506155ff60208901615514565b9450604088013591508082111561561557600080fd5b5061562288828901615538565b969995985093965092949392505050565b60006020828403121561564557600080fd5b61536f82615514565b60006020828403121561566057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156156b1576156b1615667565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156156f7576156f7615667565b8160405280935085815286868601111561571057600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261573b57600080fd5b61536f83833560208501615696565b60006020828403121561575c57600080fd5b813567ffffffffffffffff81111561577357600080fd5b6150ee8482850161572a565b60008060008060008086880361012081121561579a57600080fd5b60a08112156157a857600080fd5b5086955060a0870135945060c087013567ffffffffffffffff808211156157ce57600080fd5b6157da8a838b0161572a565b955060e08901359150808211156157f057600080fd5b6157fc8a838b0161572a565b945061010089013591508082111561581357600080fd5b5061582089828a01615538565b979a9699509497509295939492505050565b6000806020838503121561584557600080fd5b823567ffffffffffffffff8082111561585d57600080fd5b818501915085601f83011261587157600080fd5b81358181111561588057600080fd5b8660208260051b850101111561589557600080fd5b60209290920196919550909350505050565b6000806000604084860312156158bc57600080fd5b833567ffffffffffffffff8111156158d357600080fd5b6158df86828701615538565b909790965060209590950135949350505050565b600181811c9082168061590757607f821691505b602082108103615940577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff81811683821601908082111561599657615996615946565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000608082840312156159de57600080fd5b6040516080810181811067ffffffffffffffff82111715615a0157615a01615667565b80604052508235815260208301356020820152615a206040840161539a565b6040820152615a316060840161539a565b60608201529392505050565b600067ffffffffffffffff808316818103615a5a57615a5a615946565b6001019392505050565b600060208284031215615a7657600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615aae57615aae615946565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615b18604083018486615ab5565b95945050505050565b67ffffffffffffffff82811682821603908082111561599657615996615946565b8181038181111561541157615411615946565b808202811582820484141761541157615411615946565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615baa57615baa615b6c565b500490565b601f821115614f3b57600081815260208120601f850160051c81016020861015615bd65750805b601f850160051c820191505b81811015615bf557828155600101615be2565b505050505050565b815167ffffffffffffffff811115615c1757615c17615667565b615c2b81615c2584546158f3565b84615baf565b602080601f831160018114615c7e5760008415615c485750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615bf5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615ccb57888601518255948401946001909101908401615cac565b5085821015615d0757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615d45606083018486615ab5565b9695505050505050565b8082018082111561541157615411615946565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615d9657600080fd5b9190910192915050565b600060608236031215615db257600080fd5b6040516060810167ffffffffffffffff8282108183111715615dd657615dd6615667565b816040528435915080821115615deb57600080fd5b50830136601f820112615dfd57600080fd5b615e0c36823560208401615696565b82525060208301356020820152615e256040840161539a565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615d45606083018486615ab5565b60008251615d968184602087016152ee565b600082615e9757615e97615b6c565b500690565b61032081016103008085843782018360005b6001811015615ecd578151835260209283019290910190600101615eae565b5050509392505050565b600060208284031215615ee957600080fd5b8151801515811461536f57600080fd5b600067ffffffffffffffff80841680615f1457615f14615b6c565b9216919091049291505056fea2646970667358221220c54659be0c71b5f48f3f4d4bfee20a108aa9b5b089c2412703866a273f30c4f964736f6c63430008140033", + ABI: "[{\"inputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"_matic\",\"type\":\"address\"},{\"internalType\":\"contractINewHorizenProofVerifier\",\"name\":\"_rollupVerifier\",\"type\":\"address\"},{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"_bridgeAddress\",\"type\":\"address\"},{\"internalType\":\"contractICDKDataCommittee\",\"name\":\"_dataCommitteeAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_forkID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BatchAlreadyVerified\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSequencedOrNotSequenceEnd\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedMaxVerifyBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchBelowLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalPendingStateNumInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesAlreadyActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForcedDataDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HaltTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchAboveLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeBatchTimeTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeForceBatchTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeMultiplierBatchFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewPendingStateTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewStateRootNotInsidePrime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewTrustedAggregatorTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughMaticAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldStateRootDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPendingAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedAggregator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedSequencer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateNotConsolidable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequenceZeroBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampBelowForcedTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StoredRootMustBeDifferentThanNewRoot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionsLengthAboveMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutNotExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AcceptAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ActivateForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"ConsolidatePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"forceBatchNum\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"lastGlobalExitRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"}],\"name\":\"ForceBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"OverridePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"storedStateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"provedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"ProveNonDeterministicPendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"SetForceBatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"SetMultiplierBatchFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"SetPendingStateTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"SetTrustedAggregator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"SetTrustedAggregatorTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"SetTrustedSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"SetTrustedSequencerURL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"SetVerifyBatchTimeTarget\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"TransferAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"forkID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"UpdateZkEVMVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatchesTrustedAggregator\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sequencedBatchNum\",\"type\":\"uint64\"}],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"batchNumToStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"calculateRewardPerBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newStateRoot\",\"type\":\"uint256\"}],\"name\":\"checkStateRootInsidePrime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"consolidatePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataCommitteeAddress\",\"outputs\":[{\"internalType\":\"contractICDKDataCommittee\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maticAmount\",\"type\":\"uint256\"}],\"name\":\"forceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forceBatchTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"forcedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forkID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getForcedBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"oldStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"}],\"name\":\"getInputSnarkBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trustedSequencer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"pendingStateTimeout\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"trustedAggregator\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"trustedAggregatorTimeout\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.InitializePackedParameters\",\"name\":\"initializePackedParameters\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"genesisRoot\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_trustedSequencerURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isForcedBatchDisallowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"isPendingStateConsolidable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingState\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingStateConsolidated\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimestamp\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"matic\",\"outputs\":[{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multiplierBatchFee\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merklePath\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"internalType\":\"structCDKValidium.NewHorizenVerificationRequest\",\"name\":\"verificationRequest\",\"type\":\"tuple\"}],\"name\":\"overridePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingStateTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingStateTransitions\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"exitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merklePath\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"internalType\":\"structCDKValidium.NewHorizenVerificationRequest\",\"name\":\"verificationRequest\",\"type\":\"tuple\"}],\"name\":\"proveNonDeterministicPendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupVerifier\",\"outputs\":[{\"internalType\":\"contractINewHorizenProofVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"transactionsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.BatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"l2Coinbase\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signaturesAndAddrs\",\"type\":\"bytes\"}],\"name\":\"sequenceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structCDKValidium.ForcedBatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"}],\"name\":\"sequenceForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"sequencedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accInputHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sequencedTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"previousLastBatchSequenced\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"setForceBatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"setMultiplierBatchFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"setPendingStateTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"setTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"setTrustedAggregatorTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"setTrustedSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"setTrustedSequencerURL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"setVerifyBatchTimeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"transferAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregatorTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencerURL\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifyBatchTimeTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merklePath\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"internalType\":\"structCDKValidium.NewHorizenVerificationRequest\",\"name\":\"verificationRequest\",\"type\":\"tuple\"}],\"name\":\"verifyBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"attestationId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"merklePath\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"internalType\":\"structCDKValidium.NewHorizenVerificationRequest\",\"name\":\"verificationRequest\",\"type\":\"tuple\"}],\"name\":\"verifyBatchesTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101606040523480156200001257600080fd5b5060405162006336380380620063368339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e0516101005161012051610140516161076200022f600039600081816106c80152818161102c015261305701526000818161082201526110020152600081816105c001526117d00152600081816107e801528181611a20015281816136f00152614cfb01526000818161098e01528181610c15015281816115ab0152818161203f0152818161388b01528181613a9c0152614637015260008181610a4e0152818161420701526149bd0152600081816108de015281816119ee015281816125ed01528181613a700152614af201526161076000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063837a4738116101ff578063c89e42df1161011a578063e8920e7d116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e8920e7d14610a36578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d8d1091b116100e9578063d8d1091b146109c3578063d939b315146109d6578063dbc16976146109fe578063e7a7ed0214610a0657600080fd5b8063c89e42df14610947578063cfa8ed471461095a578063d02103ca14610989578063d2e129f9146109b057600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b097146108d9578063ba58ae3914610900578063c0ed84e014610913578063c754c7ed1461091b57600080fd5b8063ada8f9191461080a578063adc879e91461081d578063afd23cbe14610844578063b4d63f581461087257600080fd5b806399f5634e116101ce57806399f5634e146107b55780639c9f3dfe146107bd578063a066215c146107d0578063a3c573eb146107e357600080fd5b8063837a4738146106ea578063841b24d71461075f5780638c3d73011461078f5780638da5cb5b1461079757600080fd5b80634a1a89a7116102ef57806362e533b811610282578063715018a611610251578063715018a6146106945780637215541a1461069c5780637fcb3653146106af578063831c7ead146106c357600080fd5b806362e533b81461063b5780636516dbad1461064e5780636b8616ce146106615780636ff512cc1461068157600080fd5b80635392c5e0116102be5780635392c5e0146105f5578063542028d5146106235780635ec919581461062b578063604691691461063357600080fd5b80634a1a89a7146105885780634a910e6a146105a85780634df61d24146105bb5780634e487706146105e257600080fd5b80632678224711610367578063423fa85611610336578063423fa85614610519578063438a539914610539578063456052671461054c578063458c04771461057457600080fd5b8063267822471461048257806329878983146104c7578063383b3be8146104f3578063394218e91461050657600080fd5b806315064c96116103a357806315064c961461042b5780631816b7e51461044857806319d8ac611461045b578063220d78991461046f57600080fd5b806308adf99a146103ca5780630a0d9fbe146103df578063107bf28c14610416575b600080fd5b6103dd6103d83660046153e1565b610aff565b005b606f546103f890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61041e610d0d565b60405161040d91906154e2565b606f546104389060ff1681565b604051901515815260200161040d565b6103dd6104563660046154fc565b610d9b565b6073546103f89067ffffffffffffffff1681565b61041e61047d366004615520565b610eb3565b607b546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040d565b6074546104a29068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b61043861050136600461556d565b61108a565b6103dd61051436600461556d565b6110e0565b6073546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105473660046155f5565b611264565b6073546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103f89067ffffffffffffffff1681565b6079546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105b636600461556d565b611ae1565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6105f036600461556d565b611b94565b61061561060336600461556d565b60756020526000908152604090205481565b60405190815260200161040d565b61041e611d18565b6103dd611d25565b610615611e25565b6103dd6106493660046156a7565b611e3b565b6103dd61065c3660046153e1565b6121cf565b61061561066f36600461556d565b60716020526000908152604090205481565b6103dd61068f366004615728565b612280565b6103dd612355565b6103dd6106aa36600461556d565b612369565b6074546103f89067ffffffffffffffff1681565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b6107336106f8366004615743565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff958616815294909316602085015291830152606082015260800161040d565b6079546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd6124d9565b60335473ffffffffffffffffffffffffffffffffffffffff166104a2565b6106156125a5565b6103dd6107cb36600461556d565b6126fe565b6103dd6107de36600461556d565b61287a565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610818366004615728565b612980565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b606f5461085f906901000000000000000000900461ffff1681565b60405161ffff909116815260200161040d565b6108b361088036600461556d565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff928316602085015291169082015260600161040d565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b61043861090e366004615743565b612a44565b6103f8612ace565b607b546103f89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61095536600461583f565b612b23565b606f546104a2906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6109be366004615874565b612bb0565b6103dd6109d1366004615927565b6130fb565b6079546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61369d565b6073546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd610a443660046156a7565b613776565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610a7e36600461599c565b61393a565b607b54610438907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b6103dd610abe366004615728565b613d30565b6103dd610ad1366004615728565b613e02565b607a546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b61061560705481565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610b5c576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b6b87878787878787613eb6565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff86811691821790925560009081526075602052604090208390556079541615610be657607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051828152339067ffffffffffffffff8616907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a350505050505050565b60778054610d1a906159e8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d46906159e8565b8015610d935780601f10610d6857610100808354040283529160200191610d93565b820191906000526020600020905b815481529060010190602001808311610d7657829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610dec576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610e0557506103ff8161ffff16115b15610e3c576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610ee7575081155b15610f1e576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610f55576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f5e84612a44565b610f94576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60795467ffffffffffffffff828116600090815260786020526040812054909242926110ce9270010000000000000000000000000000000090920481169116615a64565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611131576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611178576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166111e75760795467ffffffffffffffff78010000000000000000000000000000000000000000000000009091048116908216106111e7576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610ea8565b606f5460ff16156112a1576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611301576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600081900361133d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8811115611379576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156117925760008c8c838181106113e1576113e1615a8c565b9050608002018036038101906113f79190615abb565b606081015190915067ffffffffffffffff1615611568578461141881615b2c565b955050600081600001518260200151836060015160405160200161147493929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146114fd576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611562576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611666565b60208101511580159061162f575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af1158015611609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162d9190615b53565b155b15611666576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff161080611699575042816040015167ffffffffffffffff16115b156116d0576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e60405160200161175f9594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061178a90615b6c565b9150506113c5565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906118099085908c908c90600401615bed565b60006040518083038186803b15801561182157600080fd5b505afa158015611835573d6000803e3d6000fd5b5050505085846118459190615a64565b60735490945067ffffffffffffffff7801000000000000000000000000000000000000000000000000909104811690841611156118ae576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118ba8285615c10565b6118ce9067ffffffffffffffff1688615c31565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c84169116179302929092179055909150828116908516146119c457607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b611a163330836070546119d79190615c4a565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692919061435e565b611a1e614440565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611a8657600080fd5b505af1158015611a9a573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611b8857606f5460ff1615611b49576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b528161108a565b611b88576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b91816144ed565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611be5576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611c2c576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611c9757607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611c97576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610ea8565b60768054610d1a906159e8565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611d76576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff16611dd2576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611e369190615c4a565b905090565b606f5460ff1615611e78576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8581166000908152607260205260409020600101544292611ec592780100000000000000000000000000000000000000000000000090910481169116615a64565b67ffffffffffffffff161115611f07576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8611f148686615c10565b67ffffffffffffffff161115611f56576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f64868686868686614700565b611f6d84614b19565b607954700100000000000000000000000000000000900467ffffffffffffffff166000036120b557607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561201057607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561209857600080fd5b505af11580156120ac573d6000803e3d6000fd5b50505050612185565b6120bd614440565b6079805467ffffffffffffffff169060006120d783615b2c565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815287831660208083019182528284018981526060840189815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051828152339067ffffffffffffffff8616907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a3505050505050565b606f5460ff161561220c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61221b87878787878787613eb6565b67ffffffffffffffff84166000908152607560209081526040918290205482519081529081018490527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1612277614cf9565b50505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146122d1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610ea8565b61235d614d81565b6123676000614e02565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146124d1576000612392612ace565b90508067ffffffffffffffff168267ffffffffffffffff16116123e1576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000090910481169083161180612427575067ffffffffffffffff80831660009081526072602052604090206001015416155b1561245e576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff808316600090815260726020526040902060010154429161248d9162093a809116615a64565b67ffffffffffffffff1611156124cf576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611b91614cf9565b607b5473ffffffffffffffffffffffffffffffffffffffff16331461252a576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126589190615b53565b90506000612664612ace565b60735467ffffffffffffffff6801000000000000000082048116916126bc9170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615c10565b6126c69190615a64565b6126d09190615c10565b67ffffffffffffffff169050806000036126ed5760009250505090565b6126f78183615c90565b9250505090565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461274f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115612796576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166127fd5760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106127fd576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610ea8565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146128cb576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612912576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610ea8565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146129d1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610ea8565b600067ffffffff0000000167ffffffffffffffff8316108015612a7c575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612a9d575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612ab4575067ffffffff0000000160c083901c105b15612ac157506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612b12575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b74576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612b808282615cf2565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610ea891906154e2565b600054610100900460ff1615808015612bd05750600054600160ff909116105b80612bea5750303b158015612bea575060005460ff166001145b612c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612cd957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612ce66020880188615728565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612d3b6040880160208901615728565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612da06080880160608901615728565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612e2b8682615cf2565b506077612e388582615cf2565b5062093a80612e4d6060890160408a0161556d565b67ffffffffffffffff161115612e8f576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e9f606088016040890161556d565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a80612f0160a0890160808a0161556d565b67ffffffffffffffff161115612f43576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f5360a088016080890161556d565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055613032614e79565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516130889493929190615e0c565b60405180910390a1801561227757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613158576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613195576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190036131d1576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561320d576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613258918491700100000000000000000000000000000000900416615e44565b1115613290576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b8481101561353a5760008787838181106132f0576132f0615a8c565b90506020028101906133029190615e57565b61330b90615e95565b90508361331781615b2c565b825180516020918201208185015160408087015190519499509194506000936133799386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff8916600090815260719093529120549091508114613402576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8616600090815260716020526040812055613427600189615c31565b84036134965742607b60149054906101000a900467ffffffffffffffff1684604001516134549190615a64565b67ffffffffffffffff161115613496576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c01604051602081830303815290604052805190602001209450505050808061353290615b6c565b9150506132d4565b506135458484615a64565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146136ee576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561375657600080fd5b505af115801561376a573d6000803e3d6000fd5b50505050612367614f19565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146137d3576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6137e1868686868686614700565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8681169182179092556000908152607560205260409020839055607954161561385c57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156138e457600080fd5b505af11580156138f8573d6000803e3d6000fd5b505060405184815233925067ffffffffffffffff871691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe906020016121bf565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613997576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139d4576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139de611e25565b905081811115613a1a576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a56576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a9873ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461435e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b299190615b53565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6383615b2c565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613b9a929190615f25565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cca57607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d29565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d209493929190615f35565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d81576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610ea8565b613e0a614d81565b73ffffffffffffffffffffffffffffffffffffffff8116613ead576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612c72565b611b9181614e02565b600067ffffffffffffffff881615613f845760795467ffffffffffffffff9081169089161115613f12576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8088166000908152607860205260409020600281015481549092888116680100000000000000009092041614613f7e576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614020565b5067ffffffffffffffff851660009081526075602052604090205480613fd6576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff9081169087161115614020576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908816118061405257508767ffffffffffffffff168767ffffffffffffffff1611155b80614079575060795467ffffffffffffffff68010000000000000000909104811690881611155b156140b0576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff878116600090815260786020526040902054680100000000000000009004811690861614614113576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006141228787878588610eb3565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516141579190615f6b565b602060405180830381855afa158015614174573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906141979190615b53565b6141a19190615f7d565b905060006040518060400160405280600681526020017f66666c6f6e6b0000000000000000000000000000000000000000000000000000815250826040516020016141ed929190615f91565b6040516020818303038152906040528051906020012090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddea78868660000135838880602001906142579190615fb3565b8a604001358b606001356040518763ffffffff1660e01b81526004016142829695949392919061601b565b6020604051808303816000875af11580156142a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142c59190616088565b6142fb576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8a16600090815260786020526040902060020154869003614351576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261443a9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614fa8565b50505050565b60795467ffffffffffffffff680100000000000000008204811691161115612367576079546000906144899068010000000000000000900467ffffffffffffffff166001615a64565b90506144948161108a565b15611b91576079546000906002906144b790849067ffffffffffffffff16615c10565b6144c191906160aa565b6144cb9083615a64565b90506144d68161108a565b156144e8576144e4816144ed565b5050565b6144e4825b60795467ffffffffffffffff680100000000000000009091048116908216111580614527575060795467ffffffffffffffff908116908216115b1561455e576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b15801561469057600080fd5b505af11580156146a4573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e84600201546040516146f391815260200190565b60405180910390a3505050565b60008061470b612ace565b905067ffffffffffffffff8816156147db5760795467ffffffffffffffff9081169089161115614767576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80891660009081526078602052604090206002810154815490945090918981166801000000000000000090920416146147d5576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061487c565b67ffffffffffffffff871660009081526075602052604090205491508161482e576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff16111561487c576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168667ffffffffffffffff16116148c9576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006148d88888888689610eb3565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161490d9190615f6b565b602060405180830381855afa15801561492a573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061494d9190615b53565b6149579190615f7d565b905060006040518060400160405280600681526020017f66666c6f6e6b0000000000000000000000000000000000000000000000000000815250826040516020016149a3929190615f91565b6040516020818303038152906040528051906020012090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddea7886876000013583898060200190614a0d9190615fb3565b8b604001358c606001356040518763ffffffff1660e01b8152600401614a389695949392919061601b565b6020604051808303816000875af1158015614a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a7b9190616088565b614ab1576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61435133614abf868c615c10565b67ffffffffffffffff16614ad16125a5565b614adb9190615c4a565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691906150b9565b6000614b23612ace565b905081600080614b338484615c10565b606f5467ffffffffffffffff9182169250600091614b579161010090041642615c31565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614be25767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614bc057600181015468010000000000000000900467ffffffffffffffff169450614bdc565b614bca8686615c10565b67ffffffffffffffff16935050614be2565b50614b5a565b6000614bee8484615c31565b905083811015614c4557808403600c8111614c095780614c0c565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614c3b57614c3b615c61565b0460705550614cb5565b838103600c8111614c565780614c59565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614c9057614c90615c61565b04905080607054670de0b6b3a76400000281614cae57614cae615c61565b0460705550505b683635c9adc5dea000006070541115614cda57683635c9adc5dea00000607055612277565b633b9aca00607054101561227757633b9aca0060705550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b158015614d6157600080fd5b505af1158015614d75573d6000803e3d6000fd5b5050505061236761510f565b60335473ffffffffffffffffffffffffffffffffffffffff163314612367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612c72565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614f10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612c72565b61236733614e02565b606f5460ff16614f55576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600061500a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166151a29092919063ffffffff16565b8051909150156150b457808060200190518101906150289190616088565b6150b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612c72565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526150b49084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016143b8565b606f5460ff161561514c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b60606151b184846000856151b9565b949350505050565b60608247101561524b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612c72565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516152749190615f6b565b60006040518083038185875af1925050503d80600081146152b1576040519150601f19603f3d011682016040523d82523d6000602084013e6152b6565b606091505b50915091506152c7878383876152d2565b979650505050505050565b606083156153685782516000036153615773ffffffffffffffffffffffffffffffffffffffff85163b615361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612c72565b50816151b1565b6151b1838381511561537d5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7291906154e2565b803567ffffffffffffffff81168114612ac957600080fd5b6000608082840312156153db57600080fd5b50919050565b600080600080600080600060e0888a0312156153fc57600080fd5b615405886153b1565b9650615413602089016153b1565b9550615421604089016153b1565b945061542f606089016153b1565b93506080880135925060a0880135915060c088013567ffffffffffffffff81111561545957600080fd5b6154658a828b016153c9565b91505092959891949750929550565b60005b8381101561548f578181015183820152602001615477565b50506000910152565b600081518084526154b0816020860160208601615474565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006154f56020830184615498565b9392505050565b60006020828403121561550e57600080fd5b813561ffff811681146154f557600080fd5b600080600080600060a0868803121561553857600080fd5b615541866153b1565b945061554f602087016153b1565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561557f57600080fd5b6154f5826153b1565b803573ffffffffffffffffffffffffffffffffffffffff81168114612ac957600080fd5b60008083601f8401126155be57600080fd5b50813567ffffffffffffffff8111156155d657600080fd5b6020830191508360208285010111156155ee57600080fd5b9250929050565b60008060008060006060868803121561560d57600080fd5b853567ffffffffffffffff8082111561562557600080fd5b818801915088601f83011261563957600080fd5b81358181111561564857600080fd5b8960208260071b850101111561565d57600080fd5b6020830197508096505061567360208901615588565b9450604088013591508082111561568957600080fd5b50615696888289016155ac565b969995985093965092949392505050565b60008060008060008060c087890312156156c057600080fd5b6156c9876153b1565b95506156d7602088016153b1565b94506156e5604088016153b1565b9350606087013592506080870135915060a087013567ffffffffffffffff81111561570f57600080fd5b61571b89828a016153c9565b9150509295509295509295565b60006020828403121561573a57600080fd5b6154f582615588565b60006020828403121561575557600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156157a6576157a661575c565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156157ec576157ec61575c565b8160405280935085815286868601111561580557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261583057600080fd5b6154f58383356020850161578b565b60006020828403121561585157600080fd5b813567ffffffffffffffff81111561586857600080fd5b6151b18482850161581f565b60008060008060008086880361012081121561588f57600080fd5b60a081121561589d57600080fd5b5086955060a0870135945060c087013567ffffffffffffffff808211156158c357600080fd5b6158cf8a838b0161581f565b955060e08901359150808211156158e557600080fd5b6158f18a838b0161581f565b945061010089013591508082111561590857600080fd5b5061591589828a016155ac565b979a9699509497509295939492505050565b6000806020838503121561593a57600080fd5b823567ffffffffffffffff8082111561595257600080fd5b818501915085601f83011261596657600080fd5b81358181111561597557600080fd5b8660208260051b850101111561598a57600080fd5b60209290920196919550909350505050565b6000806000604084860312156159b157600080fd5b833567ffffffffffffffff8111156159c857600080fd5b6159d4868287016155ac565b909790965060209590950135949350505050565b600181811c908216806159fc57607f821691505b6020821081036153db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff818116838216019080821115615a8557615a85615a35565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808284031215615acd57600080fd5b6040516080810181811067ffffffffffffffff82111715615af057615af061575c565b80604052508235815260208301356020820152615b0f604084016153b1565b6040820152615b20606084016153b1565b60608201529392505050565b600067ffffffffffffffff808316818103615b4957615b49615a35565b6001019392505050565b600060208284031215615b6557600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615b9d57615b9d615a35565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615c07604083018486615ba4565b95945050505050565b67ffffffffffffffff828116828216039080821115615a8557615a85615a35565b81810381811115615c4457615c44615a35565b92915050565b8082028115828204841417615c4457615c44615a35565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615c9f57615c9f615c61565b500490565b601f8211156150b457600081815260208120601f850160051c81016020861015615ccb5750805b601f850160051c820191505b81811015615cea57828155600101615cd7565b505050505050565b815167ffffffffffffffff811115615d0c57615d0c61575c565b615d2081615d1a84546159e8565b84615ca4565b602080601f831160018114615d735760008415615d3d5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615cea565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615dc057888601518255948401946001909101908401615da1565b5085821015615dfc57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615e3a606083018486615ba4565b9695505050505050565b80820180821115615c4457615c44615a35565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615e8b57600080fd5b9190910192915050565b600060608236031215615ea757600080fd5b6040516060810167ffffffffffffffff8282108183111715615ecb57615ecb61575c565b816040528435915080821115615ee057600080fd5b50830136601f820112615ef257600080fd5b615f013682356020840161578b565b82525060208301356020820152615f1a604084016153b1565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615e3a606083018486615ba4565b60008251615e8b818460208701615474565b600082615f8c57615f8c615c61565b500690565b60008351615fa3818460208801615474565b9190910191825250602001919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615fe857600080fd5b83018035915067ffffffffffffffff82111561600357600080fd5b6020019150600581901b36038213156155ee57600080fd5b86815285602082015260a060408201528360a082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561606057600080fd5b8460051b808760c085013760608301949094525060808101919091520160c001949350505050565b60006020828403121561609a57600080fd5b815180151581146154f557600080fd5b600067ffffffffffffffff808416806160c5576160c5615c61565b9216919091049291505056fea2646970667358221220ce19e4a1286e22b746deda38345f3b7dabe3afa34ac98a05ea40907a9c5eec1164736f6c63430008140033", } // PolygonzkevmABI is the input ABI used to generate the binding from. @@ -1625,46 +1633,46 @@ func (_Polygonzkevm *PolygonzkevmTransactorSession) Initialize(initializePackedP return _Polygonzkevm.Contract.Initialize(&_Polygonzkevm.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) } -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// OverridePendingState is a paid mutator transaction binding the contract method 0x08adf99a. // -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) OverridePendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "overridePendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactor) OverridePendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.contract.Transact(opts, "overridePendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// OverridePendingState is a paid mutator transaction binding the contract method 0x08adf99a. // -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// OverridePendingState is a paid mutator transaction binding the contract method 0x2c1f816a. +// OverridePendingState is a paid mutator transaction binding the contract method 0x08adf99a. // -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactorSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x6516dbad. // -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ProveNonDeterministicPendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "proveNonDeterministicPendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactor) ProveNonDeterministicPendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.contract.Transact(opts, "proveNonDeterministicPendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x6516dbad. // -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x9aa972a3. +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x6516dbad. // -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactorSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -1940,46 +1948,46 @@ func (_Polygonzkevm *PolygonzkevmTransactorSession) TransferOwnership(newOwner c return _Polygonzkevm.Contract.TransferOwnership(&_Polygonzkevm.TransactOpts, newOwner) } -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// VerifyBatches is a paid mutator transaction binding the contract method 0x62e533b8. // -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatches(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "verifyBatches", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatches(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.contract.Transact(opts, "verifyBatches", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// VerifyBatches is a paid mutator transaction binding the contract method 0x62e533b8. // -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// VerifyBatches is a paid mutator transaction binding the contract method 0x621dd411. +// VerifyBatches is a paid mutator transaction binding the contract method 0x62e533b8. // -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xe8920e7d. // -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatchesTrustedAggregator(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "verifyBatchesTrustedAggregator", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatchesTrustedAggregator(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.contract.Transact(opts, "verifyBatchesTrustedAggregator", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xe8920e7d. // -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0x2b0006fa. +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xe8920e7d. // -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes32[24] proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof [24][32]byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, (uint256,bytes32[],uint256,uint256) verificationRequest) returns() +func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, verificationRequest CDKValidiumNewHorizenVerificationRequest) (*types.Transaction, error) { + return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, verificationRequest) } // PolygonzkevmAcceptAdminRoleIterator is returned from FilterAcceptAdminRole and is used to iterate over the raw logs and unpacked data for AcceptAdminRole events raised by the Polygonzkevm contract. diff --git a/etherman/smartcontracts/script.sh b/etherman/smartcontracts/script.sh index 1f7849d96f..725ee26ab0 100755 --- a/etherman/smartcontracts/script.sh +++ b/etherman/smartcontracts/script.sh @@ -13,4 +13,5 @@ gen polygonzkevmbridge gen matic gen polygonzkevmglobalexitroot gen mockverifier -gen cdkdatacommittee \ No newline at end of file +gen cdkdatacommittee +gen newhorizenproofverifier diff --git a/etherman/types.go b/etherman/types.go index 0f4f60adaa..401759efda 100644 --- a/etherman/types.go +++ b/etherman/types.go @@ -19,6 +19,7 @@ type Block struct { SequencedForceBatches [][]SequencedForceBatch ForkIDs []ForkID ReceivedAt time.Time + Attestation []Attestation } // GlobalExitRoot struct @@ -74,3 +75,8 @@ type ForkID struct { ForkID uint64 Version string } + +type Attestation struct { + AttestationId uint64 + MerkleRoot common.Hash +} diff --git a/etherman/types/finalproofinputs.go b/etherman/types/finalproofinputs.go index 25a8d7e18f..91998da1d0 100644 --- a/etherman/types/finalproofinputs.go +++ b/etherman/types/finalproofinputs.go @@ -1,10 +1,16 @@ package types -import "github.com/0xPolygonHermez/zkevm-node/aggregator/prover" +import ( + "github.com/0xPolygonHermez/zkevm-node/aggregator/prover" +) // FinalProofInputs struct type FinalProofInputs struct { FinalProof *prover.FinalProof NewLocalExitRoot []byte NewStateRoot []byte + AttestationId uint64 + LeafCount uint64 + LeafIndex uint64 + MerklePath []string } diff --git a/ethtxmanager/ethtxmanager.go b/ethtxmanager/ethtxmanager.go index 1c48071cf0..799f625c98 100644 --- a/ethtxmanager/ethtxmanager.go +++ b/ethtxmanager/ethtxmanager.go @@ -414,6 +414,15 @@ func (c *Client) monitorTx(ctx context.Context, mTx monitoredTx, logger *log.Log err := c.etherman.SendTx(ctx, signedTx) if err != nil { logger.Errorf("failed to send tx %v to network: %v", signedTx.Hash().String(), err) + err := c.reviewMonitoredTxNonce(ctx, &mTx, logger) + if err != nil { + logger.Errorf("failed to review monitored tx nonce: %v", err) + return + } + err = c.storage.Update(ctx, mTx, nil) + if err != nil { + logger.Errorf("failed to update monitored tx nonce change: %v", err) + } return } logger.Infof("signed tx sent to the network: %v", signedTx.Hash().String()) diff --git a/ethtxmanager/mock_etherman_test.go b/ethtxmanager/mock_etherman_test.go index 4ae3920e2c..55fef0ddbe 100644 --- a/ethtxmanager/mock_etherman_test.go +++ b/ethtxmanager/mock_etherman_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package ethtxmanager @@ -274,12 +274,13 @@ func (_m *ethermanMock) WaitTxToBeMined(ctx context.Context, tx *types.Transacti return r0, r1 } -// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEthermanMock(t interface { +type mockConstructorTestingTnewEthermanMock interface { mock.TestingT Cleanup(func()) -}) *ethermanMock { +} + +// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEthermanMock(t mockConstructorTestingTnewEthermanMock) *ethermanMock { mock := ðermanMock{} mock.Mock.Test(t) diff --git a/ethtxmanager/mock_state_test.go b/ethtxmanager/mock_state_test.go index e01cf3ef88..befb59638c 100644 --- a/ethtxmanager/mock_state_test.go +++ b/ethtxmanager/mock_state_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package ethtxmanager @@ -43,12 +43,13 @@ func (_m *stateMock) GetLastBlock(ctx context.Context, dbTx pgx.Tx) (*state.Bloc return r0, r1 } -// newStateMock creates a new instance of stateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newStateMock(t interface { +type mockConstructorTestingTnewStateMock interface { mock.TestingT Cleanup(func()) -}) *stateMock { +} + +// newStateMock creates a new instance of stateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newStateMock(t mockConstructorTestingTnewStateMock) *stateMock { mock := &stateMock{} mock.Mock.Test(t) diff --git a/gasprice/mock_etherman.go b/gasprice/mock_etherman.go index ce45468181..488c86f58a 100644 --- a/gasprice/mock_etherman.go +++ b/gasprice/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package gasprice @@ -30,12 +30,13 @@ func (_m *ethermanMock) GetL1GasPrice(ctx context.Context) *big.Int { return r0 } -// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEthermanMock(t interface { +type mockConstructorTestingTnewEthermanMock interface { mock.TestingT Cleanup(func()) -}) *ethermanMock { +} + +// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEthermanMock(t mockConstructorTestingTnewEthermanMock) *ethermanMock { mock := ðermanMock{} mock.Mock.Test(t) diff --git a/gasprice/mock_pool.go b/gasprice/mock_pool.go index a91c5cdadd..901d0b89a1 100644 --- a/gasprice/mock_pool.go +++ b/gasprice/mock_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package gasprice @@ -69,12 +69,13 @@ func (_m *poolMock) SetGasPrices(ctx context.Context, l2GasPrice uint64, l1GasPr return r0 } -// newPoolMock creates a new instance of poolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newPoolMock(t interface { +type mockConstructorTestingTnewPoolMock interface { mock.TestingT Cleanup(func()) -}) *poolMock { +} + +// newPoolMock creates a new instance of poolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newPoolMock(t mockConstructorTestingTnewPoolMock) *poolMock { mock := &poolMock{} mock.Mock.Test(t) diff --git a/go.mod b/go.mod index 40625594cd..866fe250fd 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.21 require ( github.com/0xPolygonHermez/zkevm-data-streamer v0.1.14 + github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 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 @@ -26,6 +27,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/umbracle/ethgo v0.1.4-0.20230712173909-df37dddf16f0 github.com/urfave/cli/v2 v2.25.7 + github.com/ybbus/jsonrpc/v3 v3.1.4 go.uber.org/zap v1.26.0 golang.org/x/crypto v0.18.0 golang.org/x/net v0.20.0 @@ -38,6 +40,7 @@ require ( require ( dario.cat/mergo v1.0.0 // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect @@ -58,12 +61,16 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect + github.com/decred/base58 v1.0.4 // indirect + github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect @@ -88,6 +95,8 @@ require ( github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect @@ -118,17 +127,19 @@ require ( 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/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pierrec/xxHash v0.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/procfs v0.11.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.7.0 // indirect + github.com/rs/cors v1.8.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -148,6 +159,7 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 // indirect github.com/valyala/fastjson v1.4.1 // indirect + github.com/vedhavyas/go-subkey/v2 v2.0.0 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect @@ -161,6 +173,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/warnings.v0 v0.1.2 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 4dcd96039b..99d08aa5af 100644 --- a/go.sum +++ b/go.sum @@ -53,6 +53,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= @@ -101,12 +103,16 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1 h1:io49TJ8IOIlzipioJc9pJlrjgdJvqktpUWYxVY5AUjE= +github.com/centrifuge/go-substrate-rpc-client/v4 v4.2.1/go.mod h1:k61SBXqYmnZO4frAJyH3iuqjolYrYsq79r8EstmklDY= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -153,6 +159,9 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= @@ -169,8 +178,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= +github.com/decred/base58 v1.0.4/go.mod h1:jJswKPEdvpFpvf7dsDvFZyLT22xZ9lWqEByX38oGd9E= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= @@ -384,6 +398,11 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/habx/pg-commands v0.6.1 h1:+9vo6+N/usIZ5rF6jIJle5Tjvf01B09i0FPfzIvgoIg= github.com/habx/pg-commands v0.6.1/go.mod h1:PkBR8QOJKbIjv4r1NuOFrz+LyjsbiAtmQbuu6+w0SAA= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= @@ -592,6 +611,9 @@ github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/le github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miguelmota/go-solidity-sha3 v0.1.1 h1:3Y08sKZDtudtE5kbTBPC9RYJznoSYyWI9VD6mghU0CA= github.com/miguelmota/go-solidity-sha3 v0.1.1/go.mod h1:sax1FvQF+f71j8W1uUHMZn8NxKyl5rYLks2nqj8RFEw= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -648,6 +670,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= @@ -683,8 +707,8 @@ github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4 github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -801,6 +825,8 @@ github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7E github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vedhavyas/go-subkey/v2 v2.0.0 h1:LemDIsrVtRSOkp0FA8HxP6ynfKjeOj3BY2U9UNfeDMA= +github.com/vedhavyas/go-subkey/v2 v2.0.0/go.mod h1:95aZ+XDCWAUUynjlmi7BtPExjXgXxByE0WfBwbmIRH4= github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= @@ -820,6 +846,8 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/ybbus/jsonrpc/v3 v3.1.4 h1:pPmgfWXnqR2GdIlealyCzmV6LV3nxm3w9gwA1B3cP3Y= +github.com/ybbus/jsonrpc/v3 v3.1.4/go.mod h1:4HQTl0UzErqWGa6bSXhp8rIjifMAMa55E4D5wdhe768= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= @@ -870,8 +898,10 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -1325,6 +1355,8 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= diff --git a/jsonrpc/mock_storage.go b/jsonrpc/mock_storage.go index e32d1205b9..0cab933585 100644 --- a/jsonrpc/mock_storage.go +++ b/jsonrpc/mock_storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package jsonrpc @@ -181,12 +181,13 @@ func (_m *storageMock) UpdateFilterLastPoll(filterID string) error { return r0 } -// newStorageMock creates a new instance of storageMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newStorageMock(t interface { +type mockConstructorTestingTnewStorageMock interface { mock.TestingT Cleanup(func()) -}) *storageMock { +} + +// newStorageMock creates a new instance of storageMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newStorageMock(t mockConstructorTestingTnewStorageMock) *storageMock { mock := &storageMock{} mock.Mock.Test(t) diff --git a/jsonrpc/mocks/mock_dbtx.go b/jsonrpc/mocks/mock_dbtx.go index 10b1d0da07..cfbca16e32 100644 --- a/jsonrpc/mocks/mock_dbtx.go +++ b/jsonrpc/mocks/mock_dbtx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -283,12 +283,13 @@ func (_m *DBTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResult return r0 } -// NewDBTxMock creates a new instance of DBTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDBTxMock(t interface { +type mockConstructorTestingTNewDBTxMock interface { mock.TestingT Cleanup(func()) -}) *DBTxMock { +} + +// NewDBTxMock creates a new instance of DBTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDBTxMock(t mockConstructorTestingTNewDBTxMock) *DBTxMock { mock := &DBTxMock{} mock.Mock.Test(t) diff --git a/jsonrpc/mocks/mock_etherman.go b/jsonrpc/mocks/mock_etherman.go index e6a7605fd4..96f1d60340 100644 --- a/jsonrpc/mocks/mock_etherman.go +++ b/jsonrpc/mocks/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -61,12 +61,13 @@ func (_m *EthermanMock) GetSafeBlockNumber(ctx context.Context) (uint64, error) return r0, r1 } -// NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEthermanMock(t interface { +type mockConstructorTestingTNewEthermanMock interface { mock.TestingT Cleanup(func()) -}) *EthermanMock { +} + +// NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEthermanMock(t mockConstructorTestingTNewEthermanMock) *EthermanMock { mock := &EthermanMock{} mock.Mock.Test(t) diff --git a/jsonrpc/mocks/mock_pool.go b/jsonrpc/mocks/mock_pool.go index 191d304c5c..8c893c17b2 100644 --- a/jsonrpc/mocks/mock_pool.go +++ b/jsonrpc/mocks/mock_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -209,12 +209,13 @@ func (_m *PoolMock) GetTxByHash(ctx context.Context, hash common.Hash) (*pool.Tr return r0, r1 } -// NewPoolMock creates a new instance of PoolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPoolMock(t interface { +type mockConstructorTestingTNewPoolMock interface { mock.TestingT Cleanup(func()) -}) *PoolMock { +} + +// NewPoolMock creates a new instance of PoolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPoolMock(t mockConstructorTestingTNewPoolMock) *PoolMock { mock := &PoolMock{} mock.Mock.Test(t) diff --git a/jsonrpc/mocks/mock_state.go b/jsonrpc/mocks/mock_state.go index d857e9053b..567c9a55d3 100644 --- a/jsonrpc/mocks/mock_state.go +++ b/jsonrpc/mocks/mock_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package mocks @@ -1062,12 +1062,13 @@ func (_m *StateMock) StartToMonitorNewL2Blocks() { _m.Called() } -// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStateMock(t interface { +type mockConstructorTestingTNewStateMock interface { mock.TestingT Cleanup(func()) -}) *StateMock { +} + +// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStateMock(t mockConstructorTestingTNewStateMock) *StateMock { mock := &StateMock{} mock.Mock.Test(t) diff --git a/merkletree/hashdb/hashdb.pb.go b/merkletree/hashdb/hashdb.pb.go index ecece0a6a3..74b022d22c 100644 --- a/merkletree/hashdb/hashdb.pb.go +++ b/merkletree/hashdb/hashdb.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.28.1 // protoc v3.21.12 // source: hashdb.proto diff --git a/merkletree/hashdb/hashdb_grpc.pb.go b/merkletree/hashdb/hashdb_grpc.pb.go index 41d28b5654..3e549bc704 100644 --- a/merkletree/hashdb/hashdb_grpc.pb.go +++ b/merkletree/hashdb/hashdb_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 -// source: hashdb.proto package hashdb @@ -16,22 +12,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - HashDBService_Set_FullMethodName = "/hashdb.v1.HashDBService/Set" - HashDBService_Get_FullMethodName = "/hashdb.v1.HashDBService/Get" - HashDBService_SetProgram_FullMethodName = "/hashdb.v1.HashDBService/SetProgram" - HashDBService_GetProgram_FullMethodName = "/hashdb.v1.HashDBService/GetProgram" - HashDBService_LoadDB_FullMethodName = "/hashdb.v1.HashDBService/LoadDB" - HashDBService_LoadProgramDB_FullMethodName = "/hashdb.v1.HashDBService/LoadProgramDB" - HashDBService_Flush_FullMethodName = "/hashdb.v1.HashDBService/Flush" - HashDBService_SemiFlush_FullMethodName = "/hashdb.v1.HashDBService/SemiFlush" - HashDBService_GetFlushStatus_FullMethodName = "/hashdb.v1.HashDBService/GetFlushStatus" - HashDBService_GetFlushData_FullMethodName = "/hashdb.v1.HashDBService/GetFlushData" -) - // HashDBServiceClient is the client API for HashDBService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -58,7 +40,7 @@ func NewHashDBServiceClient(cc grpc.ClientConnInterface) HashDBServiceClient { func (c *hashDBServiceClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) { out := new(SetResponse) - err := c.cc.Invoke(ctx, HashDBService_Set_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Set", in, out, opts...) if err != nil { return nil, err } @@ -67,7 +49,7 @@ func (c *hashDBServiceClient) Set(ctx context.Context, in *SetRequest, opts ...g func (c *hashDBServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { out := new(GetResponse) - err := c.cc.Invoke(ctx, HashDBService_Get_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Get", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +58,7 @@ func (c *hashDBServiceClient) Get(ctx context.Context, in *GetRequest, opts ...g func (c *hashDBServiceClient) SetProgram(ctx context.Context, in *SetProgramRequest, opts ...grpc.CallOption) (*SetProgramResponse, error) { out := new(SetProgramResponse) - err := c.cc.Invoke(ctx, HashDBService_SetProgram_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/SetProgram", in, out, opts...) if err != nil { return nil, err } @@ -85,7 +67,7 @@ func (c *hashDBServiceClient) SetProgram(ctx context.Context, in *SetProgramRequ func (c *hashDBServiceClient) GetProgram(ctx context.Context, in *GetProgramRequest, opts ...grpc.CallOption) (*GetProgramResponse, error) { out := new(GetProgramResponse) - err := c.cc.Invoke(ctx, HashDBService_GetProgram_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetProgram", in, out, opts...) if err != nil { return nil, err } @@ -94,7 +76,7 @@ func (c *hashDBServiceClient) GetProgram(ctx context.Context, in *GetProgramRequ func (c *hashDBServiceClient) LoadDB(ctx context.Context, in *LoadDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, HashDBService_LoadDB_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/LoadDB", in, out, opts...) if err != nil { return nil, err } @@ -103,7 +85,7 @@ func (c *hashDBServiceClient) LoadDB(ctx context.Context, in *LoadDBRequest, opt func (c *hashDBServiceClient) LoadProgramDB(ctx context.Context, in *LoadProgramDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, HashDBService_LoadProgramDB_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/LoadProgramDB", in, out, opts...) if err != nil { return nil, err } @@ -112,7 +94,7 @@ func (c *hashDBServiceClient) LoadProgramDB(ctx context.Context, in *LoadProgram func (c *hashDBServiceClient) Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error) { out := new(FlushResponse) - err := c.cc.Invoke(ctx, HashDBService_Flush_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Flush", in, out, opts...) if err != nil { return nil, err } @@ -121,7 +103,7 @@ func (c *hashDBServiceClient) Flush(ctx context.Context, in *FlushRequest, opts func (c *hashDBServiceClient) SemiFlush(ctx context.Context, in *SemiFlushRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, HashDBService_SemiFlush_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/SemiFlush", in, out, opts...) if err != nil { return nil, err } @@ -130,7 +112,7 @@ func (c *hashDBServiceClient) SemiFlush(ctx context.Context, in *SemiFlushReques func (c *hashDBServiceClient) GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) { out := new(GetFlushStatusResponse) - err := c.cc.Invoke(ctx, HashDBService_GetFlushStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetFlushStatus", in, out, opts...) if err != nil { return nil, err } @@ -139,7 +121,7 @@ func (c *hashDBServiceClient) GetFlushStatus(ctx context.Context, in *emptypb.Em func (c *hashDBServiceClient) GetFlushData(ctx context.Context, in *GetFlushDataRequest, opts ...grpc.CallOption) (*GetFlushDataResponse, error) { out := new(GetFlushDataResponse) - err := c.cc.Invoke(ctx, HashDBService_GetFlushData_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetFlushData", in, out, opts...) if err != nil { return nil, err } @@ -206,8 +188,8 @@ type UnsafeHashDBServiceServer interface { mustEmbedUnimplementedHashDBServiceServer() } -func RegisterHashDBServiceServer(s grpc.ServiceRegistrar, srv HashDBServiceServer) { - s.RegisterService(&HashDBService_ServiceDesc, srv) +func RegisterHashDBServiceServer(s *grpc.Server, srv HashDBServiceServer) { + s.RegisterService(&_HashDBService_serviceDesc, srv) } func _HashDBService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -220,7 +202,7 @@ func _HashDBService_Set_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_Set_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/Set", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).Set(ctx, req.(*SetRequest)) @@ -238,7 +220,7 @@ func _HashDBService_Get_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_Get_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).Get(ctx, req.(*GetRequest)) @@ -256,7 +238,7 @@ func _HashDBService_SetProgram_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_SetProgram_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/SetProgram", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).SetProgram(ctx, req.(*SetProgramRequest)) @@ -274,7 +256,7 @@ func _HashDBService_GetProgram_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_GetProgram_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/GetProgram", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).GetProgram(ctx, req.(*GetProgramRequest)) @@ -292,7 +274,7 @@ func _HashDBService_LoadDB_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_LoadDB_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/LoadDB", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).LoadDB(ctx, req.(*LoadDBRequest)) @@ -310,7 +292,7 @@ func _HashDBService_LoadProgramDB_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_LoadProgramDB_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/LoadProgramDB", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).LoadProgramDB(ctx, req.(*LoadProgramDBRequest)) @@ -328,7 +310,7 @@ func _HashDBService_Flush_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_Flush_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/Flush", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).Flush(ctx, req.(*FlushRequest)) @@ -346,7 +328,7 @@ func _HashDBService_SemiFlush_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_SemiFlush_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/SemiFlush", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).SemiFlush(ctx, req.(*SemiFlushRequest)) @@ -364,7 +346,7 @@ func _HashDBService_GetFlushStatus_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_GetFlushStatus_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/GetFlushStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).GetFlushStatus(ctx, req.(*emptypb.Empty)) @@ -382,7 +364,7 @@ func _HashDBService_GetFlushData_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: HashDBService_GetFlushData_FullMethodName, + FullMethod: "/hashdb.v1.HashDBService/GetFlushData", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HashDBServiceServer).GetFlushData(ctx, req.(*GetFlushDataRequest)) @@ -390,10 +372,7 @@ func _HashDBService_GetFlushData_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -// HashDBService_ServiceDesc is the grpc.ServiceDesc for HashDBService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var HashDBService_ServiceDesc = grpc.ServiceDesc{ +var _HashDBService_serviceDesc = grpc.ServiceDesc{ ServiceName: "hashdb.v1.HashDBService", HandlerType: (*HashDBServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/nhconnector/errors.go b/nhconnector/errors.go new file mode 100644 index 0000000000..c339a843e1 --- /dev/null +++ b/nhconnector/errors.go @@ -0,0 +1,7 @@ +package nhconnector + +const ( + // Error for poe_ProofPath RPC call + ErrProofNotFoundInAttestation = "Proof not found in the attestation!" + ErrAttestationNotPublishedYet = "Attestation not published yet!" +) diff --git a/nhconnector/nhconnector.go b/nhconnector/nhconnector.go new file mode 100644 index 0000000000..b95af8ae4b --- /dev/null +++ b/nhconnector/nhconnector.go @@ -0,0 +1,365 @@ +package nhconnector + +import ( + "bytes" + "context" + "fmt" + "os" + "reflect" + "strings" + + "github.com/0xPolygonHermez/zkevm-node/aggregator/prover" + "github.com/0xPolygonHermez/zkevm-node/log" + gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" + "github.com/centrifuge/go-substrate-rpc-client/v4/scale" + "github.com/centrifuge/go-substrate-rpc-client/v4/signature" + "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "github.com/ybbus/jsonrpc/v3" +) + +type NHConnector struct { + nhApi *gsrpc.SubstrateAPI + nhRpc jsonrpc.RPCClient + nhKeyPair signature.KeyringPair +} + +func New() (NHConnector, error) { + + // set websocket endoint + nhWsURL := os.Getenv("NH_WS_URL") + + // Instantiate the API + api, err := gsrpc.NewSubstrateAPI(nhWsURL) + if err != nil { + panic(err) + } + + // Instantiate the RPC client + nhRpcURL := os.Getenv("NH_RPC_URL") + rpcClient := jsonrpc.NewClient(nhRpcURL) + + // Create key pair from seed + keyPair, err := signature.KeyringPairFromSecret(os.Getenv("NH_SEED_PHRASE"), 42) + + nhConnector := NHConnector{ + nhApi: api, + nhRpc: rpcClient, + nhKeyPair: keyPair, + } + + return nhConnector, nil +} + +// Get the proof merkle path from the attestation from NH +func (nhConnect *NHConnector) GetProofMerklePath(attestationID types.U64, proof string) PoeProofPathRequestResponse { + log.Debug("Get Proof merkle path for proof: ", proof, " with attestation ID: ", attestationID) + + // Perform RPC Call + response, err := nhConnect.nhRpc.Call(context.Background(), PoeProofPathRequest, + attestationID, + proof) + if err != nil { + log.Error(err) + } + log.Debug("PoeProofPath: ", response) + + if response.Error != nil { + switch response.Error.Code { + case 1: + log.Error("ERROR in PoeProofPath: ", ErrProofNotFoundInAttestation) + case 2: + log.Error("ERROR in PoeProofPath: ", ErrAttestationNotPublishedYet) + default: + log.Error("ERROR in PoeProofPath: ", response.Error) + } + } + + var jsonResponse *PoeProofPathRequestResponse + err = response.GetObject(&jsonResponse) + if err != nil || jsonResponse == nil { + // some error on json unmarshal level or json result field was null + log.Error(err) + } + + return *jsonResponse +} + +// Send the final proof to NH +func (nhConnector *NHConnector) SendProofToNH(finalProof *prover.FinalProof) (PoeNewElement, error) { + + // Get latest metadata + meta, err := nhConnector.nhApi.RPC.State.GetMetadataLatest() + if err != nil { + return PoeNewElement{}, err + } + + proofString := finalProof.GetProof() + strings.ReplaceAll(finalProof.GetCompactPublicInput(), "0x", "") + log.Info("Sending proof to L0...") + // sign transaction + log.Info("Sending proof...", proofString, "PI: ", strings.ReplaceAll(finalProof.GetCompactPublicInput(), "0x", "")) + //Mocked Proof (ForkID 6) + //proof, err := Bytes800FromHex("0x2ecc31435ec6d6963d463c38ea5662d9c94a67e441e7bc611598ebcc59f571880768291fd5d95fcf02bce7e4fde1f048b843bbffab1f242904e82d443a4ebb61150c3a4afdbb62d034320da390e3585a30ba13f4df73798b78e5a75655d3350d19fca02cc5838405f9ae4177ac7117971af2cb5006d7a46436f644410d6e7c52099f803c0f18d4b44fe22f3100d1fc80ccb7309fa7168f51bc64f3fc0f1dbd240b0573f3593238e56b23e75246d9d0f6f6a5cf824700667e3482ca9fecf74cdc0b308e6a8f69dccb9ca00d540543441f7030928da766406a152427bdf31b44051b6b5198b34006f9ac34c6c857e450cc11f5c6b6d21119fe283738581c0ad8bd0f8cbdbc574f64da884f6a02e00669f3eef10138266f3d7fa278aef1b1c60171005c0c2b8b2429c5003c5ab24af44cb1ab81cdc96dcaf6004a0f74406bb10f45233b13015cef8c40c491a7770efd0a8d8a64186d4f3827e74972bfc25b11f1f002550a5e253c923c5783026c7439601595477f1a212de449c64a8ae5e2fc0313127bf9cd5146217e531196ce65ccef3249375450d6932151f923c39e6a73588223d90f5bf230eee5a6cb6463f161602cc37fe538e2954ebef695b926b76e3fae299c60c1952aa4b1f246204ac7c22c0156ede30aeb73444ee40d69c0f131fa471fdca090abfd38541c88ee73624657a695155748643f7834b80d1c0481079e670033817252b24575a4e6007f08f37c34462d5e9fd50b1e83ec8cfc86149400d519e224ee11831ac393e3a09730be6f385ae5c9e14446fde5069fea751fb6b48211c85268b8017de7981eb1bd78526bc20d5f863ad3abe249728ca7b75b2146c1254465d6100a911213d95f800779e74f6701b1dfa0b6660642108fd2c7cd2f131d9163eeebe9d8aabdf8d37fde4451f762be478d117688e0a6ed2648dbe025e82a4b13ee629a73d1efa6f269747506058746aa589bb961c1385bb2b30e0086f010ef87535f2137a04f19fe5aa7c4f348c32ce6f5b0b45bb503895673a8a51d7f1b0228693fbfb38be718b04c9fdf116a97d7f30e670db84d21bb0d12fc57645415950a3fab52ee1557ac7b895deeca2eb27bacfc3b9e26a39b1875149680611d") + proof, err := Bytes800FromHex(proofString) + if err != nil { + return PoeNewElement{}, err + } + + c, err := types.NewCall(meta, SubmitProofExtrinsic, proof) + + if err != nil { + return PoeNewElement{}, err + } + + // Create the extrinsic + ext := types.NewExtrinsic(c) + + genesisHash, err := nhConnector.nhApi.RPC.Chain.GetBlockHash(0) + if err != nil { + return PoeNewElement{}, err + } + + rv, err := nhConnector.nhApi.RPC.State.GetRuntimeVersionLatest() + if err != nil { + return PoeNewElement{}, err + } + + key, err := types.CreateStorageKey(meta, "System", "Account", nhConnector.nhKeyPair.PublicKey) + if err != nil { + return PoeNewElement{}, err + } + + var accountInfo types.AccountInfo + ok, err := nhConnector.nhApi.RPC.State.GetStorageLatest(key, &accountInfo) + if err != nil || !ok { + return PoeNewElement{}, err + } + + nonce := uint32(accountInfo.Nonce) + + o := types.SignatureOptions{ + BlockHash: genesisHash, + Era: types.ExtrinsicEra{IsMortalEra: false}, + GenesisHash: genesisHash, + Nonce: types.NewUCompactFromUInt(uint64(nonce)), + SpecVersion: rv.SpecVersion, + Tip: types.NewUCompactFromUInt(0), + TransactionVersion: rv.TransactionVersion, + } + + log.Debug("Sending proof with to NH mainchain... ") + + // Sign the transaction + err = ext.Sign(nhConnector.nhKeyPair, o) + if err != nil { + return PoeNewElement{}, err + } + + // Do the transfer and track the actual status + subEx, err := nhConnector.nhApi.RPC.Author.SubmitAndWatchExtrinsic(ext) + var blockHash types.Hash + + if err != nil { + return PoeNewElement{}, err + } + defer subEx.Unsubscribe() + + for { + status := <-subEx.Chan() + + if status.IsInBlock { + blockHash = status.AsInBlock + break + } + } + log.Debug("Transaction included in block: ", blockHash.Hex()) + block, err := nhConnector.nhApi.RPC.Chain.GetBlock(blockHash) + if err != nil { + return PoeNewElement{}, err + } + var extrinsicId uint32 + for pos, e := range block.Block.Extrinsics { + if e.Signature.Signature.AsSr25519 == ext.Signature.Signature.AsSr25519 { + extrinsicId = uint32(pos) + } + } + + // Subscribe to system events via storage + keyEvents, err := types.CreateStorageKey(meta, "System", "Events", nil) + if err != nil { + return PoeNewElement{}, err + } + + stdEvents := types.EventRecords{} + hlEvents := NHEventsRecords{} + records, err := nhConnector.nhApi.RPC.State.GetStorageRaw(keyEvents, blockHash) + if err != nil { + return PoeNewElement{}, err + } + + err = DecodeEventRecords(types.EventRecordsRaw(*records), meta, &stdEvents, &hlEvents) + if err != nil { + return PoeNewElement{}, err + } + + // Search the Event + var proofVerifiedElement PoeNewElement + for _, e := range hlEvents.Poe_NewElement { + if e.Phase.IsApplyExtrinsic && e.Phase.AsApplyExtrinsic == extrinsicId { + log.Debug("tSettelmentFFlonkPallet:ProofVerified, ProofValue: ", e.Value.Hex(), " AttestationID: ", e.AttestationId) + proofVerifiedElement = e + } + } + return proofVerifiedElement, err +} + +func ensureValidStruct(tval reflect.Value) (reflect.Value, error) { + none := reflect.Value{} + // ensure t is a pointer + ttyp := tval.Type() + if ttyp.Kind() != reflect.Ptr { + return none, fmt.Errorf("target must be a pointer, but is %v ", ttyp) + } + // ensure t is not a nil pointer + if tval.IsNil() { + return none, fmt.Errorf("target is a nil pointer") + } + val := tval.Elem() + typ := val.Type() + // ensure val can be set + if !val.CanSet() { + return none, fmt.Errorf("unsettable value %v", typ) + } + // ensure val points to a array + if val.Kind() != reflect.Struct { + return none, fmt.Errorf("target must point to a struct, but is %v", typ) + } + return val, nil +} + +func (s *Discover) FieldByName(name string) reflect.Value { + for _, obj := range s.objs { + if !obj.IsValid() { + panic("No valid object") + } + val := obj.FieldByName(name) + if val.IsValid() { + return val + } + } + return reflect.Value{} +} + +func getDiscover(tStd interface{}, tExt interface{}) (*Discover, error) { + objs := make([]reflect.Value, 2) + val, err := ensureValidStruct(reflect.ValueOf(tStd)) + if err != nil { + return nil, fmt.Errorf("[Interface #%v] %s", 0, err.Error()) + } + if !val.IsValid() { + return nil, fmt.Errorf("not valid value val") + } + objs[0] = val + exVal, err := ensureValidStruct(reflect.ValueOf(tExt)) + if err != nil { + return nil, fmt.Errorf("[Interface #%v] %s", 1, err.Error()) + } + if !exVal.IsValid() { + return nil, fmt.Errorf("not valid value exVal") + } + objs[1] = exVal + return &Discover{objs: objs}, nil +} + +// DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m +// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined +// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed +// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. +func DecodeEventRecords(e types.EventRecordsRaw, m *types.Metadata, tStd interface{}, tExt interface{}) error { //nolint:funlen + + discover, err := getDiscover(tStd, tExt) + if err != nil { + return err + } + + decoder := scale.NewDecoder(bytes.NewReader(e)) + + // determine number of events + n, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + + // iterate over events + for i := uint64(0); i < n.Uint64(); i++ { + + // decode Phase + phase := types.Phase{} + err := decoder.Decode(&phase) + if err != nil { + return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + } else { + fmt.Printf("Phase %v\n", phase) + } + + // decode EventID + id := types.EventID{} + err = decoder.Decode(&id) + if err != nil { + return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + } + + // ask metadata for method & event name for event + moduleName, eventName, err := m.FindEventNamesForEventID(id) + if err != nil { + return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + // check whether name for eventID exists in t + field := discover.FieldByName(fmt.Sprintf("%v_%v", moduleName, eventName)) + if !field.IsValid() { + return fmt.Errorf("unable to find field %v_%v for event #%v with EventID %v", moduleName, eventName, i, id) + } else { + + // create a pointer to with the correct type that will hold the decoded event + holder := reflect.New(field.Type().Elem()) + + // ensure first field is for Phase, last field is for Topics + numFields := holder.Elem().NumField() + if numFields < 2 { + return fmt.Errorf("expected event #%v with EventID %v, field %v_%v to have at least 2 fields "+ + "(for Phase and Topics), but has %v fields", i, id, moduleName, eventName, numFields) + } + phaseField := holder.Elem().FieldByIndex([]int{0}) + if phaseField.Type() != reflect.TypeOf(phase) { + return fmt.Errorf("expected the first field of event #%v with EventID %v, field %v_%v to be of type "+ + "types.Phase, but got %v", i, id, moduleName, eventName, phaseField.Type()) + } + topicsField := holder.Elem().FieldByIndex([]int{numFields - 1}) + if topicsField.Type() != reflect.TypeOf([]types.Hash{}) { + return fmt.Errorf("expected the last field of event #%v with EventID %v, field %v_%v to be of type "+ + "[]types.Hash for Topics, but got %v", i, id, moduleName, eventName, topicsField.Type()) + } + + // set the phase we decoded earlier + phaseField.Set(reflect.ValueOf(phase)) + + // set the remaining fields + for j := 1; j < numFields; j++ { + err = decoder.Decode(holder.Elem().FieldByIndex([]int{j}).Addr().Interface()) + if err != nil { + return fmt.Errorf("unable to decode field %v event #%v with EventID %v, field %v_%v: %v", j, i, id, moduleName, + eventName, err) + } + } + + // add the decoded event to the slice + field.Set(reflect.Append(field, holder.Elem())) + } + } + + return nil +} + +type Discover struct { + objs []reflect.Value +} diff --git a/nhconnector/types.go b/nhconnector/types.go new file mode 100644 index 0000000000..da844cd7c0 --- /dev/null +++ b/nhconnector/types.go @@ -0,0 +1,44 @@ +package nhconnector + +import "github.com/centrifuge/go-substrate-rpc-client/v4/types" + +// NH Event for Proof verified +type PoeNewElement struct { + Phase types.Phase + Value types.Hash + AttestationId types.U64 + Topics []types.Hash +} + +// NH Event for new Root (Attestation) created +type PoeNewAttestation struct { + Phase types.Phase + Id types.U64 + Attestation types.Hash + Topics []types.Hash +} + +// NH Events map +type NHEventsRecords struct { + Poe_NewElement []PoeNewElement `test-gen-blockchain:"nh-core"` + Poe_NewAttestation []PoeNewAttestation `test-gen-blockchain:"nh-core"` +} + +// NH RPC Requests +const ( + PoeProofPathRequest = "poe_proofPath" +) + +// NH RPC Responses +type PoeProofPathRequestResponse struct { + Root string `json:"root"` + LeafIndex types.U64 `json:"leaf_index"` + Leaf string `json:"leaf"` + Proof []string `json:"proof"` + NumberOfLeaves types.U64 `json:"number_of_leaves"` +} + +// NH Extrinsic endpoints +const ( + SubmitProofExtrinsic = "SettlementFFlonkPallet.submit_proof" +) diff --git a/nhconnector/utils.go b/nhconnector/utils.go new file mode 100644 index 0000000000..26b7eaebd3 --- /dev/null +++ b/nhconnector/utils.go @@ -0,0 +1,20 @@ +package nhconnector + +import "github.com/centrifuge/go-substrate-rpc-client/v4/types/codec" + +// Bytes800 represents an 800 byte array +type Bytes800 [800]byte + +// NewBytes800 creates a new Bytes800 type +func NewBytes800(b [800]byte) Bytes800 { + return Bytes800(b) +} + +// Convert a 800 bytes hex string into Bytes800 +func Bytes800FromHex(str string) (Bytes800, error) { + b, err := codec.HexDecodeString(str) + if err != nil { + return Bytes800{}, err + } + return Bytes800(b), err +} diff --git a/proto/BUILD-PROTO.md b/proto/BUILD-PROTO.md new file mode 100644 index 0000000000..0db8f9f22d --- /dev/null +++ b/proto/BUILD-PROTO.md @@ -0,0 +1,10 @@ +# Generate Protobuf GRPC Source Files +This document outlines how to automatically generate the source files to process through GRPC the Protobuf messages employed for communication among different CDK components. The structure of such messages is specified in the `src` folder. + +The generation of the source files can be performed through a Docker container, which is created with the `Dockerfile-Protoc` file. + +To generate the source files in the current repository, go to the root folder of the repository and run the following commands: +```bash +docker build -t build-proto -f proto/Dockerfile-Protoc . +docker run -v $(pwd):/usr/src build-proto +``` diff --git a/proto/Dockerfile-Protoc b/proto/Dockerfile-Protoc new file mode 100644 index 0000000000..adc7b9d768 --- /dev/null +++ b/proto/Dockerfile-Protoc @@ -0,0 +1,7 @@ +# CONTAINER FOR BUILDING PROTOBUF GRPC SOURCE FILES +FROM golang:1.19 + +WORKDIR /usr/src/ + +RUN apt update && apt install -y protoc-gen-go protoc-gen-go-grpc +ENTRYPOINT ["proto/make_inside_docker.sh", "/usr/src"] diff --git a/proto/make_inside_docker.sh b/proto/make_inside_docker.sh new file mode 100755 index 0000000000..60331384e9 --- /dev/null +++ b/proto/make_inside_docker.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +SRC_DIR=$1 # Directory inside the docker container where source files are mounted +git config --global --add safe.directory $SRC_DIR # necessary to safely call git commands in the source directory inside the docker container +make generate-code-from-proto diff --git a/proto/src/proto/aggregator/v1/aggregator.proto b/proto/src/proto/aggregator/v1/aggregator.proto index 4c22903571..1ba70e25ce 100644 --- a/proto/src/proto/aggregator/v1/aggregator.proto +++ b/proto/src/proto/aggregator/v1/aggregator.proto @@ -236,11 +236,13 @@ message GetProofResponse { /* * @dev FinalProof * @param {proof} - groth16 proof + * @param {compact_public_input} - compact version of the public inputs to be verified by proof * @param {public} - public circuit inputs */ message FinalProof { string proof = 1; PublicInputsExtended public = 2; + string compact_public_input = 3; } /* diff --git a/sequencer/mock_db_manager.go b/sequencer/mock_db_manager.go index c969f4c90c..4985ad4426 100644 --- a/sequencer/mock_db_manager.go +++ b/sequencer/mock_db_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -729,12 +729,13 @@ func (_m *DbManagerMock) UpdateTxStatus(ctx context.Context, hash common.Hash, n return r0 } -// NewDbManagerMock creates a new instance of DbManagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDbManagerMock(t interface { +type mockConstructorTestingTNewDbManagerMock interface { mock.TestingT Cleanup(func()) -}) *DbManagerMock { +} + +// NewDbManagerMock creates a new instance of DbManagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDbManagerMock(t mockConstructorTestingTNewDbManagerMock) *DbManagerMock { mock := &DbManagerMock{} mock.Mock.Test(t) diff --git a/sequencer/mock_dbtx.go b/sequencer/mock_dbtx.go index d43613fb71..196f2b1850 100644 --- a/sequencer/mock_dbtx.go +++ b/sequencer/mock_dbtx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -283,12 +283,13 @@ func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResult return r0 } -// NewDbTxMock creates a new instance of DbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDbTxMock(t interface { +type mockConstructorTestingTNewDbTxMock interface { mock.TestingT Cleanup(func()) -}) *DbTxMock { +} + +// NewDbTxMock creates a new instance of DbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewDbTxMock(t mockConstructorTestingTNewDbTxMock) *DbTxMock { mock := &DbTxMock{} mock.Mock.Test(t) diff --git a/sequencer/mock_etherman.go b/sequencer/mock_etherman.go index 97c453490f..ad3192ad53 100644 --- a/sequencer/mock_etherman.go +++ b/sequencer/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -164,12 +164,13 @@ func (_m *EthermanMock) TrustedSequencer() (common.Address, error) { return r0, r1 } -// NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEthermanMock(t interface { +type mockConstructorTestingTNewEthermanMock interface { mock.TestingT Cleanup(func()) -}) *EthermanMock { +} + +// NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEthermanMock(t mockConstructorTestingTNewEthermanMock) *EthermanMock { mock := &EthermanMock{} mock.Mock.Test(t) diff --git a/sequencer/mock_pool.go b/sequencer/mock_pool.go index cb5cb82f7a..aecfe8228a 100644 --- a/sequencer/mock_pool.go +++ b/sequencer/mock_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -219,12 +219,13 @@ func (_m *PoolMock) UpdateTxWIPStatus(ctx context.Context, hash common.Hash, isW return r0 } -// NewPoolMock creates a new instance of PoolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPoolMock(t interface { +type mockConstructorTestingTNewPoolMock interface { mock.TestingT Cleanup(func()) -}) *PoolMock { +} + +// NewPoolMock creates a new instance of PoolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPoolMock(t mockConstructorTestingTNewPoolMock) *PoolMock { mock := &PoolMock{} mock.Mock.Test(t) diff --git a/sequencer/mock_state.go b/sequencer/mock_state.go index 9bff8f7511..1510f0e610 100644 --- a/sequencer/mock_state.go +++ b/sequencer/mock_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -992,12 +992,13 @@ func (_m *StateMock) UpdateBatchL2Data(ctx context.Context, batchNumber uint64, return r0 } -// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStateMock(t interface { +type mockConstructorTestingTNewStateMock interface { mock.TestingT Cleanup(func()) -}) *StateMock { +} + +// NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStateMock(t mockConstructorTestingTNewStateMock) *StateMock { mock := &StateMock{} mock.Mock.Test(t) diff --git a/sequencer/mock_worker.go b/sequencer/mock_worker.go index e14b48565c..8e515c7c25 100644 --- a/sequencer/mock_worker.go +++ b/sequencer/mock_worker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package sequencer @@ -155,12 +155,13 @@ func (_m *WorkerMock) UpdateTxZKCounters(txHash common.Hash, from common.Address _m.Called(txHash, from, ZKCounters) } -// NewWorkerMock creates a new instance of WorkerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWorkerMock(t interface { +type mockConstructorTestingTNewWorkerMock interface { mock.TestingT Cleanup(func()) -}) *WorkerMock { +} + +// NewWorkerMock creates a new instance of WorkerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewWorkerMock(t mockConstructorTestingTNewWorkerMock) *WorkerMock { mock := &WorkerMock{} mock.Mock.Test(t) diff --git a/state/pgstatestorage.go b/state/pgstatestorage.go index 2bcca13335..5435f0e642 100644 --- a/state/pgstatestorage.go +++ b/state/pgstatestorage.go @@ -10,6 +10,7 @@ import ( "github.com/0xPolygonHermez/zkevm-node/hex" "github.com/0xPolygonHermez/zkevm-node/log" + substrateTypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -220,6 +221,35 @@ func (p *PostgresStorage) GetLatestGlobalExitRoot(ctx context.Context, maxBlockN return exitRoot, receivedAt, nil } +// AddAttestationId adds a new attestation Id to the db +func (p *PostgresStorage) AddAttestationId(ctx context.Context, attestation *AttestationId, dbTx pgx.Tx) error { + const addAttestationIdSQL = "INSERT INTO state.attestation_id (block_num, attestation_id) VALUES ($1, $2) ON CONFLICT (attestation_id) DO NOTHING" + + e := p.getExecQuerier(dbTx) + _, err := e.Exec(ctx, addAttestationIdSQL, attestation.BlockNumber, attestation.AttestationId) + return err +} + +// IsAttestationPublishedOnL1 checks if the attestation id is already published on the L1 +func (p *PostgresStorage) IsAttestationPublishedOnL1(ctx context.Context, attestationId substrateTypes.U64, dbTx pgx.Tx) (bool, error) { + const query = `SELECT EXISTS (SELECT 1 FROM state.attestation_id WHERE attestation_id = $1)` + e := p.getExecQuerier(dbTx) + var exists bool + err := e.QueryRow(ctx, query, attestationId).Scan(&exists) + if err != nil && !errors.Is(err, pgx.ErrNoRows) { + return exists, err + } + return exists, nil +} + +// DeletePublishedAttestationIds deletes from the storage the aready processed attestation ids +func (p *PostgresStorage) DeletePublishedAttestationIds(ctx context.Context, attestationId substrateTypes.U64, dbTx pgx.Tx) error { + const query = "DELETE FROM state.attestation_id WHERE attestation_id >= $1" + e := p.getExecQuerier(dbTx) + _, err := e.Exec(ctx, query, attestationId) + return err +} + // GetNumberOfBlocksSinceLastGERUpdate gets number of blocks since last global exit root update func (p *PostgresStorage) GetNumberOfBlocksSinceLastGERUpdate(ctx context.Context, dbTx pgx.Tx) (uint64, error) { var ( @@ -817,6 +847,18 @@ func scanForcedBatch(row pgx.Row) (ForcedBatch, error) { return forcedBatch, nil } +func scanAttestationId(row pgx.Row) (AttestationId, error) { + attestationId := AttestationId{} + var id substrateTypes.U64 + if err := row.Scan( + &attestationId.BlockNumber, + &id, + ); err != nil { + return attestationId, err + } + return attestationId, nil +} + // GetEncodedTransactionsByBatchNumber returns the encoded field of all // transactions in the given batch. func (p *PostgresStorage) GetEncodedTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (encodedTxs []string, effectivePercentages []uint8, err error) { diff --git a/state/proofmerkleroot.go b/state/proofmerkleroot.go new file mode 100644 index 0000000000..5d4498095a --- /dev/null +++ b/state/proofmerkleroot.go @@ -0,0 +1,11 @@ +package state + +import ( + substrateTypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" +) + +// AttestationId struct +type AttestationId struct { + BlockNumber uint64 + AttestationId substrateTypes.U64 +} diff --git a/state/runtime/executor/executor.pb.go b/state/runtime/executor/executor.pb.go index 9f04422c49..e17597a924 100644 --- a/state/runtime/executor/executor.pb.go +++ b/state/runtime/executor/executor.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.4 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: executor.proto package executor diff --git a/state/runtime/executor/executor_grpc.pb.go b/state/runtime/executor/executor_grpc.pb.go index 8c21d9a210..9ce8f3fdd6 100644 --- a/state/runtime/executor/executor_grpc.pb.go +++ b/state/runtime/executor/executor_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.4 -// source: executor.proto package executor @@ -16,14 +12,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -const ( - ExecutorService_ProcessBatch_FullMethodName = "/executor.v1.ExecutorService/ProcessBatch" - ExecutorService_GetFlushStatus_FullMethodName = "/executor.v1.ExecutorService/GetFlushStatus" -) - // ExecutorServiceClient is the client API for ExecutorService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -43,7 +33,7 @@ func NewExecutorServiceClient(cc grpc.ClientConnInterface) ExecutorServiceClient func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) { out := new(ProcessBatchResponse) - err := c.cc.Invoke(ctx, ExecutorService_ProcessBatch_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/executor.v1.ExecutorService/ProcessBatch", in, out, opts...) if err != nil { return nil, err } @@ -52,7 +42,7 @@ func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBat func (c *executorServiceClient) GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) { out := new(GetFlushStatusResponse) - err := c.cc.Invoke(ctx, ExecutorService_GetFlushStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, "/executor.v1.ExecutorService/GetFlushStatus", in, out, opts...) if err != nil { return nil, err } @@ -88,8 +78,8 @@ type UnsafeExecutorServiceServer interface { mustEmbedUnimplementedExecutorServiceServer() } -func RegisterExecutorServiceServer(s grpc.ServiceRegistrar, srv ExecutorServiceServer) { - s.RegisterService(&ExecutorService_ServiceDesc, srv) +func RegisterExecutorServiceServer(s *grpc.Server, srv ExecutorServiceServer) { + s.RegisterService(&_ExecutorService_serviceDesc, srv) } func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -102,7 +92,7 @@ func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ExecutorService_ProcessBatch_FullMethodName, + FullMethod: "/executor.v1.ExecutorService/ProcessBatch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExecutorServiceServer).ProcessBatch(ctx, req.(*ProcessBatchRequest)) @@ -120,7 +110,7 @@ func _ExecutorService_GetFlushStatus_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ExecutorService_GetFlushStatus_FullMethodName, + FullMethod: "/executor.v1.ExecutorService/GetFlushStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExecutorServiceServer).GetFlushStatus(ctx, req.(*emptypb.Empty)) @@ -128,10 +118,7 @@ func _ExecutorService_GetFlushStatus_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -// ExecutorService_ServiceDesc is the grpc.ServiceDesc for ExecutorService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ExecutorService_ServiceDesc = grpc.ServiceDesc{ +var _ExecutorService_serviceDesc = grpc.ServiceDesc{ ServiceName: "executor.v1.ExecutorService", HandlerType: (*ExecutorServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/synchronizer/interfaces.go b/synchronizer/interfaces.go index 97a957133f..1d7b3cd631 100644 --- a/synchronizer/interfaces.go +++ b/synchronizer/interfaces.go @@ -64,6 +64,7 @@ type stateInterface interface { GetForkIDByBatchNumber(batchNumber uint64) uint64 GetStoredFlushID(ctx context.Context) (uint64, string, error) GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) + AddAttestationId(ctx context.Context, attestationId *state.AttestationId, dbTx pgx.Tx) error } type ethTxManager interface { diff --git a/synchronizer/mock_datacommitteeclient.go b/synchronizer/mock_datacommitteeclient.go index 93f2dc8697..08c8016100 100644 --- a/synchronizer/mock_datacommitteeclient.go +++ b/synchronizer/mock_datacommitteeclient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -69,12 +69,13 @@ func (_m *dataCommitteeClientMock) SignSequence(signedSequence types.SignedSeque return r0, r1 } -// newDataCommitteeClientMock creates a new instance of dataCommitteeClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newDataCommitteeClientMock(t interface { +type mockConstructorTestingTnewDataCommitteeClientMock interface { mock.TestingT Cleanup(func()) -}) *dataCommitteeClientMock { +} + +// newDataCommitteeClientMock creates a new instance of dataCommitteeClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newDataCommitteeClientMock(t mockConstructorTestingTnewDataCommitteeClientMock) *dataCommitteeClientMock { mock := &dataCommitteeClientMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_datacommitteeclientfactory.go b/synchronizer/mock_datacommitteeclientfactory.go index cf9f5c4b94..167d0250ad 100644 --- a/synchronizer/mock_datacommitteeclientfactory.go +++ b/synchronizer/mock_datacommitteeclientfactory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -28,12 +28,13 @@ func (_m *dataCommitteeClientFactoryMock) New(url string) client.ClientInterface return r0 } -// newDataCommitteeClientFactoryMock creates a new instance of dataCommitteeClientFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newDataCommitteeClientFactoryMock(t interface { +type mockConstructorTestingTnewDataCommitteeClientFactoryMock interface { mock.TestingT Cleanup(func()) -}) *dataCommitteeClientFactoryMock { +} + +// newDataCommitteeClientFactoryMock creates a new instance of dataCommitteeClientFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newDataCommitteeClientFactoryMock(t mockConstructorTestingTnewDataCommitteeClientFactoryMock) *dataCommitteeClientFactoryMock { mock := &dataCommitteeClientFactoryMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_dbtx.go b/synchronizer/mock_dbtx.go index 6ccb4c9921..730d38c936 100644 --- a/synchronizer/mock_dbtx.go +++ b/synchronizer/mock_dbtx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -283,12 +283,13 @@ func (_m *dbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResult return r0 } -// newDbTxMock creates a new instance of dbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newDbTxMock(t interface { +type mockConstructorTestingTnewDbTxMock interface { mock.TestingT Cleanup(func()) -}) *dbTxMock { +} + +// newDbTxMock creates a new instance of dbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newDbTxMock(t mockConstructorTestingTnewDbTxMock) *dbTxMock { mock := &dbTxMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_etherman.go b/synchronizer/mock_etherman.go index 1fcddecf9c..eea7bdb1ce 100644 --- a/synchronizer/mock_etherman.go +++ b/synchronizer/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -229,12 +229,13 @@ func (_m *ethermanMock) VerifyGenBlockNumber(ctx context.Context, genBlockNumber return r0, r1 } -// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEthermanMock(t interface { +type mockConstructorTestingTnewEthermanMock interface { mock.TestingT Cleanup(func()) -}) *ethermanMock { +} + +// newEthermanMock creates a new instance of ethermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEthermanMock(t mockConstructorTestingTnewEthermanMock) *ethermanMock { mock := ðermanMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_ethtxmanager.go b/synchronizer/mock_ethtxmanager.go index 68f8ede4c7..31f6dd3ef0 100644 --- a/synchronizer/mock_ethtxmanager.go +++ b/synchronizer/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -28,12 +28,13 @@ func (_m *ethTxManagerMock) Reorg(ctx context.Context, fromBlockNumber uint64, d return r0 } -// newEthTxManagerMock creates a new instance of ethTxManagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newEthTxManagerMock(t interface { +type mockConstructorTestingTnewEthTxManagerMock interface { mock.TestingT Cleanup(func()) -}) *ethTxManagerMock { +} + +// newEthTxManagerMock creates a new instance of ethTxManagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newEthTxManagerMock(t mockConstructorTestingTnewEthTxManagerMock) *ethTxManagerMock { mock := ðTxManagerMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_l1_rollup_consumer_interface.go b/synchronizer/mock_l1_rollup_consumer_interface.go index 99a4c62cb0..de99fdb86d 100644 --- a/synchronizer/mock_l1_rollup_consumer_interface.go +++ b/synchronizer/mock_l1_rollup_consumer_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -62,12 +62,13 @@ func (_m *l1RollupConsumerInterfaceMock) StopAfterProcessChannelQueue() { _m.Called() } -// newL1RollupConsumerInterfaceMock creates a new instance of l1RollupConsumerInterfaceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newL1RollupConsumerInterfaceMock(t interface { +type mockConstructorTestingTnewL1RollupConsumerInterfaceMock interface { mock.TestingT Cleanup(func()) -}) *l1RollupConsumerInterfaceMock { +} + +// newL1RollupConsumerInterfaceMock creates a new instance of l1RollupConsumerInterfaceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newL1RollupConsumerInterfaceMock(t mockConstructorTestingTnewL1RollupConsumerInterfaceMock) *l1RollupConsumerInterfaceMock { mock := &l1RollupConsumerInterfaceMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_l1_rollup_producer_interface.go b/synchronizer/mock_l1_rollup_producer_interface.go index ac24de2ebb..1fd22ae6f0 100644 --- a/synchronizer/mock_l1_rollup_producer_interface.go +++ b/synchronizer/mock_l1_rollup_producer_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -42,12 +42,13 @@ func (_m *l1RollupProducerInterfaceMock) Stop() { _m.Called() } -// newL1RollupProducerInterfaceMock creates a new instance of l1RollupProducerInterfaceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newL1RollupProducerInterfaceMock(t interface { +type mockConstructorTestingTnewL1RollupProducerInterfaceMock interface { mock.TestingT Cleanup(func()) -}) *l1RollupProducerInterfaceMock { +} + +// newL1RollupProducerInterfaceMock creates a new instance of l1RollupProducerInterfaceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newL1RollupProducerInterfaceMock(t mockConstructorTestingTnewL1RollupProducerInterfaceMock) *l1RollupProducerInterfaceMock { mock := &l1RollupProducerInterfaceMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_l1_worker.go b/synchronizer/mock_l1_worker.go index b2ee4ea776..ff853e4e04 100644 --- a/synchronizer/mock_l1_worker.go +++ b/synchronizer/mock_l1_worker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -70,12 +70,13 @@ func (_m *workerMock) requestLastBlock(ctx context.Context) responseL1LastBlock return r0 } -// newWorkerMock creates a new instance of workerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newWorkerMock(t interface { +type mockConstructorTestingTnewWorkerMock interface { mock.TestingT Cleanup(func()) -}) *workerMock { +} + +// newWorkerMock creates a new instance of workerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newWorkerMock(t mockConstructorTestingTnewWorkerMock) *workerMock { mock := &workerMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_pool.go b/synchronizer/mock_pool.go index bda4090b1c..0db2e31cb0 100644 --- a/synchronizer/mock_pool.go +++ b/synchronizer/mock_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -43,12 +43,13 @@ func (_m *poolMock) StoreTx(ctx context.Context, tx types.Transaction, ip string return r0 } -// newPoolMock creates a new instance of poolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newPoolMock(t interface { +type mockConstructorTestingTnewPoolMock interface { mock.TestingT Cleanup(func()) -}) *poolMock { +} + +// newPoolMock creates a new instance of poolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newPoolMock(t mockConstructorTestingTnewPoolMock) *poolMock { mock := &poolMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_state.go b/synchronizer/mock_state.go index 2d0c7a028c..e66b3a492c 100644 --- a/synchronizer/mock_state.go +++ b/synchronizer/mock_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -39,6 +39,20 @@ func (_m *stateMock) AddAccumulatedInputHash(ctx context.Context, batchNum uint6 return r0 } +// AddAttestationId provides a mock function with given fields: ctx, attestationId, dbTx +func (_m *stateMock) AddAttestationId(ctx context.Context, attestationId *state.AttestationId, dbTx pgx.Tx) error { + ret := _m.Called(ctx, attestationId, dbTx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *state.AttestationId, pgx.Tx) error); ok { + r0 = rf(ctx, attestationId, dbTx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // AddBlock provides a mock function with given fields: ctx, block, dbTx func (_m *stateMock) AddBlock(ctx context.Context, block *state.Block, dbTx pgx.Tx) error { ret := _m.Called(ctx, block, dbTx) @@ -760,12 +774,13 @@ func (_m *stateMock) UpdateBatchL2Data(ctx context.Context, batchNumber uint64, return r0 } -// newStateMock creates a new instance of stateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newStateMock(t interface { +type mockConstructorTestingTnewStateMock interface { mock.TestingT Cleanup(func()) -}) *stateMock { +} + +// newStateMock creates a new instance of stateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newStateMock(t mockConstructorTestingTnewStateMock) *stateMock { mock := &stateMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_synchronizer_process_block_range.go b/synchronizer/mock_synchronizer_process_block_range.go index 5b1a5714b2..987c7a1460 100644 --- a/synchronizer/mock_synchronizer_process_block_range.go +++ b/synchronizer/mock_synchronizer_process_block_range.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -28,12 +28,13 @@ func (_m *synchronizerProcessBlockRangeMock) processBlockRange(blocks []etherman return r0 } -// newSynchronizerProcessBlockRangeMock creates a new instance of synchronizerProcessBlockRangeMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newSynchronizerProcessBlockRangeMock(t interface { +type mockConstructorTestingTnewSynchronizerProcessBlockRangeMock interface { mock.TestingT Cleanup(func()) -}) *synchronizerProcessBlockRangeMock { +} + +// newSynchronizerProcessBlockRangeMock creates a new instance of synchronizerProcessBlockRangeMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newSynchronizerProcessBlockRangeMock(t mockConstructorTestingTnewSynchronizerProcessBlockRangeMock) *synchronizerProcessBlockRangeMock { mock := &synchronizerProcessBlockRangeMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_workers.go b/synchronizer/mock_workers.go index c1a2369539..1931425fda 100644 --- a/synchronizer/mock_workers.go +++ b/synchronizer/mock_workers.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -122,12 +122,13 @@ func (_m *workersMock) waitFinishAllWorkers() { _m.Called() } -// newWorkersMock creates a new instance of workersMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newWorkersMock(t interface { +type mockConstructorTestingTnewWorkersMock interface { mock.TestingT Cleanup(func()) -}) *workersMock { +} + +// newWorkersMock creates a new instance of workersMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newWorkersMock(t mockConstructorTestingTnewWorkersMock) *workersMock { mock := &workersMock{} mock.Mock.Test(t) diff --git a/synchronizer/mock_zkevmclient.go b/synchronizer/mock_zkevmclient.go index fa1839c8b8..cc65d007a2 100644 --- a/synchronizer/mock_zkevmclient.go +++ b/synchronizer/mock_zkevmclient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. +// Code generated by mockery v2.22.1. DO NOT EDIT. package synchronizer @@ -66,12 +66,13 @@ func (_m *zkEVMClientMock) BatchNumber(ctx context.Context) (uint64, error) { return r0, r1 } -// newZkEVMClientMock creates a new instance of zkEVMClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newZkEVMClientMock(t interface { +type mockConstructorTestingTnewZkEVMClientMock interface { mock.TestingT Cleanup(func()) -}) *zkEVMClientMock { +} + +// newZkEVMClientMock creates a new instance of zkEVMClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newZkEVMClientMock(t mockConstructorTestingTnewZkEVMClientMock) *zkEVMClientMock { mock := &zkEVMClientMock{} mock.Mock.Test(t) diff --git a/synchronizer/synchronizer.go b/synchronizer/synchronizer.go index e5ba6229cc..ed615d2d1e 100644 --- a/synchronizer/synchronizer.go +++ b/synchronizer/synchronizer.go @@ -19,6 +19,7 @@ import ( stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" "github.com/0xPolygonHermez/zkevm-node/synchronizer/metrics" + substrateTypes "github.com/centrifuge/go-substrate-rpc-client/v4/types" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -617,6 +618,11 @@ func (s *ClientSynchronizer) processBlockRange(blocks []etherman.Block, order ma if err != nil { return err } + case etherman.AddAttestationOrder: + err = s.processAttestation(blocks[i].Attestation[element.Pos], blocks[i].BlockNumber, dbTx) + if err != nil { + return err + } } } log.Debug("Checking FlushID to commit L1 data to db") @@ -1295,6 +1301,28 @@ func (s *ClientSynchronizer) processGlobalExitRoot(globalExitRoot etherman.Globa return nil } +func (s *ClientSynchronizer) processAttestation(attestation etherman.Attestation, blockNumber uint64, dbTx pgx.Tx) error { + // Store AttestationId + pmr := state.AttestationId{ + BlockNumber: blockNumber, + AttestationId: substrateTypes.NewU64(attestation.AttestationId), + } + + err := s.state.AddAttestationId(s.ctx, &pmr, dbTx) + if err != nil { + log.Errorf("error storing the AttestationId in processAttestation. processAttestation: %d", blockNumber) + rollbackErr := dbTx.Rollback(s.ctx) + if rollbackErr != nil { + log.Errorf("error rolling back state. BlockNumber: %d, rollbackErr: %s, error : %v", blockNumber, rollbackErr.Error(), err) + return rollbackErr + } + log.Errorf("error storing the AttestationId in processAttestation. BlockNumber: %d, error: %v", blockNumber, err) + return err + } + log.Debug("Succesfully added new AttestationId. AttestationId: %d BlockNumber: %d", pmr.AttestationId, pmr.BlockNumber) + return nil +} + func (s *ClientSynchronizer) processTrustedVerifyBatches(lastVerifiedBatch etherman.VerifiedBatch, dbTx pgx.Tx) error { lastVBatch, err := s.state.GetLastVerifiedBatch(s.ctx, dbTx) if err != nil { diff --git a/test/.env.template b/test/.env.template new file mode 100644 index 0000000000..a96fb08c07 --- /dev/null +++ b/test/.env.template @@ -0,0 +1,37 @@ +COMPOSE_PROJECT_NAME=new-horizen + +# L2 explorer +INTERNAL_NETWORK_SUBNET='10.10.40.0/24' +EXPLORER_NET_IP_ADDRESS='10.10.40.3' +EXPLORER_NET_UI_PORT=4000 +ETHEREUM_JSONRPC_HTTP_URL="" + +# NGINX config for RPC node +NGINX_DOMAIN=nh-l2-explorer.horizenlabs.io +NGINX_CERT="" +NGINX_CERT_KEY="" + +# NH node config +NH_NODE_VERSION=latest +NH_NODE_TYPE="-rpc" +NH_NODE_NET_P2P_PORT=30333 +NH_NODE_NET_RPC_WS_PORT=9944 + +NH_CONF_NAME="nh-node-cdk" +NH_CONF_BASE_PATH="/data/node" +NH_CONF_BOOTNODES="/ip4/IP_ADDRESS/tcp/${NH_NODE_NET_P2P_PORT}/p2p/PEER_ID,/ip4/IP_ADDRESS/tcp/${NH_NODE_NET_P2P_PORT}/p2p/PEER_ID" +NH_CONF_RPC_EXTERNAL=true +NH_CONF_RPC_METHODS=safe +NH_CONF_RPC_CORS=all +NH_CONF_CHAIN="local" + +# NH +NH_WS_URL="ws://nh-node:${NH_NODE_NET_RPC_WS_PORT}" +NH_RPC_URL="http://nh-node:${NH_NODE_NET_RPC_WS_PORT}" +NH_SEED_PHRASE="" + +# General +ZKEVM_NODE_MTCLIENT_URI="" +ZKEVM_NODE_EXECUTOR_URI="" +ZKEVM_NODE_SEQUENCER_SENDER_ADDRESS="" +ZKEVM_NODE_AGGREGATOR_SENDER_ADDRESS="" \ No newline at end of file diff --git a/test/Makefile b/test/Makefile index 5ae3a4a420..e90e79a7c9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,4 +1,4 @@ -DOCKERCOMPOSE := docker-compose -f docker-compose.yml +DOCKERCOMPOSE := docker compose -f docker-compose.yml DOCKERCOMPOSEAPPSEQ := zkevm-sequencer DOCKERCOMPOSEAPPSEQSENDER := zkevm-sequence-sender DOCKERCOMPOSEAPPL2GASP := zkevm-l2gaspricer @@ -14,6 +14,7 @@ DOCKERCOMPOSEEXPLORERL1 := zkevm-explorer-l1 DOCKERCOMPOSEEXPLORERL1DB := zkevm-explorer-l1-db DOCKERCOMPOSEEXPLORERL2 := zkevm-explorer-l2 DOCKERCOMPOSEEXPLORERL2DB := zkevm-explorer-l2-db +DOCKERCOMPOSEEXPLORERL2PROXY := zkevm-explorer-l2-proxy DOCKERCOMPOSEEXPLORERRPC := zkevm-explorer-json-rpc DOCKERCOMPOSEZKPROVER := zkevm-prover DOCKERCOMPOSEPERMISSIONLESSDB := zkevm-permissionless-db @@ -23,6 +24,7 @@ DOCKERCOMPOSEPERMISSIONLESSZKPROVER := zkevm-permissionless-prover DOCKERCOMPOSENODEAPPROVE := zkevm-approve DOCKERCOMPOSEMETRICS := zkevm-metrics DOCKERCOMPOSEGRAFANA := grafana +DOCKERCOMPOSENHNODE := nh-node RUNSTATEDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSESTATEDB) RUNPOOLDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPOOLDB) @@ -32,6 +34,7 @@ RUNSEQUENCESENDER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSEQSENDER) RUNL2GASPRICER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPL2GASP) RUNAGGREGATOR := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPAGG) RUNJSONRPC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPRPC) +RUNNHNODE := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSENHNODE) RUNSYNC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPSYNC) RUNETHTXMANAGER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEAPPETHTXMANAGER) RUNGRAFANA := DOCKERGID=`stat -c '%g' /var/run/docker.sock` $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEGRAFANA) @@ -41,6 +44,7 @@ RUNEXPLORERL1 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL1) RUNEXPLORERL1DB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL1DB) RUNEXPLORERL2 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2) RUNEXPLORERL2DB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2DB) +RUNEXPLORERL2PROXY := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2PROXY) RUNEXPLORERJSONRPC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERRPC) RUNZKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEZKPROVER) @@ -63,6 +67,7 @@ STOPSEQUENCESENDER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPSEQSENDER) && $(DO STOPL2GASPRICER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPL2GASP) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEAPPL2GASP) STOPAGGREGATOR := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPAGG) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEAPPAGG) STOPJSONRPC := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPRPC) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEAPPRPC) +STOPNHNODE := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSENHNODE) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSENHNODE) STOPSYNC := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPSYNC) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEAPPSYNC) STOPETHTXMANAGER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEAPPETHTXMANAGER) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEAPPETHTXMANAGER) STOPGRAFANA := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEGRAFANA) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEGRAFANA) @@ -328,6 +333,14 @@ stop-node: ## Stops the node $(STOPSYNC) $(STOPETHTXMANAGER) +.PHONY: run-nh-node +run-nh-node: ## Runs New Horizen node + $(RUNNHNODE) + +.PHONY: stop-nh-node +stop-nh-node: ## Stops New Horizen node + $(STOPNHNODE) + .PHONY: run-network run-network: ## Runs the l1 network $(RUNL1NETWORK) @@ -354,6 +367,7 @@ run-l2-explorer: ## Runs L2 blockscan explorer $(RUNEXPLORERL2DB) $(RUNEXPLORERJSONRPC) $(RUNEXPLORERL2) + $(RUNEXPLORERL2PROXY) .PHONY: run-l2-explorer-json-rpc run-l2-explorer-json-rpc: ## Runs L2 explorer json rpc @@ -499,9 +513,75 @@ run: ## Runs a full node $(RUNL2GASPRICER) $(RUNAGGREGATOR) $(RUNJSONRPC) + $(RUNAPPROVE) + $(MAKE) run-explorer -.PHONY: stop -stop: ## Stops all services +.PHONY: prod-run +prod-run: run-nh-node + $(RUNSTATEDB) + $(RUNPOOLDB) + $(RUNEVENTDB) + sleep 5 + #$(RUNZKPROVER) + sleep 5 + $(RUNSYNC) + sleep 5 + $(RUNETHTXMANAGER) + $(RUNSEQUENCER) + $(RUNSEQUENCESENDER) + $(RUNL2GASPRICER) + $(RUNAGGREGATOR) + $(RUNJSONRPC) + $(RUNAPPROVE) + +.PHONY: sart +start: ## Restarts a full node + $(STARTSTATEDB) + $(STARTPOOLDB) + $(STARTEVENTDB) + sleep 15 + $(STARTL1NETWORK) + sleep 15 + #$(STARTZKPROVER) + sleep 5 + $(STARTSYNC) + sleep 5 + $(STARTETHTXMANAGER) + $(STARTSEQUENCER) + $(STARTSEQUENCESENDER) + $(STARTL2GASPRICER) + $(STARTAGGREGATOR) + $(STARTJSONRPC) + $(STARTAPPROVE) + $(MAKE) start-explorer + +.PHONY: prod-start +prod-start: ## Run the production environment + $(STARTSTATEDB) + $(STARTPOOLDB) + $(STARTEVENTDB) + sleep 5 + #$(STARTZKPROVER) + sleep 5 + $(STARTSYNC) + sleep 5 + $(STARTETHTXMANAGER) + $(STARTSEQUENCER) + $(STARTSEQUENCESENDER) + $(STARTL2GASPRICER) + $(STARTAGGREGATOR) + $(STARTJSONRPC) + $(STARTAPPROVE) + +.PHONY: my-stop +my-stop: stop-node stop-db stop-explorer stop-zkprover stop-approve-matic stop-settlement + +.PHONY: prod-stop +prod-stop: ## Stops all services + ${DOCKERCOMPOSE} stop + +.PHONY: cleanup +cleanup: ## Stops and erase all services $(STOP) .PHONY: ship diff --git a/test/aggregator.keystore b/test/aggregator.keystore index 36adf8bc3f..c05600b1bb 100644 --- a/test/aggregator.keystore +++ b/test/aggregator.keystore @@ -1 +1,19 @@ -{"version":3,"id":"71b028b6-9b1d-4f4c-9e66-31c94a6eb679","address":"70997970c51812dc3a010c7d01b50e0d17dc79c8","crypto":{"ciphertext":"985d5dc5f7750fc4ad0ad0d370486870016bb97e00ef1f7b146d6ad95d456861","cipherparams":{"iv":"f51b18b9f45872f71c3578513fca6cb0"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"6253e2d8a71e4808dd11143329cfea467cabb37ac1e1e55dbc0dd90ff22524a7","n":8192,"r":8,"p":1},"mac":"922f741e84201fc7c17bbf9fae5dba6c04a2a99a7268998b5a0268aa690004be"}} \ No newline at end of file +******************* +* {!PLACEHOLDER!} * +******************* + +TO BE REPLACED WITH VALUE RETURNED BY FOLLOWING SCRIPT: + +const ethers = require("ethers"); + +async function main() { + const wallet = new ethers.Wallet(ethers.Wallet.fromMnemonic("INSERT_PRIVATE_KEY_HERE")); + console.log(wallet.address) + const keystoreJson = await wallet.encrypt("testonly"); + console.log(`keystore: ${keystoreJson}`); +} + +main().catch((e) => { + console.error(e); + process.exit(1); +}); \ No newline at end of file diff --git a/test/config/nginx/entrypoint.sh b/test/config/nginx/entrypoint.sh new file mode 100755 index 0000000000..114fd64f93 --- /dev/null +++ b/test/config/nginx/entrypoint.sh @@ -0,0 +1,128 @@ +#!/bin/bash +set -eEuo pipefail + +# check required env vars are set +vars_to_check=( + "NGINX_CERT" + "NGINX_CERT_KEY" + "NGINX_DOMAIN" + "EXPLORER_NET_IP_ADDRESS" + "EXPLORER_NET_UI_PORT" +) + +for var in "${vars_to_check[@]}"; do + if [ -z "${!var:-}" ]; then + echo "Error: Environment variable ${var} is required. Exiting ..." + sleep 5 + exit 1 + fi +done + +# install requirements +command -v openssl > /dev/null 2>&1 || apk add --no-cache openssl +mkdir -p /etc/nginx/dynamic-conf/certificates /etc/nginx/dynamic-conf/conf.d /etc/nginx/dynamic-conf/snippets + +# check validity of cloudflare authenticated origin pull cert, update if outdated +renew="false" +if [ -s "/etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem" ]; then + expires="$(openssl x509 -in /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem -noout -enddate | sed -e 's#notAfter=##' | rev | cut -d " " -f 2- | rev | xargs -I {} date --date="{}" +%s)" + now="$(date +%s)" + # valid for less than 90 days + if [ "$((expires-now))" -lt 7776000 ]; then + rm -f /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem + renew="true" + fi +else + renew="true" +fi + +if [ "${renew}" = "true" ]; then + wget -q https://developers.cloudflare.com/ssl/static/authenticated_origin_pull_ca.pem -O /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem || { echo 'failed to get origin-pull-ca.pem' && false; } + grep -q "END CERTIFICATE" /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem || { echo 'Fatal, does not look like a certificate from cloudflare, failed to get origin-pull-ca.pem!' && rm -f /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem && false; } +fi + +# generate snakeoil certs if not exist +if ! [ -s "/etc/nginx/dynamic-conf/certificates/snakeoil.key" ] || ! [ -s "/etc/nginx/dynamic-conf/certificates/snakeoil.pem" ]; then + openssl req -newkey rsa:4096 -new -x509 -days 3650 -nodes -out /etc/nginx/dynamic-conf/certificates/snakeoil.pem -keyout /etc/nginx/dynamic-conf/certificates/snakeoil.key -subj "/C=US/ST=South Carolina/L=Columbia/O=IT/CN=snakeoil.localdomain" -extensions v3_ca + chmod 400 /etc/nginx/dynamic-conf/certificates/snakeoil.key +fi + +# generate DH parameters if not exist +if ! grep -q "PARAMETERS" /etc/nginx/dynamic-conf/dhparam.pem > /dev/null 2>&1; then + openssl dhparam 4096 > /etc/nginx/dynamic-conf/dhparam.pem +fi + +# generate cloudflare-whitelist.conf and cloudflare-restore-origin-ip.conf +NGINX_WHITELIST="/etc/nginx/dynamic-conf/snippets/cloudflare-whitelist.conf" +NGINX_ORIGIN="/etc/nginx/dynamic-conf/snippets/cloudflare-restore-origin-ip.conf" +CFDLDIR="$(mktemp -d)" +cd "${CFDLDIR}" +wget -q https://www.cloudflare.com/ips-v4 || { echo 'failed to get cloudflare IPv4 Servers' && rm -rf "${CFDLDIR}" && false; } +wget -q https://www.cloudflare.com/ips-v6 || { echo 'failed to get cloudflare IPv6 Servers' && rm -rf "${CFDLDIR}" && false; } +grep -qv html ips-v4 || { echo 'Fatal, got html instead of IP list from cloudflare, failed to generate nginx/dynamic-conf/cloudflare-*.conf!' && rm -r "${CFDLDIR}" && false; } +grep -qv html ips-v6 || { echo 'Fatal, got html instead of IP list from cloudflare, failed to generate nginx/dynamic-conf/cloudflare-*.conf!' && rm -r "${CFDLDIR}" && false; } +echo "geo \$realip_remote_addr \$cloudflare_ip {" > "${NGINX_WHITELIST}" +echo -e "\tdefault\t\t0;" >> "${NGINX_WHITELIST}" +cat ips-v4 | perl -p -e "s/^(.*)$/\t\1\t1;/g" >> "${NGINX_WHITELIST}" +echo "" >> "${NGINX_WHITELIST}" +cat ips-v6 | perl -p -e "s/^(.*)$/\t\1\t1;/g" >> "${NGINX_WHITELIST}" +echo "" >> "${NGINX_WHITELIST}" +echo "}" >> "${NGINX_WHITELIST}" +echo "# CloudFlare IP Ranges" > "${NGINX_ORIGIN}" +echo "# Generated at $(date) by $0" >> "${NGINX_ORIGIN}" +echo "" >> "${NGINX_ORIGIN}" +echo "# - IPv4 (https://www.cloudflare.com/ips-v4)" >> "${NGINX_ORIGIN}" +cat ips-v4 | perl -p -e "s/^(.*)$/set_real_ip_from\ \1;/g" >> "${NGINX_ORIGIN}" +echo "" >> "${NGINX_ORIGIN}" +echo "# - IPv6 (https://www.cloudflare.com/ips-v6)" >> "${NGINX_ORIGIN}" +cat ips-v6 | perl -p -e "s/^(.*)$/set_real_ip_from\ \1;/g" >> "${NGINX_ORIGIN}" +echo "" >> "${NGINX_ORIGIN}" +echo "real_ip_header CF-Connecting-IP;" >> "${NGINX_ORIGIN}" +echo "" >> "${NGINX_ORIGIN}" +rm -rf "${CFDLDIR}" +unset CFDLDIR + +# add text/csv mime type +if ! grep -q csv /usr/local/openresty/nginx/conf/mime.types; then + sed -i '/}/i \ \ \ \ text/csv csv;' /usr/local/openresty/nginx/conf/mime.types +fi + +# generate .htpasswd files +NGINX_AUTHBLOCK="" +if [ -n "${NGINX_HTPASSWD:-}" ]; then + touch /etc/nginx/.htpasswd + user="$(echo "${NGINX_HTPASSWD}" | cut -d : -f 1)" + pass="$(echo "${NGINX_HTPASSWD}" | cut -d : -f 2)" + salt="gesalzen" + echo "${user}:$(mkpasswd -m sha512 "$pass" "$salt")" > /etc/nginx/.htpasswd + # shellcheck disable=SC2089 + NGINX_AUTHBLOCK=' + auth_basic "Login"; + auth_basic_user_file /etc/nginx/.htpasswd;' + chown "$(id -u nobody)":"$(id -g nobody)" /etc/nginx/.htpasswd +fi +# shellcheck disable=SC2090 +export NGINX_AUTHBLOCK + +# write out certificate and key files +# no arrays or indirection in ash, so done for each cert +echo -e "${NGINX_CERT}" > "/etc/nginx/dynamic-conf/certificates/domain-origin.crt" +echo -e "${NGINX_CERT_KEY}" > "/etc/nginx/dynamic-conf/certificates/domain-origin.key" +chmod 400 "/etc/nginx/dynamic-conf/certificates/domain-origin.crt" "/etc/nginx/dynamic-conf/certificates/domain-origin.key" + +# use envsubst to substitute variables in default.conf and healthcheck.conf +# shellcheck disable=SC2016 +NGINX_ENVSUBST='$NGINX_AUTHBLOCK:$NGINX_CERT:$NGINX_CERT_KEY:$NGINX_DOMAIN:$EXPLORER_NET_IP_ADDRESS:$EXPLORER_NET_UI_PORT' +export NGINX_ENVSUBST + +envsubst "${NGINX_ENVSUBST}" < /etc/nginx/templates/default.conf.tmpl > /etc/nginx/dynamic-conf/conf.d/default.conf + +# check config and sleep until valid (backend might not be up yet) +while ! nginx -t; do + sleep 10 +done + +# shellcheck disable=SC2046 +unset $(env | grep "NGINX_" | awk -F'=' '{print $1}') + +exec "$@" \ No newline at end of file diff --git a/test/config/nginx/nginx.conf b/test/config/nginx/nginx.conf new file mode 100644 index 0000000000..6724ac9c36 --- /dev/null +++ b/test/config/nginx/nginx.conf @@ -0,0 +1,55 @@ +user nobody; +worker_processes auto; + +worker_rlimit_nofile 40000; + +error_log /var/log/openresty/error.log warn; +pid /run/nginx.pid; + +# enable jit compilation of regular expressions on configuration parsing/startup +# requires pcre-dev compiled with --enable-jit (which is the case on alpine https://git.alpinelinux.org/aports/tree/main/pcre/APKBUILD?h=3.12-stable#n25) +# or nginx compiled with --with-pcre= --with-pcre-jit http://nginx.org/en/docs/ngx_core_module.html#pcre_jit +pcre_jit on; + +events { + worker_connections 16384; +} + + +http { + include /usr/local/openresty/nginx/conf/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/openresty/access.log main; + + client_body_temp_path /var/run/nginx-client-body; + proxy_temp_path /var/run/nginx-proxy; + fastcgi_temp_path /var/run/nginx-fastcgi; + uwsgi_temp_path /var/run/nginx-uwsgi; + scgi_temp_path /var/run/nginx-scgi; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; + + gzip on; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_min_length 128; + gzip_http_version 1.1; + gzip_disable "MSIE [1-6]\."; + gzip_types application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font + application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf + application/xhtml+xml application/x-javascript application/xml application/xml+rss font/opentype font/otf + font/ttf image/svg+xml image/x-icon text/css text/csv text/javascript text/plain text/xml; + + include /etc/nginx/dynamic-conf/conf.d/*.conf; +} diff --git a/test/config/nginx/snippets/ssl.conf b/test/config/nginx/snippets/ssl.conf new file mode 100644 index 0000000000..e5c4edafdb --- /dev/null +++ b/test/config/nginx/snippets/ssl.conf @@ -0,0 +1,19 @@ +ssl_protocols TLSv1.2 TLSv1.3;# Requires nginx >= 1.13.0 else use TLSv1.2 +ssl_prefer_server_ciphers on; +ssl_dhparam /etc/nginx/dynamic-conf/dhparam.pem; # openssl dhparam -out /etc/nginx/dynamic-conf/dhparam.pem 4096 +ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES; +ssl_ecdh_curve X25519:secp521r1:secp384r1:prime256v1; # Requires nginx >= 1.1.0 +ssl_session_timeout 5m; +ssl_session_cache shared:SSL:50m; +ssl_session_tickets off; # Requires nginx >= 1.5.9 +ssl_stapling on; # Requires nginx >= 1.3.7 +ssl_stapling_verify on; # Requires nginx => 1.3.7 +ssl_client_certificate /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem; # Authenticated origin pulls +ssl_verify_client on; +resolver 127.0.0.11 8.8.8.8 valid=300s; +resolver_timeout 5s; +add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; +add_header X-Frame-Options DENY; +add_header X-Content-Type-Options nosniff; +add_header X-XSS-Protection "1; mode=block"; +#add_header X-Robots-Tag none; diff --git a/test/config/nginx/snippets/ssl_client_verify_off.conf b/test/config/nginx/snippets/ssl_client_verify_off.conf new file mode 100644 index 0000000000..15b3d43d53 --- /dev/null +++ b/test/config/nginx/snippets/ssl_client_verify_off.conf @@ -0,0 +1,19 @@ +ssl_protocols TLSv1.2 TLSv1.3;# Requires nginx >= 1.13.0 else use TLSv1.2 +ssl_prefer_server_ciphers on; +ssl_dhparam /etc/nginx/dynamic-conf/dhparam.pem; # openssl dhparam -out /etc/nginx/dynamic-conf/dhparam.pem 4096 +ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES; +ssl_ecdh_curve X25519:secp521r1:secp384r1:prime256v1; # Requires nginx >= 1.1.0 +ssl_session_timeout 5m; +ssl_session_cache shared:SSL:50m; +ssl_session_tickets off; # Requires nginx >= 1.5.9 +ssl_stapling on; # Requires nginx >= 1.3.7 +ssl_stapling_verify on; # Requires nginx => 1.3.7 +ssl_client_certificate /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem; # Authenticated origin pulls +ssl_verify_client off; +resolver 127.0.0.11 8.8.8.8 valid=300s; +resolver_timeout 5s; +add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; +add_header X-Frame-Options DENY; +add_header X-Content-Type-Options nosniff; +add_header X-XSS-Protection "1; mode=block"; +#add_header X-Robots-Tag none; diff --git a/test/config/nginx/snippets/ssl_stapling_off.conf b/test/config/nginx/snippets/ssl_stapling_off.conf new file mode 100644 index 0000000000..3870ccd68d --- /dev/null +++ b/test/config/nginx/snippets/ssl_stapling_off.conf @@ -0,0 +1,19 @@ +ssl_protocols TLSv1.2 TLSv1.3;# Requires nginx >= 1.13.0 else use TLSv1.2 +ssl_prefer_server_ciphers on; +ssl_dhparam /etc/nginx/dynamic-conf/dhparam.pem; # openssl dhparam -out /etc/nginx/dynamic-conf/dhparam.pem 4096 +ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES; +ssl_ecdh_curve X25519:secp521r1:secp384r1:prime256v1; # Requires nginx >= 1.1.0 +ssl_session_timeout 5m; +ssl_session_cache shared:SSL:50m; +ssl_session_tickets off; # Requires nginx >= 1.5.9 +ssl_stapling off; # Requires nginx >= 1.3.7 +ssl_stapling_verify off; # Requires nginx => 1.3.7 +ssl_client_certificate /etc/nginx/dynamic-conf/certificates/origin-pull-ca.pem; # Authenticated origin pulls +ssl_verify_client on; +resolver 127.0.0.11 8.8.8.8 valid=300s; +resolver_timeout 5s; +add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; +add_header X-Frame-Options DENY; +add_header X-Content-Type-Options nosniff; +add_header X-XSS-Protection "1; mode=block"; +#add_header X-Robots-Tag none; diff --git a/test/config/nginx/templates/default.conf.tmpl b/test/config/nginx/templates/default.conf.tmpl new file mode 100644 index 0000000000..e546b436f0 --- /dev/null +++ b/test/config/nginx/templates/default.conf.tmpl @@ -0,0 +1,137 @@ +# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the +# scheme used to connect to this server +map $http_x_forwarded_proto $proxy_x_forwarded_proto { + default $http_x_forwarded_proto; + '' $scheme; +} + +# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the +# server port the client connected to +map $http_x_forwarded_port $proxy_x_forwarded_port { + default $http_x_forwarded_port; + '' $server_port; +} + +# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any +# Connection header that may have been passed to this server +map $http_upgrade $proxy_connection { + default upgrade; + '' close; +} + +# Apply fix for very long server names +server_names_hash_bucket_size 128; + +# Set appropriate X-Forwarded-Ssl header +map $scheme $proxy_x_forwarded_ssl { + default off; + https on; +} + +log_format custom '$remote_addr - $http_cf_connecting_ip - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent" ' + '"$http_x_forwarded_for" $http_cf_ipcountry $request_id $http_host'; + +access_log off; + +# HTTP 1.1 support +proxy_http_version 1.1; +proxy_set_header Host $http_host; +proxy_set_header Upgrade $http_upgrade; +proxy_set_header Connection $proxy_connection; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; +proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; +proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; + +# Mitigate httpoxy attack +proxy_set_header Proxy ""; + +# cloudflare whitelist (only allow cloudflare IPs to directly connect) +include /etc/nginx/dynamic-conf/snippets/cloudflare-whitelist.conf; + +# cloudflare realip (restore original client IP) +include /etc/nginx/dynamic-conf/snippets/cloudflare-restore-origin-ip.conf; + +# we use upstream blocks to make load balancing easier in the future +# for why we use the internal 127.0.0.1 server see https://stackoverflow.com/questions/32845674/setup-nginx-not-to-crash-if-host-in-upstream-is-not-found/70700462#70700462 +upstream backend { + server $EXPLORER_NET_IP_ADDRESS:$EXPLORER_NET_UI_PORT fail_timeout=5s max_fails=3; + server 127.0.0.1:10082 down; + server 127.0.0.1:10082 backup; +} + +server { + listen 10082; + + location / { + return 503; + add_header Content-Type text/plain; + } + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/openresty/nginx/html; + } +} + +server { + server_name _; # This is just an invalid value which will never trigger on a real hostname. + listen 80; + listen 443 ssl; + http2 off; + + access_log /var/log/openresty/domain-access.log custom; + error_log /var/log/openresty/domain-error.log; + + include /etc/nginx/snippets/ssl_stapling_off.conf; + ssl_certificate /etc/nginx/dynamic-conf/certificates/snakeoil.pem; + ssl_certificate_key /etc/nginx/dynamic-conf/certificates/snakeoil.key; + + return 444; +} + +server { + server_name $NGINX_DOMAIN; + listen 80; + + access_log /var/log/openresty/domain-access.log custom; + error_log /var/log/openresty/domain-error.log; + + if ($cloudflare_ip != 1) { + return 444; + } + + return 301 https://$host$request_uri; +} + +server { + server_name $NGINX_DOMAIN; + listen 443 ssl; + http2 off; + + access_log /var/log/openresty/domain-access.log custom; + error_log /var/log/openresty/domain-error.log; + + include /etc/nginx/snippets/ssl.conf; + ssl_certificate /etc/nginx/dynamic-conf/certificates/domain-origin.crt; + ssl_certificate_key /etc/nginx/dynamic-conf/certificates/domain-origin.key; + + if ($cloudflare_ip != 1) { + return 444; + } + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/local/openresty/nginx/html;$NGINX_AUTHBLOCK + } + + location / { + default_type application/json; + proxy_pass http://backend/;$NGINX_AUTHBLOCK + } +} \ No newline at end of file diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml index 4b80a75e2b..73c9e79785 100644 --- a/test/config/test.node.config.toml +++ b/test/config/test.node.config.toml @@ -3,7 +3,7 @@ IsTrustedSequencer = true [Log] Environment = "development" # "production" or "development" Level = "debug" -Outputs = ["stderr"] +Outputs = ["/app/logs/debug.log"] [State] [State.DB] @@ -57,7 +57,7 @@ GlobalQueue = 1024 MaxConns = 200 [Etherman] -URL = "http://zkevm-mock-l1-network:8545" +URL = "_PLACEHOLDER_" ForkIDChunkSize = 20000 MultiGasProvider = false [Etherscan] @@ -71,6 +71,7 @@ WriteTimeout = "60s" MaxRequestsPerIPAndSecond = 5000 SequencerNodeURI = "" EnableL2SuggestedGasPricePolling = true +BatchRequestsEnabled = true [RPC.WebSockets] Enabled = true Port = 8133 @@ -104,7 +105,7 @@ MaxTxLifetime = "3h" [Sequencer.Finalizer] GERDeadlineTimeout = "2s" ForcedBatchDeadlineTimeout = "5s" - SleepDuration = "100ms" + SleepDuration = "1s" ResourcePercentageToCloseBatch = 10 GERFinalityNumberOfBlocks = 0 ClosingSignalsManagerWaitForCheckingL1Timeout = "10s" @@ -125,7 +126,7 @@ MaxTxLifetime = "3h" WaitPeriodSendSequence = "15s" LastBatchVirtualizationTimeMaxWaitPeriod = "10s" MaxTxSizeForL1 = 131072 -L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" +L2Coinbase = "_PLACEHOLDER_" PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"} [Aggregator] @@ -136,7 +137,7 @@ VerifyProofInterval = "10s" TxProfitabilityCheckerType = "acceptall" TxProfitabilityMinReward = "1.1" ProofStatePollingInterval = "5s" -SenderAddress = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8" +SenderAddress = "_PLACEHOLDER_" CleanupLockedProofsInterval = "2m" GeneratingProofCleanupThreshold = "10m" diff --git a/test/config/test.prover.config_mock_prover.json b/test/config/test.prover.config_mock_prover.json new file mode 100644 index 0000000000..9793eb7f37 --- /dev/null +++ b/test/config/test.prover.config_mock_prover.json @@ -0,0 +1,90 @@ +{ + "runExecutorServer": true, + "runExecutorClient": false, + "runExecutorClientMultithread": false, + + "runHashDBServer": true, + "runHashDBTest": false, + + "runAggregatorServer": false, + "runAggregatorClient": false, + "runAggregatorClientMock": true, + "aggregatorClientMockTimeout": 1, + "proverName": "test-prover", + + "runFileGenBatchProof": false, + "runFileGenAggregatedProof": false, + "runFileGenFinalProof": false, + "runFileProcessBatch": false, + "runFileProcessBatchMultithread": false, + + "runKeccakScriptGenerator": false, + "runKeccakTest": false, + "runStorageSMTest": false, + "runBinarySMTest": false, + "runMemAlignSMTest": false, + "runSHA256Test": false, + "runBlakeTest": false, + + "executeInParallel": true, + "useMainExecGenerated": true, + "saveRequestToFile": false, + "saveInputToFile": false, + "saveDbReadsToFile": false, + "saveDbReadsToFileOnChange": false, + "saveOutputToFile": true, + "saveProofToFile": true, + "saveResponseToFile": false, + "loadDBToMemCache": true, + "opcodeTracer": false, + "logRemoteDbReads": false, + "logExecutorServerResponses": false, + + "proverServerPort": 50051, + "proverServerMockPort": 50052, + "proverServerMockTimeout": 10000000, + "proverClientPort": 50051, + "proverClientHost": "127.0.0.1", + + "executorServerPort": 50071, + "executorROMLineTraces": false, + "executorClientPort": 50071, + "executorClientHost": "127.0.0.1", + + "hashDBServerPort": 50061, + "hashDBURL": "local", + + "aggregatorServerPort": 50081, + "aggregatorClientPort": 50081, + "aggregatorClientHost": "cdk-validium-aggregator", + + "mapConstPolsFile": false, + "mapConstantsTreeFile": false, + + "inputFile": "input_executor_0.json", + "inputFile2": "input_executor_1.json", + + "keccakScriptFile": "config/scripts/keccak_script.json", + "storageRomFile": "config/scripts/storage_sm_rom.json", + + "outputPath": "output", + + "databaseURL": "postgresql://prover_user:prover_pass@cdk-validium-state-db:5432/prover_db", + "dbNodesTableName": "state.nodes", + "dbProgramTableName": "state.program", + "dbMultiWrite": true, + "dbFlushInParallel": false, + "dbMTCacheSize": 1024, + "dbProgramCacheSize": 512, + "dbNumberOfPoolConnections": 30, + "dbGetTree": true, + "cleanerPollingPeriod": 600, + "requestsPersistence": 3600, + "maxExecutorThreads": 20, + "maxProverThreads": 8, + "maxHashDBThreads": 8, + "ECRecoverPrecalc": false, + "ECRecoverPrecalcNThreads": 4, + "stateManager": true, + "useAssociativeCache" : false +} diff --git a/test/docker-compose.yml b/test/docker-compose.yml index c0717b211a..878b5f42ce 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,7 +1,18 @@ version: "3.5" + +volumes: + nginx-dynamic-conf: + nh-node-data: + networks: default: name: zkevm + explorer_proxy: + internal: true + ipam: + config: + - subnet: ${INTERNAL_NETWORK_SUBNET} + inet: services: grafana: @@ -56,12 +67,13 @@ services: environment: - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - - ZKEVM_NODE_MTCLIENT_URI=${ZKEVM_NODE_MTCLIENT_URI} - - ZKEVM_NODE_EXECUTOR_URI=${ZKEVM_NODE_EXECUTOR_URI} + - ZKEVM_NODE_MTCLIENT_URI + - ZKEVM_NODE_EXECUTOR_URI volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json - ./:/datastreamer + - ./logs/sequencer:/app/logs command: - "/bin/sh" - "-c" @@ -73,13 +85,14 @@ services: environment: - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - - ZKEVM_NODE_SEQUENCER_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 - - ZKEVM_NODE_MTCLIENT_URI=${ZKEVM_NODE_MTCLIENT_URI} - - ZKEVM_NODE_EXECUTOR_URI=${ZKEVM_NODE_EXECUTOR_URI} + - ZKEVM_NODE_SEQUENCER_SENDER_ADDRESS + - ZKEVM_NODE_MTCLIENT_URI + - ZKEVM_NODE_EXECUTOR_URI volumes: - ./sequencer.keystore:/pk/sequencer.keystore - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json + - ./logs/sequence-sender:/app/logs command: - "/bin/sh" - "-c" @@ -95,11 +108,12 @@ services: environment: - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - - ZKEVM_NODE_MTCLIENT_URI=${ZKEVM_NODE_MTCLIENT_URI} - - ZKEVM_NODE_EXECUTOR_URI=${ZKEVM_NODE_EXECUTOR_URI} + - ZKEVM_NODE_MTCLIENT_URI + - ZKEVM_NODE_EXECUTOR_URI volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json + - ./logs/json-rpc:/app/logs command: - "/bin/sh" - "-c" @@ -113,10 +127,14 @@ services: - 9093:9091 # needed if metrics enabled environment: - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - - ZKEVM_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + - ZKEVM_NODE_AGGREGATOR_SENDER_ADDRESS + - NH_WS_URL + - NH_RPC_URL + - NH_SEED_PHRASE volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json + - ./logs/aggregator:/app/logs command: - "/bin/sh" - "-c" @@ -129,11 +147,12 @@ services: - 9095:9091 # needed if metrics enabled environment: - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - - ZKEVM_NODE_MTCLIENT_URI=${ZKEVM_NODE_MTCLIENT_URI} - - ZKEVM_NODE_EXECUTOR_URI=${ZKEVM_NODE_EXECUTOR_URI} + - ZKEVM_NODE_MTCLIENT_URI + - ZKEVM_NODE_EXECUTOR_URI volumes: - ./config/test.node.config.toml:/app/config.toml - ./config/test.genesis.config.json:/app/genesis.json + - ./logs/sync:/app/logs command: - "/bin/sh" - "-c" @@ -244,7 +263,7 @@ services: - SUBNETWORK=Local Ethereum - COIN=ETH - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-mock-l1-network:8545 + - ETHEREUM_JSONRPC_HTTP_URL - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@zkevm-explorer-l1-db:5432/l1_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod @@ -270,14 +289,20 @@ services: zkevm-explorer-l2: container_name: zkevm-explorer-l2 image: hermeznetwork/zkevm-explorer:latest - ports: - - 4001:4000 + networks: + explorer_proxy: + ipv4_address: ${EXPLORER_NET_IP_ADDRESS} + default: +# ports: +# - "4001:4000" + expose: + - "${EXPLORER_NET_UI_PORT}" environment: - NETWORK=POE - SUBNETWORK=Polygon Hermez - - COIN=ETH + - COIN=RNT - ETHEREUM_JSONRPC_VARIANT=geth - - ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-explorer-json-rpc:8124 + - ETHEREUM_JSONRPC_HTTP_URL - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@zkevm-explorer-l2-db:5432/l2_explorer_db - ECTO_USE_SSL=false - MIX_ENV=prod @@ -288,6 +313,45 @@ services: - "-c" - "mix do ecto.create, ecto.migrate; mix phx.server" + zkevm-explorer-l2-proxy: + image: openresty/openresty:alpine-fat + container_name: zkevm-explorer-l2-proxy + hostname: zkevm-explorer-l2-proxy + restart: on-failure:5 + networks: + explorer_proxy: + ipv4_address: 10.10.40.11 + inet: + ports: + - "80:80" + - "443:443" + volumes: + - "./config/nginx/templates:/etc/nginx/templates:ro" + - "./config/nginx/entrypoint.sh:/usr/local/bin/entrypoint.sh:ro" + - "./config/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro" + - "./config/nginx/snippets:/etc/nginx/snippets:ro" + - "./nginx_logs/nginx:/var/log/openresty:rw" + - "nginx-dynamic-conf:/etc/nginx/dynamic-conf:rw" + tmpfs: + - /run + - /var/run + - /tmp + environment: + - NGINX_CERT + - NGINX_CERT_KEY + - NGINX_DOMAIN + - NGINX_HTPASSWD + - EXPLORER_NET_IP_ADDRESS + - EXPLORER_NET_UI_PORT + entrypoint: [ "/usr/local/bin/entrypoint.sh" ] + command: [ "/usr/local/openresty/bin/openresty", "-g", "daemon off;" ] + logging: + driver: "json-file" + options: + max-size: "512m" + max-file: "4" + + zkevm-explorer-json-rpc: container_name: zkevm-explorer-json-rpc image: zkevm-node @@ -295,8 +359,10 @@ services: - 8124:8124 - 8134:8134 # needed if WebSockets enabled environment: - - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db - - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db + - ZKEVM_NODE_STATE_DB_HOST=10.0.9.64 + - ZKEVM_NODE_POOL_DB_HOST=10.0.9.64 +# - ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db +# - ZKEVM_NODE_POOL_DB_HOST=zkevm-pool-db - ZKEVM_NODE_RPC_PORT=8124 - ZKEVM_NODE_RPC_WEBSOCKETS_PORT=8134 volumes: @@ -505,4 +571,24 @@ services: command: - "postgres" - "-N" - - "500" \ No newline at end of file + - "500" + + nh-node: + image: horizenlabs/nh-node:${NH_NODE_VERSION} + env_file: + - .env + container_name: nh-node${NH_NODE_TYPE} + hostname: nh-node${NH_NODE_TYPE} + restart: on-failure:5 + ports: + - "${NH_NODE_NET_P2P_PORT}:${NH_NODE_NET_P2P_PORT}" + expose: + - "${NH_NODE_NET_RPC_WS_PORT}" + volumes: + - nh-node-data:/data + - ./config/nh-node:/data/config + logging: + driver: "json-file" + options: + max-size: "512m" + max-file: "4" \ No newline at end of file diff --git a/test/sequencer.keystore b/test/sequencer.keystore index 96b662b7eb..402f29bc31 100644 --- a/test/sequencer.keystore +++ b/test/sequencer.keystore @@ -1 +1,19 @@ -{"address":"f39fd6e51aad88f6f4ce6ab8827279cfffb92266","crypto":{"cipher":"aes-128-ctr","ciphertext":"d005030a7684f3adad2447cbb27f63039eec2224c451eaa445de0d90502b9f3d","cipherparams":{"iv":"dc07a54bc7e388efa89c34d42f2ebdb4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"cf2ec55ecae11171de575112cfb16963570533a9c46fb774473ceb11519eb24a"},"mac":"3eb180d405a5da6e462b2adc00091c14856c91d574bf27348714506357d6e177"},"id":"035454db-6b6d-477f-8a79-ce24c10b185f","version":3} \ No newline at end of file +******************* +* {!PLACEHOLDER!} * +******************* + +TO BE REPLACED WITH VALUE RETURNED BY FOLLOWING SCRIPT: + +const ethers = require("ethers"); + +async function main() { + const wallet = new ethers.Wallet(ethers.Wallet.fromMnemonic("INSERT_PRIVATE_KEY_HERE")); + console.log(wallet.address) + const keystoreJson = await wallet.encrypt("testonly"); + console.log(`keystore: ${keystoreJson}`); +} + +main().catch((e) => { + console.error(e); + process.exit(1); +}); \ No newline at end of file